分类: 系统运维
2017-10-13 15:12:02
一.打开apache的server-status:
# vi /etc/httpd/conf/httpd.conf
添加如下内容,注意细节:
ExtendedStatus On
SetHandler server-status
Order Allow,Deny
Allow from localhost
重启apache使其生效:
# service httpd restart
在本机访问server-status测试下(仅允许本机访问状态页):
# curl
Apache Status
WW______........................................................ ................................................................ ................................................................ ................................................................
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 | 5528 | 0/0/0 |
W |
0.00 | 3 | 0 | 0.0 | 0.00 |
0.00 |
192.168.43.11 | log.cbex.com.cn | GET /server-status HTTP/1.1 |
1-0 | 5529 | 0/0/0 |
W |
0.00 | 0 | 0 | 0.0 | 0.00 |
0.00 |
127.0.0.1 | log.cbex.com.cn | GET /server-status HTTP/1.1 |
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 |
httpd-server-status.conf.sample 是用于配置server-status的上个步骤已经配置过了
userparameter_zapache.conf.sample 、zapache 关键的文件
zapache-template-active.xml zapache-template.xml模板