公告
财富商城
积分规则
提问
发文
2020-05-14 19:03发布
Luminary・发光体
In Windows for ASP, you can get it perfmon, but...
How to get "requests per second" for Apache in Linux?
I wrote a set of Perl scripts that show the average requests-per-second for the past 1, 5 and 15 minutes (like top). It's at https://gist.github.com/1040144 .
I think mod_status can do it ...
http://httpd.apache.org/docs/2.0/mod/mod_status.html
You can also use zenoss to collect data from mod_status using the community apache plugin.
http://www.zenoss.com/
To sum up, you can use mod_status and apachetop.
Alternatively, you can use Adam Franco's and Jon Daniel's nice scripts to have a live look.
If you would like to have a look at a partiular date and hour, you can issue this little command:
grep "29/Oct/2014:12" /var/log/apache2/example.com.log | cut -d[ -f2 | cut -d] -f1 | awk -F: '{print $2":"$3}' | sort -nk1 -nk2 | uniq -c | awk '{ if ($1 > 10) print $0}'
Replace with the date and hour you are interested and also with the proper pathfilename of the log file.
It will print out something like:
1913 12:47 226 12:48 554 12:49 918 12:50
There is a nice article here with more options on using a combination of awk, cut and uniq commands to get quick stats of the kind.
最多设置5个标签!
I wrote a set of Perl scripts that show the average requests-per-second for the past 1, 5 and 15 minutes (like top). It's at https://gist.github.com/1040144 .
I think mod_status can do it ...
http://httpd.apache.org/docs/2.0/mod/mod_status.html
You can also use zenoss to collect data from mod_status using the community apache plugin.
http://www.zenoss.com/
To sum up, you can use mod_status and apachetop.
Alternatively, you can use Adam Franco's and Jon Daniel's nice scripts to have a live look.
If you would like to have a look at a partiular date and hour, you can issue this little command:
Replace with the date and hour you are interested and also with the proper pathfilename of the log file.
It will print out something like:
There is a nice article here with more options on using a combination of awk, cut and uniq commands to get quick stats of the kind.