Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Feb 2003 23:11:40 -0500
From:      Garance A Drosihn <drosih@rpi.edu>
To:        arch@FreeBSD.ORG
Cc:        Wes Peters <wes@softweyr.com>
Subject:   Re: NEWSYSLOG changes
Message-ID:  <p05200f21ba809be07149@[128.113.24.47]>

next in thread | raw e-mail | index | archive | help
    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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05200f21ba809be07149>