apacheのserver-statusがどのように分析するかの技術説明
6907 ワード
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
次の行を見て
最初のアクセス先は次のとおりです.http://IP:ポート/server-status、これは基本フォーマットです.このページの自動リフレッシュ機能を有効にするには、次のようにします.http://IP:ポート/server-status?refresh=10は、10秒ごとに自動的にページがリフレッシュされることを示します.
次の3行
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
サービスの構成住所、バージョン、インストール日などを表し、重点的に見ているわけではありません.
次はポイントです
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個
_K_W._W_KK......................................................................................................................................................................................................................................................
の意味は次のとおりです.
_:連結待ち中.S:起動中です.R:要求を読み込んでいます.W:応答を送信しています.K:オンラインのままです.D:DNSを探しています.C:連結を閉じています.L:記録ファイルを書き込んでいます.G:正常終了プログラムに入ります.I:アイドル処理. .:このプログラムはまだありません.
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