Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 1998 18:19:04 +1100 (EST)
From:      "Daniel O'Callaghan" <danny@panda.hilink.com.au>
To:        Tom <tom@sdf.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: 2nd call for comments: New option for newsyslog
Message-ID:  <Pine.BSF.3.91.980117160511.29251O-100000@panda.hilink.com.au>
In-Reply-To: <Pine.BSF.3.95q.980116194352.7431A-100000@misery.sdf.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri, 16 Jan 1998, Tom wrote:

> 
> On Sat, 17 Jan 1998, Daniel O'Callaghan wrote:
> 
> > I'm added a '-m' option to newsyslog which will allow it to process log 
> ...
> > Does anyone have any comments, positive or negative, about this extension 
> > to newsyslog?  I'd like to get this reviewed and into 2.2.6.
> 
>   I submitted on the PRs on this issue...
> 
>   "-m" seems a bit specific.  What about weekly and daily options too?  If
> you do, newsyslog starts looking a lot like cron.  Using newsyslog to
> rotate non-syslog created log files is rather a stretch.  Using newsyslog
> for non-text "logs" is even more of stretch.

>   Perhaps wtmp rotation should just be done by cron right in the monthly
> script, where the accounting processing happens?

Valid points, but I don't see any reason not to use newsyslog for 
rotating a logfile.  newsyslog has the nice feature of rotating on size, 
which is irrelevant to the current problem, but it also gzips and rotates 
the gzipped files, which is nice.  Why create a bunch of Bourne shell 
commands, when an entry in newsyslog.conf will suffice?

As for the daily and weekly options, there are always 24 hours in a day
and 168 hours in a week, so fixed period rotations are correctly handled. 
Or are they?  In fact, rotating every 24 or 168 hours may not be what was
wanted, if the sysadmin really wants the files rotated as close as
possible to midnight with the week starting on Sunday. 

So maybe what is needed is a flag to newsyslog which tells it to process 
daily, weekly and monthly entries, and newsyslog itself can decide 
whether today is the first day of the week or month.

Danny




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.980117160511.29251O-100000>