码迷,mamicode.com
首页 > 其他好文 > 详细

Nginx 流量带宽等请求状态统计( ngx_req_status)

时间:2017-11-17 23:34:43      阅读:593      评论:0      收藏:0      [点我收藏+]

标签:cti   网络   icon   ast   1.4   config   nginx   状态   tar   

Nginx流量带宽等请求状态统计
( ngx_req_status)
 插件下载地址:
wget http://nginx.org/download/nginx-1.4.2.tar.gz
git clone https://github.com/zls0424/ngx_req_status.git
配置示例:
1、服务目录
mkdir /opt/server

2、补丁导入; patch
-p1 < /opt/server/ngx_req_status/write_filter-VERSION.patch tar -xf http://nginx.org/download/nginx-1.4.2.tar.gz -C /opt/server cd /opt/server/nginx ./configure --prefix=/opt/server/nginx-1.4.2 --add-module=/opt/server/ngx_req_status-master make -j2   // 处理器的多核作业; make install
3、nginx http 模块配置; http { req_status_zone server_name $server_name 256k; req_status_zone server_addr $server_addr 256k; req_status_zone server_url $server_name$uri 256k; req_status server_name server_addr server_url; server { lisent
80; server_name localhost; location /req-status { req_status_show on; } } }
查看 :
curl http://127.0.0.1/req-status
 参数:
    key路径
    max_active 最大连接数
    max_bw 最大带宽
    traffic 访问量
    requests 请求数
    active 连接数
    bandwidth 网络带宽
 
[root@test nginx-1.4.2]# curl http://127.0.0.1/req-status

zone_name key max_active max_bw traffic requests active bandwidth server_addr 10.10.10.100 1 31K 3M 593 0 0 server_addr 127.0.0.1 1 8480 206K 40 1 0 server_name localhost 1 30K 3M 600 1 0 server_name www.hktest.com 1 8424 78K 33 0 0 server_url localhost/ 1 352 18K 6 0 0 server_url localhost/hktest-status 1 9968 91K 45 0 0 server_url localhost/favicon.ico 1 352 9192 3 0 0 server_url localhost/req-status 1 8480 206K 40 1 0 server_url localhost/req-status/ 1 30K 2M 506 0 0 server_url www.hktest.com/hktest-status 1 8424 78K 33 0 0

 

 
 
 
 

Nginx 流量带宽等请求状态统计( ngx_req_status)

标签:cti   网络   icon   ast   1.4   config   nginx   状态   tar   

原文地址:http://www.cnblogs.com/sharesdk/p/7853770.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!