Re: script that runs all the time to monitor log file

2001-05-25 Thread Gary Stainburn
This sounds like a logrotate problem. Do you have logrotate controlling this log file. I may be wrong, but I think if you have the file open when logrotate kicks in, you filehandle will stay on the same file. i.e. you open /var/log/maillog logrotate removes /var/log/maillog.4 it then renames 3

Re: script that runs all the time to monitor log file

2001-05-24 Thread Walt Mankowski
On Thu, May 24, 2001 at 02:37:18PM -0400, Craig Moynes/Markham/IBM wrote: > > This is a problem with tail that I have run into as well. > > If the file size gets reset the stored location of EOF remains the same > which is a problem. As the file is written too the size is still below that > of w

RE: script that runs all the time to monitor log file

2001-05-24 Thread Peter Cornelius
Is there another way I should be approaching this task? How about not using tail? I'm just ripping this off from the 'Perl Cookbook' but: for (;;) { #ever and ever while () # Do your thing } sleep $awhile;

Re: script that runs all the time to monitor log file

2001-05-24 Thread Craig Moynes/Markham/IBM
This is a problem with tail that I have run into as well. If the file size gets reset the stored location of EOF remains the same which is a problem. As the file is written too the size is still below that of what tail is looking at. You can add a stat check to watch filesize and reset the coun