From owner-freebsd-questions@FreeBSD.ORG Thu Apr 24 11:00:23 2003 Return-Path: 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 B10F337B401 for ; Thu, 24 Apr 2003 11:00:23 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFFDD43FBD for ; Thu, 24 Apr 2003 11:00:19 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h3OI0A8x013411 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Apr 2003 19:00:10 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)h3OI0AgR013410; Thu, 24 Apr 2003 19:00:10 +0100 (BST) (envelope-from matthew) Date: Thu, 24 Apr 2003 19:00:10 +0100 From: Matthew Seaman To: admin2 Message-ID: <20030424180010.GA83485@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , admin2 , freebsd-questions@freebsd.org References: <20030424173133.M5943@enabled.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline In-Reply-To: <20030424173133.M5943@enabled.com> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-35.6 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MUTT version=2.53 X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp) cc: freebsd-questions@freebsd.org Subject: Re: newsyslog configuration issues X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2003 18:00:24 -0000 --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--