Skip site navigation (1)Skip section navigation (2)
Date:      18 Aug 2002 13:34:03 +0100
From:      Stacey Roberts <stacey@Demon.vickiandstacey.com>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        sroberts@dsl.pipex.com, FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: How to add service to log in newsyslog.conf?
Message-ID:  <1029674045.5163.9.camel@Demon.vickiandstacey.com>
In-Reply-To: <20020818122943.GE2079@happy-idiot-talk.infracaninophi>
References:  <1029631750.38776.229.camel@Demon.vickiandstacey.com> <20020818110909.GC2079@happy-idiot-talk.infracaninophi> <1029669916.5163.5.camel@Demon.vickiandstacey.com>  <20020818122943.GE2079@happy-idiot-talk.infracaninophi>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Thanks for the information Matthew.

Stacey

On Sun, 2002-08-18 at 13:29, Matthew Seaman wrote:
> On Sun, Aug 18, 2002 at 12:25:14PM +0100, Stacey Roberts wrote:
> 
> > I wasn't sure about the PID column and how to use it, didn't mean to
> > waste anyone's time here.
> 
> You only need to use the PID column for daemons that run persistently
> and log directly (ie. not via syslog(2)) to a file to which they keep
> an open file descriptor.  The daemon also needs to be programmed so
> that it will re-open its log files on receipt of a signal --- usually
> SIGHUP, but not always.  Sending a SIGHUP to syslogd(8) is handled
> automatically by newsyslog(1), so you don't need to add any extra
> configuration to support that.
> 
> For instance, apache httpd fulfils those criteria, and I have:
> 
>     # Nb. signal 30 == SIGUSR1 => graceful restart of apache
>     #
>     /var/log/httpd-access.log               644  20    100  *     Z   /var/run/httpd.pid 30
> 
> You can see if a daemon has a log file open for writing by using the
> fstat(1) command:
> 
>     happy-idiot-talk:~:% fstat /var/log/messages
>     USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME
>     root     syslogd       92    8 /var        170 -rw-r--r--     114  w  /var/log/messages
> 
> Since you're (presumably) running ftpd(8) out of inetd(8), which means
> that ftpd(8) doesn't run continually, you don't need to worry about
> signalling it to close and re-open its log files. The config you've
> set up will be fine.
> 
> 	Cheers,
> 
> 	Matthew
> 
> -- 
> Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
>                                                       Savill Way
> Tel: +44 1628 476614                                  Marlow
> Fax: +44 0870 0522645                                 Bucks., SL7 1TH UK
-- 
Stacey Roberts
B.Sc (HONS) Computer Science

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQEVAwUAPV+UOZvQeubckvvXAQGXPggAlU3yl+S/jAW9E/Qhr/s8JtH6e5+Vu7kg
jgOmWVg7ko8XZg7yPm5sGYqm7FprXPpXe5taAwLiMEYCEoPelQR5VDfhw8c0Mhmr
cdBDzA/NGXMk2VPZT9WEXPC8Q1jGEwZcYgJcapqAUjCboiFz5s9sLqAYhakUOPl3
jeKOZ/wTFLze7dyXxFUgfXK1dLW7stGlqf9X7VnwHmnuP8MEBANLbCme8LCZzpoe
zYESZeMTOP2ImFnLxRQbbM///sk/dLmxIrHcTVMXpe9nSiwfeJDEiH4dSYDDy6WE
cyLiJF+il7rF6ocyuvT1/ALBKhWPwqVJy58eqAcWnz5YhGonjVrDRQ==
=ULNS
-----END PGP SIGNATURE-----
help

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