From owner-freebsd-isp Tue May 18 6:51:16 1999 Delivered-To: freebsd-isp@freebsd.org Received: from loviatar.webcom.com (loviatar.webcom.com [209.1.28.41]) by hub.freebsd.org (Postfix) with ESMTP id EB81E14A2D for ; Tue, 18 May 1999 06:50:04 -0700 (PDT) (envelope-from graeme@echidna.com) Received: from kigal.webcom.com (kigal.webcom.com [209.1.28.57]) by loviatar.webcom.com (8.9.1/8.9.1) with SMTP id GAA17255; Tue, 18 May 1999 06:49:55 -0700 Received: from [204.143.69.43] by inanna.webcom.com (WebCom SMTP 1.2.1) with SMTP id 33542760; Tue May 18 06:46 PDT 1999 Message-Id: <37419A1F.5FD5@echidna.com> Date: Tue, 18 May 1999 09:49:35 -0700 From: Graeme Tait Organization: Echidna X-Mailer: Mozilla 2.02 (Win16; I) Mime-Version: 1.0 To: Stuart Henderson Cc: Mike Fisher , freebsd-isp@freebsd.org Subject: Re: Web Statistics break up program. References: <374165EF.1BB22A14@eclipse.net.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Stuart Henderson wrote: > > Mike Fisher wrote: > > I don't think that will work, as-is. I think that it is necessary > > to send apache a signal to get it to rotate its logs. > > Very true, this will do the trick: > > kill -1 `cat /var/run/httpd.pid` > > Otherwise Apache will start writing at the same offset > i.e. leave a load of blank space at the start of the new > log file. I'm not sure whether this is written as a > sparse file or not (if so it's not too much of a problem > but the reported size might end up a little scary :) I'm missing some context here as I didn't see the post from Mike Fisher, but the above is not what I observe, if you do say mv httpd-access.log httpd-access.log.$TODAY (within the one filesystem). Apache continues to append to the renamed file until signalled - it doesn't start a new file. I assume that what's happening here is that the inode number of the file is what counts, and the inode number is unchanged in the mv. If it started a new file after the mv, then presumably it could do that before the SIGHUP with a busy server. -- Graeme Tait - Echidna To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message