Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Parsing a specific section of a log file

by Random_Walk (Parson)
on Mar 01, 2007 at 16:51 UTC ( #602719=note: print w/ replies, xml ) Need Help??


in reply to Re: Parsing a specific section of a log file
in thread Parsing a specific section of a log file

I use POE::Wheel::FollowTail to parse, analyse and forward events concurrently from two very busy logfiles (each about 100M a day, average 10 significant lines per second, picked out of three or four times that many, peaks way above that). I have POE look at the file every five seconds and the CPU hit is negligable compared to other processes on the box. I guess it queues itself an alarm between checking the file as this particular POE is doing little else (throws an I'm alive event every minute just in case).

I like the fact the FollowTail handle the log file being rolled over, tells me about errors without choking and generaly just does the right thing. It saved a lot of thinking about all the corner cases (in my case these files are r/o NFS mounts from elswhere and occasionly mis-behave) and let me concentrate on the interesting bit.

Cheers,
R.

Pereant, qui ante nos nostra dixerunt!


Comment on Re^2: Parsing a specific section of a log file

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (20)
As of 2015-07-02 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (39 votes), past polls