Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Reading log files that get overwritten

by kschwab (Priest)
on Jan 02, 2003 at 22:05 UTC ( #223876=note: print w/ replies, xml ) Need Help??


in reply to Reading log files that get overwritten

Check and see if the inode number changes ( ls -li or stat() ) when the file is truncated.

If so, you can just make a hard link, and then note when the inode numbers don't match anymore.

This also has the advantage of preserving the old data.

If, on the other hand, they are calling truncate(), you'll need to resort to watching file sizes.


Comment on Re: Reading log files that get overwritten

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2015-07-04 09:42 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 (59 votes), past polls