View previous topic :: View next topic |
Author |
Message |
houtworm Guru
Joined: 08 Mar 2003 Posts: 391 Location: Den Haag, Netherlands
|
Posted: Wed Apr 12, 2006 12:54 am Post subject: tail and truncated logfile (solved) |
|
|
To monitor my postfix logfile, I use:
tail -f /var/log/mail.log | egrep 'NOQUEUE|delivered'
At the daily maintenance, the logfile is truncated and tail just stops monitoring. I have to ^C and restart
Is there a solution for this? Perhaps another monitoring program or a script that restarts tail?
--Kees _________________ niemand is onbekwamer, dan een timmerman zonder hamer
Kees
Last edited by houtworm on Thu Apr 13, 2006 2:34 am; edited 1 time in total |
|
Back to top |
|
|
limn l33t
Joined: 13 May 2005 Posts: 997
|
Posted: Wed Apr 12, 2006 12:26 pm Post subject: |
|
|
Perhaps this will work:
Code: | tail -F /var/log/mail.log | egrep 'NOQUEUE|delivered' |
|
|
Back to top |
|
|
houtworm Guru
Joined: 08 Mar 2003 Posts: 391 Location: Den Haag, Netherlands
|
Posted: Thu Apr 13, 2006 2:34 am Post subject: |
|
|
Yeeeeah! that works limn !!
tail: `/var/log/mail.log' has been replaced; following end of new file
thanks! _________________ niemand is onbekwamer, dan een timmerman zonder hamer
Kees |
|
Back to top |
|
|
|