Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 May 1999 21:15:33 -0700 (PDT)
From:      Roger Marquis <marquis@roble.com>
To:        freebsd-isp@FreeBSD.ORG
Subject:   Re: Web Statistics break up program.
Message-ID:  <Pine.GSO.3.96.990522210859.16625B-100000@roble2.roble.com>
In-Reply-To: <199905210016.KAA08044@metva.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 21 May 1999, Enno Davids wrote:
> The correct solution, is to 'mv' your logfile
> to another temporary name in the same filesystem, then null the real name &
> reset owners and permissions, then signal apache and then move the logfile
> away to the archived name.

The "correct" solution is to do whatever works on your system.  For 99%
of apache websites there is no need to HUP the httpd daemon and
interrupt transfers in progress.

And if anyone has been able to produce a race condition with "cp
logfile logfile.bk;cp /dev/null logfile" they haven't spoken up.
Having used this technique for years without a race condition it would
appear to be a false alarm.

The one disadvantage of copying /dev/null is that it is possible to
lose log entries on busy servers however, from checking log files and
rotated logfiles, it would have to be an extremely busy server to lose
log entries.

--
Roger Marquis
Roble Systems Consulting
http://www.roble.com/



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?Pine.GSO.3.96.990522210859.16625B-100000>