ps -ef | grep httpd | wc -l (check apache concurrent connections)
Posted on 01. Dec, 2009 by Yao Yuan in Tips & Skills
ps -ef | grep httpd | wc -l
在Linux系统下查看apache的并发连接数:
即查看httpd的进程数(即prefork模式下Apache能够处理的并发请求数):
Linux shell命令如下:
ps -ef | grep httpd | wc -l
查看Apache的并发请求数及其TCP连接状态:
Linux shell命令如下:
netstat -n | awk ‘/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}’
返回结果为:
LAST_ACK 5
SYN_RECV 30
ESTABLISHED 1597
FIN_WAIT1 51
FIN_WAIT2 504
TIME_WAIT 1057
结果说明:
SYN_RECV表示正在等待处理的请求数;
ESTABLISHED表示正常数据传输状态;
TIME_WAIT表示处理完毕,等待超时结束的请求数。
Related Posts
- Apache 优化
- cat /proc/user_beancounters, check the ram usage of openvz VPS
- Automatically convert apache .htaccess rewrite to Nginx
Related posts brought to you by Yet Another Related Posts Plugin.
br>





Leave a reply