[268] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: cron logs and logrotate (fwd)

daemon@ATHENA.MIT.EDU (Dan Hopper)
Mon Oct 21 18:46:09 1996

From: Dan Hopper <dhopper@brisco.telogy.com>
To: redhat-list@redhat.com
Date: Mon, 21 Oct 1996 13:04:58 -0400 (EDT)
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

Forwarded message:
> From: Erik Troan <ewt@redhat.com>
> To: redhat-list@redhat.com
> Subject: Re: cron logs and logrotate 
> On Wed, 25 Sep 1996, Jos Vos wrote:
> 
> > This is a problem, I think (we can't signal syslogd in advance, so...).
> > 
> > Any solution for this?
> 
> cd /var/log
> mv messages messages.old
> killall -HUP syslogd 
> killall -HUP klogd
> # do whatever with messages.old
> 
> This type logic needs to be built into the log rotator.
> 
> Erik

One should be careful with this type of procedure when using the logrotate
script.  For example, the first time, you move the logs to a temp dir, run
logrotate on them, it doesn't do anything because it's the first time, then
the next time your cron job runs, you move the new logs on top of the old
ones in the temp dir, losing the initial logs instead of rotating them.  

Doubtless integrating this type of logic into the script could be made to
work as desired.

Dan


--
  PLEASE read the Red Hat FAQ, Tips, HOWTO and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-HOWTO 
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post