From owner-freebsd-isp Tue May 18 7:14: 5 1999 Delivered-To: freebsd-isp@freebsd.org Received: from roble.com (roble.com [199.108.85.50]) by hub.freebsd.org (Postfix) with ESMTP id A00F914D19 for ; Tue, 18 May 1999 07:13:23 -0700 (PDT) (envelope-from sendmail@roble.com) Received: from roble2.roble.com (roble2.roble.com [199.108.85.52]) by roble.com (Roble1b) with SMTP id HAA28588 for ; Tue, 18 May 1999 07:13:24 -0700 (PDT) Date: Tue, 18 May 1999 07:13:21 -0700 (PDT) From: Roger Marquis X-Sender: Roger Marquis Reply-To: Roger Marquis To: freebsd-isp@FreeBSD.ORG Subject: Re: Web Statistics break up program. In-Reply-To: <199905172017.VAA08078@post.mail.areti.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 -- Roger Marquis Roble Systems Consulting http://www.roble.com/ > We currently use Analog to generate our stats, but now customers are asking > for weekly, or monthly stats to be generated, rather that just one accumulative > lot. Is there anyway to automatically break up the stats, and have them to put into > its own html stats file. > > For example: > > April01-07-1999.html > April08-14-1999.html > > etc etc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message