XML/HTML代碼 Apache Server Status for www.blogguy.cn Server Version: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny8 with Suhosin-Patch Server Built: Apr 19 2010 19:57:58 -------------------------------------------------------------------------------- Current Time: Monday, 19-Jul-2010 05:58:58 MSD Restart Time: Monday, 19-Jul-2010 05:49:34 MSD Parent Server Generation: 0 Server uptime: 9 minutes 24 seconds 5 requests currently being processed, 4 idle workers _K_W._W_KK...................................................... ................................................................ ................................................................ ................................................................ 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 PID Key: 24279 in state: _ , 20020 in state: K , 29820 in state: _ 29821 in state: W , 7553 in state: _ , 29830 in state: W 7560 in state: _ , 20286 in state: K , 20255 in state: K -------------------------------------------------------------------------------- To obtain a full report with current status information you need to use the ExtendedStatus On directive. -------------------------------------------------------------------------------- Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny8 with Suhosin-Patch Server at www.blogguy.cn Port 80
接下來一行一行的看php
首先訪問地址是:http://IP:端口/server-status,這是基本格式,若是你要啓用本頁面的自動刷新功能,能夠這樣http://IP:端口/server-status?refresh=10,表示每10秒鐘自動刷新本頁面。html
接下來的3行apache
Apache Server Status for
Server Version: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny8 with Suhosin-Patch
Server Built: Apr 19 2010 19:57:58安全
表示服務的配置地址,版本,安裝日期等,不是重點略看一下。服務器
接下來的是重點了ui
Current Time: Monday, 19-Jul-2010 05:58:58 MSD //表示blogguy.cn的服務器上的時間
Restart Time: Monday, 19-Jul-2010 05:49:34 MSD //上次重啓時間
Parent Server Generation: 0 //大概是這樣一個東西,apache在正常運行後,apache的父進程會重讀配置文件,若是配置文件有改動那麼就強制全部apache的子進程重啓,Parent Server Generation就是記錄這個重啓次數的。
Server uptime: 9 minutes 24 seconds //apache的持續運行時間,blogguy.cn剛重啓哈,才被卡死
5 requests currently being processed, 4 idle workers //當前任務運行情況,正在處理的請求是5個,空閒的活動是4個this
_K_W._W_KK......................................................
................................................................
................................................................
................................................................rest
的含義是:code
_:等待連結中。
S:啓動中。
R: 正在讀取要求。
W:正在送出迴應。
K:處於保持聯機的狀態。
D:正在查找 DNS。
C:正在關閉連結。
L:正在寫入記錄文件。
G:進入正常結束程序中。
I:處理閒置。
.:尚無此程序。orm
PID Key:
24279 in state: _ , 20020 in state: K , 29820 in state: _
29821 in state: W , 7553 in state: _ , 29830 in state: W
7560 in state: _ , 20286 in state: K , 20255 in state: K
描述的是每一個活動的狀態信息,前面的數字表明進程號
To obtain a full report with current status information you need to use the ExtendedStatus On directive.//若是你須要看到更加詳細的服務器狀態報告,你須要把相應的選項打開。意思是說,原本server-status還能夠提供一些選項給你看的,惋惜你沒有打開,若是你打開你能夠看到流量信息,cpu信息等。可是官方文檔說這樣會致使安全隱患。
vi /etc/apache2/apache2.conf
在文件中添加一句:ExtendedStatus On
/etc/init.d/apache2 restart
重啓而後再訪問http://IP:端口/server-status,看看效果:
XML/HTML代碼 Apache Server Status for www.blogguy.cn Server Version: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny8 with Suhosin-Patch Server Built: Apr 19 2010 19:57:58 -------------------------------------------------------------------------------- Current Time: Monday, 19-Jul-2010 06:43:17 MSD Restart Time: Monday, 19-Jul-2010 06:43:01 MSD Parent Server Generation: 0 Server uptime: 15 seconds Total accesses: 14 - Total Traffic: 56 kB CPU Usage: u.02 s0 cu0 cs0 - .133% CPU load .933 requests/sec - 3822 B/second - 4096 B/request 6 requests currently being processed, 3 idle workers _KKKK__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 21825 0/3/3 _ 0.00 7 6043 0.0 0.03 0.03 61.148.109.86 blogguy.cn GET /templates/default/logo.jpg HTTP/1.1 1-0 21831 2/2/2 K 0.00 12 0 4.9 0.00 0.00 61.148.109.86 blogguy.cn GET /templates/default/img/utf8.jpg HTTP/1.1 2-0 21858 1/1/1 K 0.00 12 0 0.6 0.00 0.00 61.148.109.86 blogguy.cn GET /templates/default/img/wap.gif HTTP/1.1 3-0 21877 1/1/1 K 0.00 11 0 1.0 0.00 0.00 61.148.109.86 blogguy.cn GET /templates/default/img/rss.gif HTTP/1.1 4-0 21878 1/1/1 K 0.00 11 2 0.6 0.00 0.00 61.148.109.86 blogguy.cn GET /include/seccode.php HTTP/1.1 5-0 21882 0/1/1 _ 0.01 2 52 0.0 0.00 0.00 66.249.68.236 blogguy.cn GET /archives-201235-53.html HTTP/1.1 6-0 21884 0/1/1 _ 0.01 2 61 0.0 0.01 0.01 220.181.7.131 blogguy.cn GET / HTTP/1.1 7-0 21885 4/4/4 W 0.00 0 0 5.5 0.01 0.01 210.13.219.42 blogguy.cn GET /server-status HTTP/1.1 8-0 21886 0/0/0 W 0.00 7 392864518 0.0 0.00 0.00 61.156.219.185 blogguy.cn GET /attachments/date_200711/jimozaichangge.mp3 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 -------------------------------------------------------------------------------- Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny8 with Suhosin-Patch Server at www.blogguy.cn Port 80