From owner-freebsd-arch Mon Feb 24 20:11:45 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 2A39937B401 for ; Mon, 24 Feb 2003 20:11:43 -0800 (PST) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8347243F3F for ; Mon, 24 Feb 2003 20:11:42 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.12.7/8.12.7) with ESMTP id h1P4Bf0H029509; Mon, 24 Feb 2003 23:11:41 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: Date: Mon, 24 Feb 2003 23:11:40 -0500 To: arch@FreeBSD.ORG From: Garance A Drosihn Subject: Re: NEWSYSLOG changes Cc: Wes Peters Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-RPI-Spam-Score: 0.2 () SIGNATURE_SHORT_DENSE,SPAM_PHRASE_01_02 X-Scanned-By: MIMEDefang 2.28 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 I sent this message about two hours ago, but it seems to have just disappeared. I'll send it again, but this time I'll include a URL to the patch instead of including the whole patch in the message... At 11:35 PM -0500 2/20/03, Garance A Drosihn wrote: >What follows is part #1 of what I plan to do. This adds the >notion of a "default rotation action" to newsyslog. This >action will *only* be significant when newsyslog is run with >a specific list of filenames. The patch from the earlier message has been committed to -current. No man page yet, but I'll do that before MFC'ing any of this. >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). 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. 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. I have only tested this a little bit, so I may also delay until Sunday if I haven't had time to do testing between now and Thursday. The patch is available at: http://people.freebsd.org/~gad/newsyslog/option-R.diff -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message