I use this script with Netscape enterprise server on Solaris,
       you may need to modify it for your paths or whatever:

       #!/bin/sh
       ###script may be distributed freely, as is, no warrantees###
       ###first, set variable to store file
       FILENAME1=`date '+/webstuff/logs/httpwkend%m_%d_%y'`
       ###then copy this week's log to safe place
       cp /usr/local/netscape/suitespot/https-www/logs/access_log
       $FILENAME1
       ### This is needed forNetscape Enterprise server, the first
       line indicates the logfile format
       head -1 /usr/local/netscape/suitespot/https-www/logs/access_log
        > /tmp/www-tmp
       ### reset's the log file to zero
       cat /tmp/www-tmp >
       /usr/local/netscape/suitespot/https-www/logs/access_log
       ### compresses the saved file
       /opt/FSFgzip/bin/gzip $FILENAME1
       ###name of output file
       FILENAME4=`date '+/internet/http/stats/wkend%m_%d_%y.htm'`
       ###runs analog
       /opt/FSFgzip/bin/zcat $FILENAME1 | /internet/analog/analog >>
       $FILENAME4
       ###copies the file for easy access via a bookmark, but the
       directory contains history files
       cp $FILENAME4 /internet/http/stats/last_week.htm







       From: "jason linhart" <[EMAIL PROTECTED]> AT internet on
             11/30/98 04:20 PM

       To:   [EMAIL PROTECTED] AT internet@ccMTA-GEMS-CO-01,
             [EMAIL PROTECTED] AT internet@ccMTA-GEMS-CO-01
       cc:    (bcc: Mark S. Kaprow/KGMP/CO/GSA/GOV)

       Subject:  Re: analog-help: Setting up a weekly analysis.


       >What they do is create a weekly analysis using analog and name
       the output >CRUNCHLOGyymmdd.html, with an index.html that is
       updated each time, all in >a subdirectory called CRUNCHLOG.
       >
       >1. How do they do this? I'm trying to get this info for a
       friend who has a >site on another server. The folks at that ISP
       said they'd be interested in >running analog on a weekly basis
       for all their customers as well.

       Under Unix it would be a simple cron entry to run analog on
       Sunday with command line options to limit it to a week and set
       the report output location (assuming Analog is installed in the
       analog directory):

       give cron:

       17 2 * * 0 analog/analog +F-00-00-07 +T-00-00-01
       -OCRUNCHLOG`date
       +%y%m%d`.html

       '17 2 * * 0' tells cron to run on Sundays at 2:17 AM.

       +F-00-00-07 +T-00-00-01 tells Analog to process seven days ago
       through yesterday.

       -OCRUNCHLOG`date +%y%m%d`.html constructs a file name with
       YYMMDD in it as a location for Analog to output the report.

       Any reasonably competent Unix sysadmin should know how to set
       this up.

       >2. Also, in speaking with my ISP they told me that the other
       ISP would have >to recompile their webserver to have all the
       environment variables turned >on, such as referer, host, etc.,
       for analog to do its full reporting. >Anyone know how to do
       that as well? They use Apache on Redhat, I believe.

       The server log format should probably be NCSA Combined format.
       In the
       Apache configuration file use:
       LogFormat "%h %l %u %t \"%r\" %s %b \"%{Referer}i\"
       \"%{User-agent}i\""

       It is very very very unlikely that this will require
       recompiling. The server will just have to be restarted after
       editing the configuration file.

       You shouldn't use an ISP that doesn't understand how to do
       that. They might not want to do it, it uses alot of disk space
       for the log, but they better understand how to do it.

       -----------------
       [EMAIL PROTECTED]
       -----------------
       Dr. Seuss books . . . can be read and enjoyed on several
       levels. For example, 'One Fish Two Fish, Red Fish Blue Fish'
       can be deconstructed as a searing indictment of the
       narrow-minded binary counting system.
         -- Peter van der Linden, Expert C Programming, Deep C Secrets


       ---------------------------------------------------------------
       -----
       This is the analog-help mailing list. To unsubscribe from this
       mailing list, send mail to [EMAIL PROTECTED]
       with "unsubscribe analog-help" in the main BODY OF THE MESSAGE.
       ---------------------------------------------------------------
       -----








Reply via email to