*BSD News Article 48354


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: sserve!euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!news.mathworks.com!tank.news.pipex.net!pipex!newsfeed.internetmci.com!news.sprintlink.net!in1.uu.net!spcuna!ritz!ritz
From: ritz@ritz.mordor.com (Chris Mauritz)
Subject: Re: crontab and sh scripts
References: <marcus.216.0111D480@ccelab.iastate.edu> <40bmnk$9vo@jraynard.demon.co.uk>
Organization: Mordor International
Date: Fri, 11 Aug 1995 01:22:42 GMT
X-Newsreader: TIN [version 1.2 PL2]
Message-ID: <DD4H5v.DGy@ritz.mordor.com>
Lines: 40

James Raynard (james@jraynard.demon.co.uk) wrote:
: In article <marcus.216.0111D480@ccelab.iastate.edu>,
: Marcus I. Ryan <marcus@ccelab.iastate.edu> wrote:
: >I have written an sh script that calculates some statistics for my WWW server. 
: >Basically is greps through the log files a few hundred times :)

: Arrgghhh! You don't want to do it like that! (Unless of course you have a 
: very quiet WWW server 8-)

Exactly.  You don't want to use something piggy like getstats either.
A guy on the bsdi-users list turned me on to analog and I've never
looked back.  It's remarkably efficient, even on huge log files.  I
use it to update my stats hourly on my new web box (I'll probably 
change that to 2 or 3 times/day soon).  This is on a box that's been
getting roughly 200k hits/day.  (For the curious, it's a DX2-80
with 16mb RAM, Buslogic localbus SCSI controller, and a moderately
fast Seagate disk...running 2.0.5R.)

: I use analog at work - it takes just over one minute to analyse a 60+MB
: logfile.

: >I wan't it to update the report nightly, but I can't seem to get the crontab 
: >entry to make it do this.  I have added the lines:
: >#Generate New Prelim Logfiles every day at midnight.
: >59      23      *       *       *       root    /usr/local/bin/stathtml \
: >`date +" %b %B"`

: Remove the 'root' field and all should be well (man 5 crontab for details).

Yup.

Regards,

Chris

-- 
Christopher Mauritz         | For info on internet access:
ritz@mordor.com             | finger/mail info@ritz.mordor.com OR
Mordor International        | http://www.mordor.com/
201/212/718 internet access | Modem: (201)433-7343,(212)843-3451