欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
在 Cacti 下實(shí)現對 Apache 的監控

我們平時(shí)使用 Apache 常常了解它的性能只能使用 “ps aux|grep httpd|wc -l” 查看有多少個(gè)進(jìn)程,但處理了多少 http 的請求我們不清楚,進(jìn)程是不是在工作,還是在等都不是很明白,要了解 Apache 的性能,我們需要使用 Apache Server Status 的模塊來(lái)詳細了解 Apache 工作的怎么樣。下面我來(lái)介紹使用 Cacti 來(lái)監控它。

1.Apache Server Status 模塊的啟用:

在 httpd.conf 文件中加入如下內容:

LoadModule status_module modules/mod_status.so
ExtendedStatus On

<location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from 10.1.2.24
</location>

打開(kāi)查看的話(huà)就使用 http://localhost/server-status 來(lái)訪(fǎng)問(wèn)。
注意:上面的鏈接還可以加個(gè) “?refresh=N” 來(lái)設置多久自動(dòng)刷新一次。

目前最新版本的 Apache 中 mod_status 是內置的,這應該跟我在編譯時(shí)加入的 “–enable-so” 選項有關(guān)。

如果你的 Apache 中沒(méi)有 mod_status 模塊,甚至沒(méi)有動(dòng)態(tài)鏈接庫 .so 文件,那么請使用如下命令進(jìn)行安裝:

% /path/to/apache/bin/apxs  -cia   mod_status.c

-cia 選項表示編譯(compile)、安裝(install)及啟動(dòng) (activate)。第一個(gè)功能很清楚;安裝表示將 .so文件放到Apache 可找到的位置;而啟用則表示將模塊加入 httpd.conf 文件中。

我的機器的顯示如下:

Apache Server Status for 10.10.6.201
Server Version: Apache/2.2.17 (Unix) PHP/5.3.5
Server Built: Mar 17 2011 11:07:46

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

Current Time: Thursday, 31-Mar-2011 13:57:04 CST
Restart Time: Tuesday, 29-Mar-2011 14:22:34 CST
Parent Server Generation: 6
Server uptime: 1 day 23 hours 34 minutes 30 seconds
Total accesses: 30867 – Total Traffic: 62.1 MB
CPU Usage: u6.14 s.56 cu5.21 cs0 – .00695% CPU load
.18 requests/sec – 380 B/second – 2111 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-6 30955 0/63/1766 _ 0.52 46 0 0.0 0.07 3.36 10.1.2.24 10.10.6.201 GET /cacti/images/graph_zoom.gif HTTP/1.1
1-6 31270 1/39/1612 W 0.87 0 0 6.6 0.14 3.70 10.1.2.24 10.10.6.201 GET /server-status HTTP/1.1
2-6 – 0/0/1802 . 0.00 45 0 0.0 0.00 3.45 ::1 10.10.6.201 OPTIONS * HTTP/1.0
3-6 31274 0/62/2113 _ 1.34 46 211 0.0 0.23 4.12 10.1.2.24 10.10.6.201 GET /cacti/graph_image.php?local_graph_id=118&rra_id=0&view_typ
4-6 – 0/0/1526 . 0.00 44 0 0.0 0.00 2.79 ::1 10.10.6.201 OPTIONS * HTTP/1.0
5-6 31343 0/24/1762 _ 0.70 46 138 0.0 0.09 3.19 10.1.2.24 10.10.6.201 GET /cacti/graph_image.php?local_graph_id=116&rra_id=0&view_typ
6-6 31344 0/31/1979 _ 0.29 46 0 0.0 0.06 4.19 10.1.2.24 10.10.6.201 GET /cacti/images/graph_properties.gif HTTP/1.1
7-6 31280 0/48/2123 _ 1.40 46 0 0.0 0.22 4.40 10.1.2.24 10.10.6.201 GET /cacti/plugins/thold/images/reddot.png HTTP/1.1
8-6 31281 0/43/1558 _ 1.02 46 235 0.0 0.14 3.52 10.1.2.24 10.10.6.201 GET /cacti/graph_image.php?local_graph_id=117&rra_id=0&view_typ
9-6 – 0/0/2015 . 0.00 43 0 0.0 0.00 3.64 ::1 10.10.6.201 OPTIONS * HTTP/1.0
10-6 – 0/0/1614 . 0.00 42 0 0.0 0.00 2.92 ::1 10.10.6.201 OPTIONS * HTTP/1.0
11-6 – 0/0/1665 . 0.00 41 0 0.0 0.00 3.56 ::1 10.10.6.201 OPTIONS * HTTP/1.0
12-6 31347 0/34/1862 _ 0.42 46 0 0.0 0.06 4.17 10.1.2.24 10.10.6.201 GET /cacti/plugins/thold/images/edit_object.png HTTP/1.1
13-6 31282 0/55/1899 _ 0.98 46 0 0.0 0.13 3.46 10.1.2.24 10.10.6.201 GET /cacti/images/graph_page_top.gif HTTP/1.1
14-6 – 0/0/1690 . 0.00 40 0 0.0 0.00 3.76 ::1 10.10.6.201 OPTIONS * HTTP/1.0
15-6 31283 0/55/1714 _ 0.83 46 0 0.0 0.15 3.65 10.1.2.24 10.10.6.201 GET /cacti/images/graph_query.png HTTP/1.1
16-6 – 0/0/1792 . 0.00 39 0 0.0 0.00 3.40 ::1 10.10.6.201 OPTIONS * HTTP/1.0
17-6 – 0/0/375 . 4.25 1339 0 0.0 0.00 0.87 ::1 10.10.6.201 OPTIONS * 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

server-status 的輸出中每個(gè)字段所代表的意義如下:

  • Server Version Apache  服務(wù)器的版本。
  • Server Built Apache  服務(wù)器編譯安裝的時(shí)間。
  • Current Time  目前的系統時(shí)間。
  • Restart Time Apache  重新啟動(dòng)的時(shí)間。
  • Parent Server Generation Apache  父程序 (parent process) 的世代編號,就是 httpd 接收到 SIGHUP 而重新啟動(dòng)的次數。
  • Server uptime Apache  啟動(dòng)后到現在經(jīng)過(guò)的時(shí)間。
  • Total accesses  到目前為此 Apache 接收的聯(lián)機數量及傳輸的數據量。
  • CPU Usage  目前 CPU 的使用情形。

接下來(lái)是所有 Apache 進(jìn)程的狀態(tài),每一個(gè)字符表示一個(gè)程序,最多可以顯示 256 個(gè)程序的狀態(tài)。

以下為每一個(gè) Scoreboard Key 所表示的意義:

  • * _:等待連結中。
  • * S:?jiǎn)?dòng)中。
  • * R: 正在讀取要求。
  • * W:正在送出回應。
  • * K:處于保持聯(lián)機的狀態(tài)。
  • * D:正在查找 DNS。
  • * C:正在關(guān)閉連結。
  • * L:正在寫(xiě)入記錄文件。
  • * G:進(jìn)入正常結束程序中。
  • * I:處理閑置。
  • * .:尚無(wú)此程序。
2.在 Cacti 中實(shí)現對 Apache 的監控:
  1. 下載 模板和腳本
    .
  2. 解壓縮下載的 ApacheStats_0.8.2.zip 文件,一共有二個(gè)文件,一個(gè)處理腳本php的,另一個(gè)是xml的文件.
  3. 其中的 ss_apache_stats.php 是腳本文件,它是一個(gè)php的文件,放到你的cacti/scripts/下面.
  4. 在 Cacti 界面導入 cacti_host_template_webserver_-_apache.xml 這個(gè)文件.
  5. 在 Cacti 中設置一些 Graph 即可。

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
為?Cacti?添加?Nginx?status?監控
運維網(wǎng)Cacti操作手冊——多張CPU圖整合為一張圖操作詳解
給小白的 Nginx 30分鐘入門(mén)指南
開(kāi)啟nginx狀態(tài)監控,查看web服務(wù)器的并發(fā)連接數。
監控基于Linux主機的Apache
教你如何監控 Apache?
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久