(Redirected from APache Requests Per Minute)
run like this:
perl rpm.pl < logfile.log > outputfile.out #!/usr/bin/perl while (<>) { #[01/Oct/2004:00:00:01 +0000] if (/\[\d{2}\/[A-Za-z]{3}\/\d{4}:(\d\d):(\d\d)/) { $h=$1; $m=$2; if ($m == $lastm) { $cpm++; } else { print "$h:$lastm:$cpm\n"; $lastm=$m; $cpm=1; } } }