nginx性能统计页面

释放双眼,带上耳机,听听看~!

学习资料欢迎大家下载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 Waiting: 0
下面这段解释是抄过来的:⊙﹏⊙b
(原文http://momodog.iteye.com/blog/1283371)  

Active connections:Nginx 正处理的活动连接数 。  
server accepts handled requests:Nginx启动到现在共处理了 49894 个连接 , 成功创建 49894 次握手。 一般跟第一个一样,差值为请求丢失数, 总共处理了340975次请求  

。  
reading :nginx 读取到客户端的 Header 信息数。  
writing : nginx 返回给客户端的 Header 信息数。  
waiting :开启 keep-alive 的情况下,这个值等于 active – (reading + writing),意思就是 Nginx 已经处理完正在等候下一次请求指令的驻留连接。  
这个状态信息,从nginx启动算起,包括重载配置文件,也会清零  
——————— 学习资料欢迎大家下载https://t.zsxq.com/imimAYF

 

 

 

 

 

 

 

 

 

给TA打赏
共{{data.count}}人
人已打赏
安全运维

WordPress网站专用docker容器环境带Waf

2020-7-18 20:04:44

安全运维

运维安全-Gitlab管理员权限安全思考

2021-9-19 9:16:14

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索