Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
tail and truncated logfile (solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
houtworm
Guru
Guru


Joined: 08 Mar 2003
Posts: 391
Location: Den Haag, Netherlands

PostPosted: Wed Apr 12, 2006 12:54 am    Post subject: tail and truncated logfile (solved) Reply with quote

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
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Wed Apr 12, 2006 12:26 pm    Post subject: Reply with quote

Perhaps this will work:
Code:
tail -F /var/log/mail.log | egrep 'NOQUEUE|delivered'
Back to top
View user's profile Send private message
houtworm
Guru
Guru


Joined: 08 Mar 2003
Posts: 391
Location: Den Haag, Netherlands

PostPosted: Thu Apr 13, 2006 2:34 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum