Subject: ftpstat.c

From: [email-masked] (Chris Brown)
Date: Wed, 26 Feb 1997 12:46:07 -0800 (PST)

I had a couple of requests, so here's some information about the stat
program which runs the page at:

http://siggy.iceonline.com/~ftp/ftpstat.html

You can download the source from:

ftp://siggy.iceonline.com/pub/other/ftpstat.c

and a sample daily rotation of logs file (it's different than standard
'cause ftpstat builds up some internal stat lists which it saves as logs):

ftp://siggy.iceonline.com/pub/other/ftpdaily

Okay, some info:

The program is public domain.  You can whatever you want with it, including
sell it if you think someone will buy it.  I take no responsibility for
anything done with it.

The program was never intended to cross platforms, so will probably  require
include massaging when it arrives on your system (unless you happen to be
running IRIX).

Typing 'make ftpstat' (without a makefile required) should be all you need
to do to make the binary.  Before you do this, you should massage ftpstat.c
so that your paths are correct (I recommend supplying paths away from
anything important for testing in case something breaks, even though I can't
see what would.)

Both the script and the program assume that ftpd will continue logging
to the old file when the day ends for 24 hours and no more.  I've received
a fix for the script which fixes this with no problem and I'll probably
update the sample shortly.

I run ftpstat hourly using the following line out of my crontab:
31      0,2-23  *       *       *       /disk2/chrisb/tabs/ftpstat
and the following line out of the root crontab:
31      1       *       *       *       /disk2/chrisb/tabs/ftpdaily
As you can see, the logs get rotated at 1:31 am each morning.

If there is enough interest in this thing, I suppose it could be developed
a considerable amount more...  Currently I have no plans in this direction
though.

Chris...