Re: [Networker] large messages file
2007-05-12 08:36:00
I setup a seperate startup script that runs the unix standard logrotator
command. Run this script before Networker startup.
/etc/rc2.d/S78networker-logrotate
more /etc/init.d/networker-logrotate
#!/bin/sh
#(echo 'rotating NetWorker Messages:') > /dev/console
#if [ -f /usr/local/sbin/logrotate ]; then
# (/usr/local/sbin/logrotate /opt/local/etc/networker-
logrotate.conf; /bi
n/sleep 15) > /dev/console 2>&1
# (echo 'rotated Networker Messages') > /dev/console
#fi
This is what my logrotator.conf for networker looks like
# sample logrotate configuration file
daily
rotate 21
create
compress
missingok
/nsr/logs/messages {
olddir /nsr/logs/OLD
prerotate
/etc/init.d/networker stop
endscript
}
I like this approach for a couple reasons.
1. I can tell by looking at the dates of the rotated messages files when
my server was rebooted.
2. Networker writes to the messages file through the syslog daemon and I
know the syslog daemon has been restarted at boot.
Why hasn't EMC/Legato provided a built in log rotation of the messages
file yet? This has been a problem for many, many, years.
Nancy Magers
Brown University - CIS
To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the body of the email. Please write to
networker-request AT listserv.temple DOT edu if you have any problems with this
list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
|
|
|