nginx性能统计页面

本文介绍了如何在Nginx中启用http_stub_status_module模块来监控服务器性能。通过配置nginx.conf并添加location块,可以访问性能统计页面,展示如活动连接数、处理的请求等关键指标。
摘要由CSDN通过智能技术生成

学习资料欢迎大家下载https://t.zsxq.com/imimAYF

 

安装
在编译nginx之前,编译选项里加上:
--with-http_stub_status_module 
因为nginx默认是不安装改模块的。
配置
在nginx.conf里,server下面,加入配置:
    location /nginx_status {
            # copied from http://blog.kovyrin.net/2006/04/29/monitoring-nginx-with-rrdtool/
            stub_status on;
            access_log   off;
            allow all; # allow SOME.IP.ADD.RESS;比如 allow 202.106.1.60;
            # deny all;
        }
重载配置
nginx -s reload
访问nginx的性能统计页面
http://xxxx.com/nginx_status/ 
结果如下:

解释  
Active connections: 1 
server accepts handled requests
 49894  49894  340975 
Reading: 0 Writing: 1 W

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值