From owner-freebsd-questions Sun Aug 18 5:33:34 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC4A237B405 for ; Sun, 18 Aug 2002 05:33:25 -0700 (PDT) Received: from shockwave.systems.pipex.net (shockwave.systems.pipex.net [62.241.160.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE7EE43E42 for ; Sun, 18 Aug 2002 05:33:24 -0700 (PDT) (envelope-from stacey@Demon.vickiandstacey.com) Received: from Demon (81-86-129-77.dsl.pipex.com [81.86.129.77]) by shockwave.systems.pipex.net (Postfix) with ESMTP id 749CD16000BD1; Sun, 18 Aug 2002 13:33:21 +0100 (BST) Subject: Re: How to add service to log in newsyslog.conf? From: Stacey Roberts Reply-To: sroberts@dsl.pipex.com To: Matthew Seaman Cc: sroberts@dsl.pipex.com, FreeBSD Questions 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> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-mSr2h1jnMeowRU9SqUUR" X-Mailer: Ximian Evolution 1.0.8 Date: 18 Aug 2002 13:34:03 +0100 Message-Id: <1029674045.5163.9.camel@Demon.vickiandstacey.com> Mime-Version: 1.0 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=-mSr2h1jnMeowRU9SqUUR Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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: >=20 > > I wasn't sure about the PID column and how to use it, didn't mean to > > waste anyone's time here. >=20 > 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. >=20 > For instance, apache httpd fulfils those criteria, and I have: >=20 > # Nb. signal 30 =3D=3D SIGUSR1 =3D> graceful restart of apache > # > /var/log/httpd-access.log 644 20 100 * Z /va= r/run/httpd.pid 30 >=20 > You can see if a daemon has a log file open for writing by using the > fstat(1) command: >=20 > 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 >=20 > 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. >=20 > Cheers, >=20 > Matthew >=20 > --=20 > 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 --=20 Stacey Roberts B.Sc (HONS) Computer Science --=-mSr2h1jnMeowRU9SqUUR Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----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----- --=-mSr2h1jnMeowRU9SqUUR-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message