搞不明白的APACHE连接数
APACHE负载有点高,想看连接数,可为什么ps-ef|grep httpd | wc -l 统计出来最大是1,有时候是0?
FreeBSD 6.2 release版,Apache-2.0.59,prefork 模式
[Copy to clipboard] [ - ]
CODE:
$ ps -ef | grep httpd | wc -l
ps: Process environment requires procfs(5)
1
$ netstat -an | grep "80"| wc -l
266
[Copy to clipboard] [ - ]
CODE:
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
33946 mysql 69 20 0 421M 101M kserel 1 202:38 11.28% mysqld
53164 ftp 1 20 0 21132K 12892K lockf 1 0:01 6.28% httpd
53147 ftp 1 102 0 21444K 13200K select 0 0:02 5.85% httpd
53145 ftp 1 102 0 21712K 13468K select 0 0:02 4.88% httpd
53160 ftp 1 103 0 21752K 13508K select 1 0:01 4.86% httpd
53161 ftp 1 20 0 21436K 13192K lockf 1 0:01 4.71% httpd
53155 ftp 1 20 0 21948K 13696K lockf 1 0:01 4.50% httpd
53135 ftp 1 20 0 21916K 13664K lockf 1 0:03 4.38% httpd
53109 ftp 1 102 0 21444K 13400K select 1 0:06 4.26% httpd
53153 ftp 1 20 0 21508K 13268K lockf 1 0:01 3.98% httpd
53157 ftp 1 20 0 21436K 13200K lockf 1 0:01 3.86% httpd
53149 ftp 1 20 0 21516K 13276K lockf 1 0:01 3.83% httpd
53041 ftp 1 101 0 28412K 20176K RUN 0 0:09 3.32% httpd
53152 ftp 1 20 0 22012K 13764K lockf 1 0:01 3.00% httpd
53016 ftp 1 98 0 25956K 17724K select 1 0:09 2.88% httpd
53159 ftp 1 20 0 21516K 13276K lockf 1 0:01 2.86% httpd
53163 ftp 1 102 0 21940K 13688K select 1 0:01 2.86% httpd
53048 ftp 1 20 0 21436K 13204K lockf 1 0:07 2.78% httpd
53052 ftp 1 98 0 21948K 13720K select 1 0:08 2.59% httpd
53108 ftp 1 20 0 21948K 13720K lockf 1 0:04 2.54% httpd
53038 ftp 1 20 0 21436K 13188K lockf 0 0:09 2.44% httpd
53158 ftp 1 100 0 22012K 13760K CPU1 1 0:01 1.79% httpd
53148 ftp 1 102 0 21428K 13184K select 1 0:01 1.55% httpd
53151 ftp 1 102 0 21512K 13272K select 0 0:01 1.47% httpd
53051 ftp 1 20 0 25956K 17720K lockf 1 0:06 1.46% httpd
35690 root 1 8 0 20696K 11876K nanslp 0 0:39 0.00% httpd