apache的mod_status模块

无意中在CU上看到了如何获取Apache的时候,知道了mod_status模块可以知道服务器的状态。

由于上次已经源码编译过apache,这个模块已经默认编译进来了。
可以通过
bin下的httpd -l |grep status来查看是否被编译。
apache2.2的配置文件是在
apache2/conf/extra/httpd-info.conf
需要进入这个文件把注释取消。

恩。最后别忘记在httpd.conf里将相应的注释也取消

大概在382行有下面的注释
# Real-time info on requests and configuration
Include conf/extra/httpd-info.conf

之后就可以看到以下的信息了。哈哈哈。恩。。。
别忘了在浏览器里输入
http://ip/server-status
就可以看到以下信息了。。

Apache Server Status for 192.168.1.139
Server Version: Apache/2.2.6 (Unix) PHP/5.2.4
Server Built: Nov 3 2007 16:50:43

——————————————————————————–

Current Time: Monday, 05-Nov-2007 20:20:23 CST
Restart Time: Monday, 05-Nov-2007 20:05:02 CST
Parent Server Generation: 12
Server uptime: 15 minutes 21 seconds
Total accesses: 47248 – Total Traffic: 7.1 MB
CPU Usage: u1.19 s32.2 cu0 cs0 – 3.63% CPU load
51.3 requests/sec – 7.9 kB/second – 157 B/request
1 requests currently being processed, 9 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-12 – 0/0/769 .  0.40 202 2 0.0 0.00 0.03  ::1 localhost.localdomain GET / HTTP/1.0
1-12 – 0/0/770 .  0.07 193 3 0.0 0.00 0.03  ::1 localhost.localdomain GET / HTTP/1.0
2-12 – 0/0/739 .  0.17 355 2 0.0 0.00 0.03  ::1 localhost.localdomain GET / HTTP/1.0
…………………..
255-12 – 0/0/35 .  0.05 523 1 0.0 0.00 0.00  ::1 localhost.localdomain GET / HTTP/1.0

——————————————————————————–
Srv Child Server number – generation
PID OS process ID
Acc Number of accesses this connection / this child / this slot
M Mode of operation
CPU CPU usage, number of seconds
SS Seconds since beginning of most recent request
Req Milliseconds required to process most recent request
Conn Kilobytes transferred this connection
Child Megabytes transferred this child
Slot Total megabytes transferred this slot

发表评论

邮箱地址不会被公开。 必填项已用*标注


*