From owner-freebsd-isdn Wed May 19 5:41:57 1999 Delivered-To: freebsd-isdn@freebsd.org Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by hub.freebsd.org (Postfix) with ESMTP id 056D41549B for ; Wed, 19 May 1999 05:41:49 -0700 (PDT) (envelope-from ust@cert.siemens.de) X-Envelope-Sender-Is: ust@cert.siemens.de (at relayer david.siemens.de) Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.9.3/8.9.3) with ESMTP id OAA28708 for ; Wed, 19 May 1999 14:41:48 +0200 (MET DST) Received: from mars.cert.siemens.de (ust.mchp.siemens.de [139.23.201.17]) by mail1.siemens.de (8.9.3/8.9.3) with ESMTP id OAA03072 for ; Wed, 19 May 1999 14:41:48 +0200 (MET DST) Received: from alaska.cert.siemens.de (alaska.cert.siemens.de [139.23.202.134]) by mars.cert.siemens.de (8.9.3/8.9.3/Siemens CERT [ $Revision: 1.9 ]) with ESMTP id OAA11447 for ; Wed, 19 May 1999 14:41:46 +0200 (CEST) Received: (from ust@localhost) by alaska.cert.siemens.de (8.9.3/8.9.3/alaska [ $Revision: 1.2 ]) id MAA92704 for isdn@freebsd.org; Wed, 19 May 1999 12:41:46 GMT (envelope-from ust) Date: Wed, 19 May 1999 14:41:46 +0200 From: Udo Schweigert To: isdn@freebsd.org Subject: Re: Rename on SIGUSR1 for isdnd Message-ID: <19990519144146.C92396@alaska.cert.siemens.de> References: <374288D1.8D3F25DD@scc.nl> <37429F87.910F1A95@nl.compuware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: <37429F87.910F1A95@nl.compuware.com>; from Bert Driehuis on Wed, May 19, 1999 at 01:24:55PM +0200 X-Operating-System: FreeBSD 3.2-STABLE Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, May 19, 1999 at 01:24:55PM +0200, Bert Driehuis wrote: > Marcel Moolenaar wrote: > > > The reason for the patch is more "emotional" than technical. Firstly, I don't > > like fiddling with things that are under the control of running programs. It > > makes matters more complicated than strictly necessary. Secondly, I like > > clear functionality. Closing and reopening files makes sense only when > > accompanied by some external (from the isdnd point of view) action. > > Rotation policy should probably be implemented in a shell script. Daemons > that rotate their own logfile just make things more complicated. The > "correct" way of handling it is to let the daemon close and the re-open > the log file upon receipt of a signal, so that the admin can create a > script that does > > mv isdnd.log isdnd.log.0 > kill -1 `cat /var/run/isdnd.pid` > gzip -9 isdnd.log.0 > > or whatever s/he deems appropriate. > I suggest using newsyslog(8). Adding a line like: /var/log/isdn.log 664 100 * 168 Z /var/run/isdnd.pid to /etc/newsyslog.conf will do the job (here: once a week, for the next 100 weeks) with compression of the old log. This is the standard method for other daemons (apache, etc.). Regards Udo ------------------------------------------------------------------------------- Udo Schweigert || Voice : +49 89 636 42170 Siemens AG, Siemens CERT || Fax : +49 89 636 48000 ZT IK 3 || email : Udo.Schweigert@mchp.siemens.de D-81730 Muenchen / Germany || : ust@cert.siemens.de PGP fingerprint || 2A 53 F6 A6 30 59 64 02 6B C4 E0 73 B2 C9 6C E7 ------------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message