From owner-freebsd-arch Tue Feb 25 12:55:57 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2AFC337B405 for ; Tue, 25 Feb 2003 12:55:55 -0800 (PST) Received: from smtp-relay.omnis.com (smtp-relay.omnis.com [216.239.128.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id F01B243F75 for ; Tue, 25 Feb 2003 12:55:53 -0800 (PST) (envelope-from wes@softweyr.com) Received: from salty.rapid.stbernard.com (corp-2.ipinc.com [199.245.188.2]) by smtp-relay.omnis.com (Postfix) with ESMTP id EE3E542FC3; Tue, 25 Feb 2003 12:55:51 -0800 (PST) From: Wes Peters Organization: Softweyr.com To: Garance A Drosihn , arch@FreeBSD.ORG Subject: Re: NEWSYSLOG changes Date: Tue, 25 Feb 2003 12:55:48 -0800 User-Agent: KMail/1.5 References: <20030210114930.GB90800@melusine.cuivre.fr.eu.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200302251255.48219.wes@softweyr.com> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Monday 24 February 2003 18:08, Garance A Drosihn wrote: > At 11:35 PM -0500 2/20/03, Garance A Drosihn wrote: > > >I'll soon have a second update, which will implement "-R requestor", > >which Wes could then take advantage of with his syslog changes. > > Here is the second patch. This implements a -R option, where > -R requires a name of the requestor, and it also requires that > a list of filenames to rotate was given on the newsyslog command. > Right now the "requestor" is only used in the message added to > (non-binary) log files. > > The idea of -R is that newsyslog should always rotate the given > list of files, whether or not *it* thinks they need to be rotated. > It is only being used to govern how each of the files are rotated > (such as gzip vs bzip2, and how many backup copies to keep). Ah, good idea. We have the ability to "backup" a running system into a file that can be used to restore it later on. We'd like to essentially terminate all the log files in this backup and start the system with fresh logs. This change will help us do that as well. > For now it is assumed that the caller is the same process which > usually writes to the file, and thus it does NOT use the pid_file > to signal that process. The whole idea of this is to let Wes > change syslogd to use this, and it would be silly for newsyslog > to HUP syslogd when it's syslogd that is requesting the rotate. > It may be that we should handle the pid-file signalling a > different way. Uh, actually, syslogd needs the HUP to re-open the file. ;^) I can change that iff I run newsyslog -F, waiting for the "new" log file to appear. Let me think about how to best do that... Come to think of it, my current code doesn't do a very good job of reaping the child newsyslog processes. That's going to need some work anyhow, so I can probably do it there. I do like the idea of not needing a HUP signal between the two since syslogd started the newsyslog anyhow. I'll get this hacked up ASAP, then get some of these patches out for review. > This is meant to be the "minimal change that gets the job done". > I expect to make additional changes to newsyslog which will clean > this up a bit more (while cleaning up some other things too). > > Let me know if there are any better ideas for this. I'll probably > commit this on Thursday night unless there's some objections, or > if someone wants some more time to think about it. It sounds good to me. I'll review your patch, then dump it into my newsyslog for testing, so I can make sure I run newsyslog correctly. Thanks for the collaboration. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message