Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 May 1999 17:26:22 -0500
From:      "Matthew D. Fuller" <fullermd@futuresouth.com>
To:        Roger Marquis <marquis@roble.com>
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Re: Web Statistics break up program.
Message-ID:  <19990518172622.C1539@futuresouth.com>
In-Reply-To: <Pine.GSO.3.96.990517151403.24114A-100000@roble2.roble.com>; from Roger Marquis on Tue, May 18, 1999 at 07:13:21AM -0700
References:  <199905172017.VAA08078@post.mail.areti.net> <Pine.GSO.3.96.990517151403.24114A-100000@roble2.roble.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 18, 1999 at 07:13:21AM -0700, a little birdie told me
that Roger Marquis remarked
> This will create an archived logfile (http.site.May_1999) and erase
> the original without needing to kill -1 the httpd.
> 
> 	#!/bin/sh -
> 	LOGDIR=/var/log
> 	ARCDIR=/var/log/oldlogs
> 	DAY=`date | awk '{ OFS="_" ;print $2,$6}' `
> 	for log in $LOGDIR/http* ; do
> 		cp $log $ARCDIR/${log}.${DAY}
> 		chmod 440 $ARCDIR/${log}.${DAY}
> 		cp /dev/null $log
> 	done

Egads!!
That's a pretty vicious race condition there, you'll lose records on busy
servers.



-- 

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
| 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?19990518172622.C1539>