#!/afs/athena/contrib/perl/p

%month = ("Jan", 0,
	  "Feb", 31,
	  "Mar", 59,
	  "Apr", 90,
	  "May", 120,
	  "Jun", 151,
	  "Jul", 181,
	  "Aug", 212,
	  "Sep", 243,
	  "Oct", 273,
	  "Nov", 304,
	  "Dec", 334);

while(<>){
    ($host, $crap, $from, $time, $zone, $method, $path, 
     $version, $code, $size)= 
	 ($_=~/([^ ]+) ([^ ]+) ([^\[])+\[([^ ]+) ([^\]]+)\] \"([^ ]+) ([^ ]+) ([^\"]+)\" (\d+) (\d+)/);
#    print("$mon, $day of the year $year\n");
    ($date, $hour, $minute, $sec) = split(/:/, $time);
    next if !length($hour);
    $date = $month{$mon}+$day;
    $host{$machine}++;
    (@dms) = split(/\./, $machine);
    $hrequest[$hour]++; print("$hour: $hrequest[$hour]\n") if $hrequest[$hour]%500 == 0;
    $odate = $date;
}

for $h (0..24) {
    $ticks = "-" x ($hrequest[$h]/100);
    $# = '%.2f';
    print("$h >$ticks $hrequest[$h]\n");
    #(",$hrequest[$h]/360, " rps)\n");
}
