From: "Andrew Ireland" <andy@ascada.demon.co.uk>
Subject: Re: syslog.dated- changing log period?
Date: 1997/12/19 [thread overview]
Message-ID: <882528887.8470.0.nnrp-01.9e982017@news.demon.co.uk> (raw)
In-Reply-To: 882447391.7821.0.nnrp-03.9e982017@news.demon.co.uk
Andrew Ireland wrote in message
<882447391.7821.0.nnrp-03.9e982017@news.demon.co.uk>...
>Is there any way to configure syslog to create a log directory which will
>log files
>and create new directories say once per month?
Thanks to all who replied, here I am answering my own question.
#!/bin/ksh
month=`date +"%b"`
echo "local1.info /var/adm/syslog/log.$month" >
/etc/syslog.conf.monthly
#
# in /etc we have a copy of the original daily log, called syslog.conf.daily
# cat the daily and the monthly file together to /etc/syslog.conf
#
cat /etc/syslog.conf.daily /etc/syslog.conf.monthly > /etc/syslog.conf
#
# it doesn't matter if we overwrite the old syslog.conf file as the syslogd
# will have a note of all the file descriptors
#
If this is run in the root cron script at the beginning of the month
_before_ the
daily restart then when the syslog restarts on the new month it will create
the new files.
prev parent reply other threads:[~1997-12-19 5:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-12-18 5:00 syslog.dated- changing log period? Andrew Ireland
1997-12-18 5:00 ` Charles M Richmond
1997-12-18 5:00 ` Mark Hibberts
1997-12-18 5:00 ` Charles M Richmond
1997-12-19 5:00 ` Richard Beebe II
1997-12-19 5:00 ` Andrew Ireland [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox