我有一个带有 Apache 2.2.3 的 CentOS 5.5 Final,正在检查是否存在一些错误配置,我设置了服务器状态页面并查询某个页面,得到了以下结果:
Apache Server Status for 192.168.3.23
Server Version: Apache/2.2.3 (CentOS)
Server Built: Aug 30 2010 12:32:08
Current Time: Tuesday, 07-Aug-2012 16:27:17 CEST
Restart Time: Tuesday, 07-Aug-2012 15:35:02 CEST
Parent Server Generation: 0
Server uptime: 52 minutes 14 seconds
Total accesses: 6263 - Total Traffic: 12.2 MB
CPU Usage: u1.85 s.77 cu0 cs0 - .0836% CPU load
2 requests/sec - 4083 B/second - 2043 B/request
1 requests currently being processed, 4 idle workers
_..__W_.........................................................
................................................................
................................................................
................................................................
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
Srv PID Acc M CPU SS Req Conn Child Slot Client VHost Request
0-0 29399 0/14/875 _ 0.03 1 27 0.0 0.03 1.58 X.X.X.X 127.0.0.1 GET /messaggi_xml.php?id_srv=2381&id_dev=1233&last_event=1&i
1-0 - 0/0/908 . 0.40 43 25 0.0 0.00 1.81 X.X.X.X 127.0.0.1 GET /messaggi_xml.php?id_srv=2381&id_dev=1233&last_event=1&i
2-0 - 0/0/859 . 0.45 3 23 0.0 0.00 1.67 X.X.X.X 127.0.0.1 GET /messaggi_xml.php?id_srv=2381&id_dev=1233&last_event=1&i
3-0 29379 0/160/857 _ 0.34 0 25 0.0 0.30 1.68 X.X.X.X 127.0.0.1 GET /messaggi_xml.php?id_srv=2381&id_dev=1233&last_event=1&i
4-0 29380 0/132/804 _ 0.31 1 15 0.0 0.27 1.61 X.X.X.X 127.0.0.1 GET /check_realtime.php?id_srv=2381&id_dev=1233 HTTP/1.1
5-0 29383 0/116/851 W 0.24 0 0 0.0 0.27 1.68 X.X.X.X 127.0.0.1 GET /server-status HTTP/1.1
6-0 29385 0/114/751 _ 0.23 0 16 0.0 0.17 1.32 X.X.X.X 127.0.0.1 GET /check_realtime.php?id_srv=2381&id_dev=1233 HTTP/1.1
7-0 - 0/0/178 . 0.26 2410 22 0.0 0.00 0.48 X.X.X.X 127.0.0.1 GET /messaggi_xml.php?id_srv=2381&id_dev=1233&last_event=1&i
8-0 - 0/0/180 . 0.36 2362 12 0.0 0.00 0.38 X.X.X.X 127.0.0.1 GET /check_realtime.php?id_srv=2381&id_dev=1233 HTTP/1.1
由于我看到某些页面有一个没有当前进程的开放槽,这是否意味着 Apache 中存在配置错误,您是否有提示检查可能的参数以避免这种情况?如果您需要更多信息(例如配置),我可以提供...另外,我不得不说我没有在 /var/log/messages 或 /var/log/httpd/error_log 或 /var/log/httpd/ssl_error_log 中看到任何错误,也没有在 /tmp/php_error_log 中看到任何错误...另外,如果我执行 ps aux,我没有看到列出的那些开放槽...
干杯,路易吉
答案1
这些open slots with no current processes
只是未来线程的显示占位符。在使用率较低的系统上,您不会看到线程正在使用的所有插槽。将您的输出与此用户的输出进行比较记分牌。他们的几乎所有老虎机都处于一种waiting for connection
状态。
尝试使用其中之一HTTP 基准测试工具并观察你的记分牌如何变化。