开发者

How do I get the number of requests per second from Apache log between 2 dates/time?

What command can I use to analyse Apache's log 开发者_JAVA百科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


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜