From owner-freebsd-questions@FreeBSD.ORG Sat Mar 24 18:48:05 2007 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 168E616A400 for ; Sat, 24 Mar 2007 18:48:05 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (imap.infracaninophile.co.uk [81.187.76.162]) by mx1.freebsd.org (Postfix) with ESMTP id 6C61C13C4C5 for ; Sat, 24 Mar 2007 18:48:04 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from [IPv6:::1] (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.13.8/8.13.8) with ESMTP id l2OIljiq040861; Sat, 24 Mar 2007 18:47:45 GMT (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <4605724B.6000000@infracaninophile.co.uk> Date: Sat, 24 Mar 2007 18:47:39 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 1.5.0.10 (X11/20070308) MIME-Version: 1.0 To: Jeffrey Goldberg References: In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig1E7BD8D2D25F03E83843B15F" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (smtp.infracaninophile.co.uk [IPv6:::1]); Sat, 24 Mar 2007 18:48:00 +0000 (GMT) X-Virus-Scanned: ClamAV 0.90.1/2921/Sat Mar 24 13:52:12 2007 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_POLICY_TESTING, DK_POLICY_SIGNSOME,NO_RELAYS autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on happy-idiot-talk.infracaninophile.co.uk Cc: questions@freebsd.org Subject: Re: log rotation recommendations X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2007 18:48:05 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1E7BD8D2D25F03E83843B15F Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Jeffrey Goldberg wrote: > Having recently moved from Linux (SuSE) to FreeBSD (6.2-p3) I'm > wondering what the recommended way of rotating logs (principally postfi= x > and apache). I see that logrotate, with which I'm familiar, is in > ports. I also see that there is a file /etc/newsyslog.conf, but it > looks like newsyslog(8) only knows about HUPping syslogd. Not so. The optional 7th field in /etc/newsyslog.conf can contain a file name to read a PID out of: that PID will be signalled when the log is rotated. The optional 8th column can contain the signal number to use -- by default SIGHUP is sent. The newsyslog.conf(5) man page explains all this in great detail. Certainly for apache, you might alternatively consider the use of rotatelogs(8) (comes with apache) or cronolog(8) (in ports as sysutils/cronolog). Or, indeed, logrotate if that's what you prefer. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig1E7BD8D2D25F03E83843B15F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGBXJQ8Mjk52CukIwRCA4gAJ9tD8chInAYj3tw/y2Y9KUfn60KbgCfSV6Y AUYlI9xoS0G8wHnHhA/Rxqo= =C9bd -----END PGP SIGNATURE----- --------------enig1E7BD8D2D25F03E83843B15F--