From owner-freebsd-hackers Fri Jan 16 23:19:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA09766 for hackers-outgoing; Fri, 16 Jan 1998 23:19:30 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from panda.hilink.com.au (panda.hilink.com.au [203.8.15.25]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA09762 for ; Fri, 16 Jan 1998 23:19:23 -0800 (PST) (envelope-from danny@panda.hilink.com.au) Received: (from danny@localhost) by panda.hilink.com.au (8.8.5/8.8.5) id SAA03979; Sat, 17 Jan 1998 18:19:04 +1100 (EST) Date: Sat, 17 Jan 1998 18:19:04 +1100 (EST) From: "Daniel O'Callaghan" To: Tom cc: freebsd-hackers@FreeBSD.ORG Subject: Re: 2nd call for comments: New option for newsyslog In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk 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