goto 10
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Craig
Small
Sent: Thursday, May 11, 2006 6:04 AM
To: jffnms-users@lists.sourceforge.net
Subject: Re: [jffnms-users] A suggestion: logfile poller

On Wed, May 10, 2006 at 07:09:41AM +0100, Craig Burton wrote:
> Just one thought though - your offset recording will work most of the 
> time, but you will need to keep an eye out for automatic log-file 
> rotation which would require this to be reset.  Probably easiest to 
> record the file size at each poll.  If it has gone down since last
time, then reset the file offset.
That's actually pretty easy to detect. You can either stat() the file
first to check it's size or when you seek() it the seek will fail.

I'd probably use stat as I'd be able to early bomb-out if the size is
the same and the modified date not changed.

 - Craig
-- 
Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA
DFA5
Eye-Net Consulting http://www.enc.com.au/   MIEE         Debian
developer
csmall at : enc.com.au                      ieee.org
debian.org


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jffnms-users mailing list
jffnms-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jffnms-users


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
jffnms-users mailing list
jffnms-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to