Date: Thu, 24 Apr 2003 19:00:10 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: admin2 <admin2@enabled.com> Cc: freebsd-questions@freebsd.org Subject: Re: newsyslog configuration issues Message-ID: <20030424180010.GA83485@happy-idiot-talk.infracaninophi> In-Reply-To: <20030424173133.M5943@enabled.com> References: <20030424173133.M5943@enabled.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 24, 2003 at 09:32:50AM -0800, admin2 wrote: =20 > FreeBSD 4.7 Stable >=20 > can anybody recommend how to properly configure newsyslog for log files t= hat > are constantly opened and written. Some of my log files rotate but the n= ew > log file can never written to. It depends which process is holding an open descriptor on the file. Many daemons can be persuaded to restart on receipt of a signal -- that includes closing and reopening logfiles. Check man pages to see if it's possible and what signal to use for the purpose. For example, apache can be persuaded to do a graceful restart on receipt of a SIGUSR1 (signal 30), so the following newsyslog.conf line will prevent the httpd-access.log growing without bound: /var/log/httpd-access.log 644 20 100 * Z /var/= run/httpd.pid 30 If your process doesn't support this sort of restart, and you can't configure it to log via syslog, but you can log to a pipe rather than a regular file, then you may be able to use something like cronolog -- (ports/sysutils/cronolog, http://www.cronolog.org/) Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --6c2NcOVqGQ03X4Wi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+qCYqdtESqEQa7a0RAt5yAJ9L9qAqYhIGo0gdz0Ex5DdoACtnwACeIWGx si0OSnOW5uQCmzfPC3WyIvs= =3N4q -----END PGP SIGNATURE----- --6c2NcOVqGQ03X4Wi--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030424180010.GA83485>