Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Feb 2000 18:28:48 -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:  <20000204182848.A44997@cc942873-a.ewndsr1.nj.home.com>
In-Reply-To: <m12Gec6-003GIMC@kfogmail.com>; from donv648@kfogmail.com on Fri, Feb 04, 2000 at 03:01:14AM -0600
References:  <m12Gec6-003GIMC@kfogmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 04, 2000 at 03:01:14AM -0600, donv648@kfogmail.com wrote:
> > First off, you seem to be missing the <enter>-key.
> > Your paragraphs are all on one line.
> 
> My apologies for the line length. POPMail (inc)...
> 
> > Second, where did you get the idea its 24 hours since
> > _boot?_
> 
> Is that not true? If first boot is at 10:05am, cron will
> run newsyslog at 11:00 and each subsequent hour. I read
> this to mean the rotation origin is set to 11:00 every day,
> no?

No. When the machine runs newsyslog at 1100, if the /var/log/maillog
file is more than 24 hours old, then it will be rotated and rotated
again after 24 hours, the next day at 1100. However, if the file was
less than 24 hours old, newsyslog will do nothing.

Your scenario is true of the file is >=24 hours old when syslog is
first run, but not true if the file is younger.

> > Manpage...
> > 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? 
> 
> I think the solution is to change the newsyslog.conf entry
> to use a predictable absolute time so we don't have to
> determine newsyslog's hour of rotation before we make our
> copy. Does this sound right or am I still climbing the
> wrong tree?

I'm not precisely sure what you want to do, but in FreeBSD 3.x,
newsyslog will rotate logs at a specific time of day, rather than
intervals. So, if it is what you want, go ahead.
-- 
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?20000204182848.A44997>