如何查看nginx运行状态及相关属性说明

来源:互联网 发布:头北脚南睡觉好吗知乎 编辑:程序博客网 时间:2024/05/30 07:14

如何查看nginx运行状态及相关属性说明。
nginx.conf中加入:
[shell]
location /status {
stub_status on;
access_log off;
}
[/shell]

访问地址:http://yours/status
会看到如下信息:
Active connections: 557
server accepts handled requests
36573075 36573075 43806112
Reading: 3 Writing: 16 Waiting: 538
其中:
Active connections -- 对后端发起的活动连接数。
server accepts handled requests -- nginx总共处理了36573075个连接, 成功创建36573075次握手 (相等表示中间没有失败的), 总共处理了43806112个请求 (平均每次握手处理了1.2个数据请求)。
Reading -- nginx读取到客户端的Header信息数。
Writing -- nginx返回给客户端的Header信息数。
Waiting -- 开启keep-alive的情况下,这个值等于active - (reading + writing),意思就是Nginx说已经处理完正在等候下一次请求指令的驻留连接。

原创粉丝点击