views:

10

answers:

1

What command can I use to analyse Apache's log file that tells me between 11am of day x and 13pm of day x the average request per second was..? The os is linux (red hat)

Thanks

+1  A: 

between 11am of day x and 13pm

My clock doesn't go all the way to 13pm. How are things on Airstrip 1?

Assuming you meant 1pm....

Something like...

awk 'BEGIN {started=0}
   /\[29\/Oct\/2010:11/ {
          started=1}
   /\[29\/Oct\/2010:1[3-9]/ {
          print count/(2*60*60);
          exit; }
   // { 
          if (started) count++;
      }' <access_log
symcbean