in reply to Help Required

Greetings Pamela

Before we can give you much assistance there are some additional pieces of information that would be helpful.

What is the time period for which the threshold is valid (i.e. 100 M/D/A in an hour, 8 hours, a day ....). Are your log files circular? Are they aged out and how often? How large are the log files likely to become? Should the code re-read the whole log file each time it is invoked or does it need to preserve some knowledge of what it knew from previous runs so that it can process efficently?

Have you written any code to attack this yet? If so share a working sample so we can better assist you

Misha/Michael - Russian student, grognard, bemused observer of humanity and self professed programmer with delusions of relevance

Replies are listed 'Best First'.
Re^2: Help Required
by Anonymous Monk on Dec 20, 2010 at 15:34 UTC

    Hi,

    No I've not written any code as I've very limited knowledge of a Perl. Basically, I'm a DBA, but would like to learn and start writing some script which would help in my env.

    About your query, the log ( access ) gets rotated in itself, so no need to set a time period.

    For a day the access log is usually 20 mbs, however, i would like to put sometime to record previous run, that way the script would be less resource intensive or would be quicker.

    Thanks.

      Given your desire to acquire PERL knowledge, I would recommend you use this as your learning project. It is relatively straightforward and touches on some of the important basics.

      Approach it iteratively. Write a program that simple reads in the file line by line and prints it back out ….. Examples can be found in any good perl book such as ‘Learning Perl’ Chapter 6.1

      Then see if you can determine which lines contain things that interest you. Read up on the match operator and basic regular expressions, and hashes. Try out what you learn in your code. If you encounter problems come back and post your code and ask questions about it. It will be much easier for the Monks to answer those questions than to write the code for you. Which is the only way to answer you question at this point.

      Get that far and I expect you will find a number of very competent folks who will be happy to assist

      Every journey starts with the first step 8^)

      I wish you a good journey and hope to provide some assistance further down the road.

      Misha/Michael - Russian student, grognard, bemused observer of humanity and self professed programmer with delusions of relevance
        Perl is the language, perl is the executable. "PERL" doesn't exist.

        In before...: It's a bacronym.