Keep It Simple, Stupid | |
PerlMonks |
Re: Parsing a specific section of a log fileby kyle (Abbot) |
on Feb 28, 2007 at 22:00 UTC ( [id://602612]=note: print w/replies, xml ) | Need Help?? |
Maybe it would be better to have a long-running process watch the log. You can use File::Tail to read the log as it's written and note when a "STATUS = SUCCESS" line happens. When one comes in, set an alarm (alarm 30 * 60), which will reset any earlier alarm you set. When an alarm goes off , you know that 30 minutes have gone by without a success line, and you can take whatever action you like.
In Section
Seekers of Perl Wisdom
|
|