Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 May 1999 17:25:37 -0500
From:      "Matthew D. Fuller" <fullermd@futuresouth.com>
To:        Graeme Tait <graeme@echidna.com>
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Re: Web Statistics break up program.
Message-ID:  <19990518172537.B1539@futuresouth.com>
In-Reply-To: <37419A1F.5FD5@echidna.com>; from Graeme Tait on Tue, May 18, 1999 at 09:49:35AM -0700
References:  <Pine.BSF.4.10.9905171643420.17356-100000@parsons.csh.rit.edu> <374165EF.1BB22A14@eclipse.net.uk> <37419A1F.5FD5@echidna.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 18, 1999 at 09:49:35AM -0700, a little birdie told me
that Graeme Tait remarked
> 
> 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.

Actually, it's because Apache never closes the logfile, and the file
descriptor it open()'d will point to that file wherever you mv it.
A SIGHUP to Apache will make it close() and open() the logfile again, so
if you move it out of the way and resignal it, it will DTRT.



-- 

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
| Matthew Fuller    MF4839    http://www.over-yonder.net/ |
* fullermd@futuresouth.com       fullermd@over-yonder.net *
| UNIX Systems Administrator      Specializing in FreeBSD |
*   FutureSouth Communications   ISPHelp ISP Consulting   *
|  "The only reason I'm burning my candle at both ends,   |
*    is because I haven't figured out how to light the    *
|                     middle yet"                         |
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990518172537.B1539>