Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 1999 14:41:46 +0200
From:      Udo Schweigert <ust@cert.siemens.de>
To:        isdn@freebsd.org
Subject:   Re: Rename on SIGUSR1 for isdnd
Message-ID:  <19990519144146.C92396@alaska.cert.siemens.de>
In-Reply-To: <37429F87.910F1A95@nl.compuware.com>; from Bert Driehuis on Wed, May 19, 1999 at 01:24:55PM %2B0200
References:  <m10k0sp-0000fgC@hcswork.hcs.de> <374288D1.8D3F25DD@scc.nl> <37429F87.910F1A95@nl.compuware.com>

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




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