[TriLUG] tail across logrotate

M. Mueller at Signalnetware.com mmueller at signalnetware.com
Thu Mar 21 16:47:53 EST 2002


On Thursday 21 March 2002 03:20 pm, you wrote:
> Have logrotate kick off the command for you.  It has a section for running
> external commands on completion of the log rotate.
>
> BTW: WTF r u doing?  I have some similar processes that I use for
> monitoring firewall access, but I start and stop them on the hour,
> switching log files hourly

Using syslogd and cron-logrotate to manage endless stream of operational 
info. on the AxonSG which turns the entire platform into a multiprotocol 
router: http://www.signalnetware.com/arch.jpg

The logrotate stanza for /var/log/messages in /etc/logrotate.d/syslog is as 
follows:

/var/log/messages {
    daily
    rotate 7
    postrotate
 	/usr/bin/killall -HUP syslogd
    endscript
}

When I run 
$ tail -f --pid=$(cat /var/run/the_daemon.pid) the_daemon.log &
$ ps -axj
$ logrotate -f /etc/logrotate.conf
$ ps -axj

I see the files get rotated, but I see no change in /var/run/syslogd.pid and 
I see that the tail is still running.

Should I do a hard stop and restart instead of -HUP on syslogd?

-- 
Michael Mueller
Signalnetware, Inc.
www.signalnetware.com
919.621.6090
Converged network solutions using open source tools



More information about the TriLUG mailing list