Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Parsing a specific section of a log file

by Zaxo (Archbishop)
on Feb 28, 2007 at 21:57 UTC ( #602609=note: print w/replies, xml ) Need Help??


in reply to Parsing a specific section of a log file

File::Tail will help with that. You can write a continuously running process which monitors the log and reads new entries at an interval you select.

Just push the timestamp from success records onto an array, splice out all the timestamps over half an hour old, and warn if the array is empty.

As with any continuously running service, it would be a good idea to make a Daemon of it.

After Compline,
Zaxo

  • Comment on Re: Parsing a specific section of a log file

Replies are listed 'Best First'.
Re^2: Parsing a specific section of a log file
by izut (Chaplain) on Mar 01, 2007 at 11:29 UTC

    Another alternative is POE::Wheel::FollowTail. I think it is cleaner for that, and uses the POE framework for getting your job done. For daemonizing it, you can use POE::Component::Daemon.

    Igor 'izut' Sutton
    your code, your rules.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://602609]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2021-04-19 16:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?