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
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
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;
ipt that runs all the time
to monitor log file
05/24/01 02:28
I have a simple little perl program that monitors the email log file for
rejected messages (see below). I start the program using "nohup script.pl &"
and it works fine, sending me an email with info about each rejected
message. However, it just dies out randomly after a day or so for no reason
tha