Cover V06, I07
Article
Figure 1
Figure 2
Listing 1
Listing 2
Listing 3
Listing 4
Listing 5
Listing 6

jul97.tar


Listing 1: Monthly cron job to create HTML pages for dial-up usage

#!/bin/sh
#
# Listing 1 -- Monthly cron job to create HTML pages
#            for dialup usage.
#
SQHOME=/home/squid
SLOGHOME=/home/squid/logs
SXTRHOME=/home/squid/logs
SCRHOME=/home/thomas/sys_admin/squid
HTML=/db/infosys/html/dadasp/admin/netblazer

MONTH=`date +%h`
DAY=`date +%d`

cd $SQHOME

mv squidlog $SLOGHOME/squidlog.$MONTH.$DAY
touch squidlog

kill -HUP `ps -elf | grep syslog | grep -v grep | awk '{ print $4 }'`

awk -f $SCRHOME/extract.awk $SLOGHOME/squidlog.$MONTH.$DAY | \
sort +1 > $SXTRHOME/extracted.1.$MONTH

grep seconds $SLOGHOME/squidlog.$MONTH.$DAY | grep -v inbound | \
sort +5 > $SXTRHOME/extracted.2.$MONTH

compress $SLOGHOME/squidlog.$MONTH.$DAY

$SQHOME/reports/line.pl $SXTRHOME/extracted.1.$MONTH > \
$HTML/$MONTH/hreport.html
$SQHOME/reports/user.pl $SXTRHOME/extracted.2.$MONTH > \
$HTML/$MONTH/ureport.html

# End of File