From: Charles M Richmond <cmr@iisc.com>
Subject: Re: syslog.dated- changing log period?
Date: 1997/12/18 [thread overview]
Message-ID: <34993FE7.CB8606D5@iisc.com> (raw)
In-Reply-To: 882447391.7821.0.nnrp-03.9e982017@news.demon.co.uk
Andrew Ireland wrote:
>
> Hi,
>
> in the /etc/syslog.conf file, entries with the /var/adm/syslog.dated/<log
> file> have new
> log directories and log files created once per day (or when syslogd is
> restarted).
>
> Is there any way to configure syslog to create a log directory which will
> log files
> and create new directories say once per month?
>
There are two lines in the /var/spool/cron/crontabs/root entry that
are pertinent to the syslogd operation.
The following is the line that actually restarts the logging
process. As you can see, I have chosen midnight to start my logs.
If you want to only do this once a month then just change the '*' in
the 3d field to be the day of the month that you wish to start
your logs on.
0 0 * * * kill -1 `/bin/cat /var/run/syslog.pid`
The line below here is the line that controls how often the old
directories get purged. The key to this is the '-ctime' argument
in the 'find' cmd.
40 4 * * * find /var/adm/syslog.dated -depth -type d -ctime +5 -exec rm
-rf {} \;
Charlie
--
***********************************************************************
* Charles Richmond Integrated International Systems Corporation *
* cmr@iisc.com cmr@koibito.iisc.com cmr@shore.net *
* UNIX Internals, I18N, L10N, X, Realtime Imaging, and Custom S/W *
* One Longfellow Place Suite 3309 , Boston , Ma. USA 02114-2431 *
* (617) 723 7695 (617) 367 3151 FAX (617) 723 6861 *
***********************************************************************
next prev parent reply other threads:[~1997-12-18 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 [this message]
1997-12-19 5:00 ` Richard Beebe II
1997-12-18 5:00 ` Mark Hibberts
1997-12-18 5:00 ` Charles M Richmond
1997-12-19 5:00 ` Andrew Ireland
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