怎么看nginx的status

 

首先要查看nginx的status需要在编译nginx的时候加上--with-http_stub_status_module。
然后在nginx.conf的server段中定义类似如下内容:
location /status {
  stub_status on;
  access_log   off;
  allow SOME.IP.ADD.RESS;
  deny all;
}

访问http://ip.ad.dr.ess/status
Active connections: 1597
server accepts handled requests
 3077942 3077942 7823838
Reading: 41 Writing: 83 Waiting: 1473
active connections — 对后端发起的活动连接数 
server accepts handled requests — nginx 总共处理了 3077942 个连接, 成功创建 3077942 次握手 (证明中间没有失败的), 总共处理了 7823838 个请求
reading — nginx 读取到客户端的Header信息数 
writing — nginx 返回给客户端的Header信息数 
waiting — 开启 keep-alive 的情况下,这个值等于 active – (reading + writing),意思就是Nginx说已经处理完正在等候下一次请求指令的驻留连接

 

转载请注明:来自黄诗文的小窝
本文地址:http://www.huangshiwen.com/2011/03/6/nginx_status.html



0 条评论

我要留言