Re: log file rotation in hamm...
On Thu, 30 Jul 1998, Alan Su wrote:
: OK, both Norman and Shaleh didn't understand my question. i can only
: conclude that i'm an idiot. =) here's a second shot:
No, you're no idiot. I may be, however, for not understanding the
question completely.
: these are the output of 'syslogd-listfiles' and
: 'syslogd-listfiles --weekly':
:
: alsu# syslogd-listfiles
: /var/log/syslog
: alsu# syslogd-listfiles --weekly
: /var/log/messages
: /var/log/mail.warn
: /var/log/mail.err
: /var/log/mail.info
: /var/log/uucp.log
: /var/log/lpr.log
: /var/log/user.log
: /var/log/ppp.log
: /var/log/kern.log
: /var/log/auth.log
: /var/log/mail.log
: /var/log/daemon.log
: /var/log/debug
:
: /etc/cron.daily calls 'syslogd-listfiles' and concludes that
: /var/log/syslog should be rotated daily. /etc/cron.weekly calls
: 'syslogd-listfiles --weekly' and rotates all the other logs on a
: weekly basis.
Correct :)
: the change i want to make is to rotate /var/log/syslog on a *weekly*
: basis, rather than a daily basis. as Shaleh points out, this
: particular modification can be accomplished by simply moving
: /etc/cron.daily/sysklogd to /etc/cron.weekly/sysklogd2 or something.
Hmm, I think the better way would be to comment out the following lines
in /etc/cron.daily/sysklogd
for LOG in `syslogd-listfiles`
do
if [ -f $LOG ]; then
savelog -g adm -m 640 -u root -c 7 $LOG >/dev/null
fi
done
and then adding those lines to /etc/cron.weekly/sysklogd.
I hadn't noticed that `syslogd-listfiles -w' didn't include syslog as
one of the files to rotate.
: i claim this isn't the Debian Way, but rather a hack. for example,
: how would one make /var/log/messages rotate daily rather than weekly?
: i would like a way for 'syslogd-listfiles' and
: 'syslogd-listfiles --weekly' to output something like the following:
:
: alsu# syslogd-listfiles
: /var/log/syslog
: /var/log/messages
: alsu# syslogd-listfiles --weekly
: /var/log/mail.warn
: /var/log/mail.err
: /var/log/mail.info
: /var/log/uucp.log
: /var/log/lpr.log
: /var/log/user.log
: /var/log/ppp.log
: /var/log/kern.log
: /var/log/auth.log
: /var/log/mail.log
: /var/log/daemon.log
: /var/log/debug
:
: it seems to me that there should be a way to do this, but currently it
: requires an act of god, or at least some really gross changes to
: /etc/syslog.conf which will probably change the way stuff gets logged.
: (i admit, i don't really understand what facilities and priorities
: are, which is what syslogd-listfiles uses to decide when things need
: to be logged.)
The sysklogd script in /etc/cron.daily suggests you call
`syslogd-listfiles' and run it through grep.
: looked at it another way, my question could be, "why doesn't
: syslogd-listfiles have it's own config file which describes directly
: when things should be rotated, rather than inferring that from
: /etc/syslog.conf?"
I agree that this would be the optimal solution. Perhaps one of us
should code it? :)
--
Nathan Norman
MidcoNet - 410 South Phillips Avenue - Sioux Falls, SD 57104
mailto://finn@midco.net http://www.midco.net
finger finn@kepler.midco.net for PGP Key: (0xA33B86E9)
--
Unsubscribe? mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
Reply to: