From owner-freebsd-questions@FreeBSD.ORG Fri Nov 3 23:02:40 2006 Return-Path: X-Original-To: questions@FreeBSD.org 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 4BD1A16A403 for ; Fri, 3 Nov 2006 23:02:40 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from smtp6.server.rpi.edu (smtp6.server.rpi.edu [128.113.2.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id E3A7943D46 for ; Fri, 3 Nov 2006 23:02:39 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp6.server.rpi.edu (8.13.1/8.13.1) with ESMTP id kA3N2aVT029435; Fri, 3 Nov 2006 18:02:37 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: <20061104043357.S4041@lap.curtisjewell.boldlygoingnowhere.org> References: <20061104043357.S4041@lap.curtisjewell.boldlygoingnowhere.org> Date: Fri, 3 Nov 2006 18:02:35 -0400 To: Curtis Jewell , questions@FreeBSD.org From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) Cc: Subject: Re: Apache log rotation question... 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: Fri, 03 Nov 2006 23:02:40 -0000 At 5:02 AM +0900 11/4/06, Curtis Jewell wrote: > >My question really is, does newsyslog send the signal at the right >time [after the rotation is done, per > http://httpd.apache.org/docs/2.2/logs.html#rotation ] >and does it do the lines in order???) You can see what it will do by running newsyslog with the options of `-nv' to see what it would do, without it doing anything. Eg: newsyslog -nvvf /tmp/newsyslog.conf In your case you'd first want to use a different time in the entries you've added, just so the time to rotate is "this hour" (ie, whatever hour it is that you're running the program...). So, do that, and then run: newsyslog -nvf /tmp/newsyslog.conf You'll see that it first rotates all files that should be rotated for this run, then sends all signals it is supposed to send, then waits 10 seconds or so, and finally it compresses any of the old-files that it should compress. If you have a set of files which are all written to by a single process, then you should add the '/var/run/httpd.pid' to the newsyslog entry for *every* file that process writes to. The way newsyslog handles things, it will only send a single signal to any given process id, even if several different files from that process were rotated. Since all files have been rotated before the process is signalled, the process will only need to be signalled one time. Try the run with '-nv' to see exactly how it would work. -- Garance Alistair Drosehn = drosehn@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA