Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Feb 2000 01:32:13 -0500
From:      "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
To:        donv648@kfogmail.com
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Best way to really archive mail logs?
Message-ID:  <20000204013213.E42036@cc942873-a.ewndsr1.nj.home.com>
In-Reply-To: <m12GbuA-000G6BC@kfogmail.com>; from donv648@kfogmail.com on Fri, Feb 04, 2000 at 12:07:42AM -0600
References:  <m12GbuA-000G6BC@kfogmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 04, 2000 at 12:07:42AM -0600, donv648@kfogmail.com wrote:
> We need to keep a permanent copy of our maillog files. I have looked through newsyslog a bit and see the default for maillog rotation is...
> 
> /var/log/maillog              664  7     *    24    Z
> 
> Since cron fires this every hour at minute 0 I think this implies that once every hour newsyslog will evaluate whether the time since booting is divisible by 24, and rotate the logs if so. Is that right? The 24th hour since boot thing is where I'm stumped. I'm not seeing a clean way to get a copy via my own cron or whatever when the rotation is based on a time since the last boot (without creating our own "hours since boot" copier). Must be missing something. ???

First off, you seem to be missing the <enter>-key. Your paragraphs are
all on one line.

Second, where did you get the idea its 24 hours since _boot?_ From the
manpage,

     when    The when field can consist of an interval, a specific time, or
             both...
                                                                      ...If an
             interval is specified, the log file will be trimmed if that many
             hours have passed since the last rotation.

For your example, the maillog file is rotated whenever it has been 24
hours since newsyslog(8) last rotated it (i.e. when the file's
creation time is >24 hours). Where did booting ever come into this? 
-- 
Crist J. Clark                           cjclark@home.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000204013213.E42036>