From owner-freebsd-hackers Sat Oct 27 15:22:47 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp.noos.fr (verlaine.noos.net [212.198.2.73]) by hub.freebsd.org (Postfix) with ESMTP id 2F79C37B401 for ; Sat, 27 Oct 2001 15:22:43 -0700 (PDT) Received: (qmail 1209040 invoked by uid 0); 27 Oct 2001 22:22:41 -0000 Received: from unknown (HELO gits.dyndns.org) ([212.198.229.145]) (envelope-sender ) by 212.198.2.73 (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 27 Oct 2001 22:22:41 -0000 Received: (from root@localhost) by gits.dyndns.org (8.11.6/8.11.6) id f9RMMeZ76727; Sun, 28 Oct 2001 00:22:40 +0200 (CEST) (envelope-from root) Message-Id: <200110272222.f9RMMeZ76727@gits.dyndns.org> Subject: Re: syslogd and kqueue In-Reply-To: <20011027043342.A18231@parhelion.firedrake.org> To: void Date: Sun, 28 Oct 2001 00:22:40 +0200 (CEST) Cc: Kris Kennaway , hackers@FreeBSD.ORG Reply-To: clefevre@citeweb.net From: Cyrille Lefevre Organization: ACME X-Face: X-Mailer: ELM [version 2.4ME+ PL94c (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG void wrote: > On Fri, Oct 26, 2001 at 08:04:36PM -0700, Kris Kennaway wrote: > > On Fri, Oct 26, 2001 at 11:39:57PM +0100, void wrote: > > > If syslogd used the kqueue interface, I believe it could open a new log > > > file as soon as it was created, rather than waiting to receive a signal. > > > Would this be worth doing, or would it be too big a divergence from the > > > traditional behavior? > > > > I assume you mean "as soon as the configuration file is modified"? > > That would be a big violation of POLA. > > No ... > > The traditional log-rotation dance goes something like: > > mv log log.0 > touch log never do a mv/touch on a log file to avoid full filled file systems, use cp instead... cp log log.0 (there is a delta here which can be handled w/ tail -0 -f) cp /dev/null log this has the advantage to work w/ every daemons, even the ones wich don't handle SIGHUP as well as simple redirections (daemon > log). > kill -1 `cat /var/run/syslogd.pid` > gzip log.0 Cyrille. -- Cyrille Lefevre mailto:clefevre@citeweb.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message