in reply to Re: Is this the most efficient way to monitor log files..
in thread Is this the most efficient way to monitor log files..

Hi graff,
You said..
Consider the following alternative -- each time you run this, it will produce one line of status output for each job in your .dractrack file (at least, I hope so; I haven't tested it :P) Now, just decide how frequently you want to get an update, e.g. once every 5 sec, and run it that often.
How would you propose to do this from inside the program?? This is what lead me to my post in the first place..

Rhodium

The <it>seeker</it> of perl wisdom.

  • Comment on Re: Re: Is this the most efficient way to monitor log files..

Replies are listed 'Best First'.
Re: Re: Re: Is this the most efficient way to monitor log files..
by graff (Chancellor) on Apr 20, 2002 at 01:15 UTC
    Read the last paragraph before the code again. You can just wrap the part I have bracketed as "main" with

    while (1) {

    at the top and

      sleep $nsec;}

    at the bottom. (Put your own condition in there if you like, or use a "last" statement inside the loop wherever it's easy to decide that the process can stop.

    Also, do heed grinder's advice (which followed my reply). He's right about how to read the log files.