home *** CD-ROM | disk | FTP | other *** search
- #!/usr/local/bin/perl
-
- open(AWHTML, "$ARGV[0]") || die "open" ;
-
- @datestr = split(/\./, $ARGV[0]) ;
- $date = $datestr[0] ;
-
- while (<AWHTML>) {
- chop ;
-
- if (m#Avg Accesses/Hour[^0-9]+([0-9\.]+)#) {
- $avgacc = $1 ;
- } elsif (m#Max Accesses/Hour[^0-9]+([0-9\.]+)#) {
- $maxacc = $1 ;
- } elsif (m#Min Accesses/Hour[^0-9]+([0-9\.]+)#) {
- $minacc = $1 ;
- } elsif (m#Accesses/Day[^0-9]+([0-9\.]+)#) {
- $totacc = $1 ;
- } else {
- if (m#<B>([0-9\.]+)</B> unique host#) {
- $tothosts = $1 ;
- }
- if (m#<B>([0-9\.]+)</B> pages related#) {
- $avgpages = $1 ;
- }
- if (m#total of <B>([0-9\.]+)</B> hits and <B>([0-9\.]+)</B> errors#) {
- $tothits = $1 ;
- $toterrs = $2 ;
- }
- }
- }
-
- print "$date totacc=$totacc tothosts=$tothosts tothits=$tothits" ;
- print " maxacc=$maxacc minacc=$minacc toterrs=$toterrs\n" ;
-