Skip to content

Instantly share code, notes, and snippets.

@richardqin
Created March 25, 2012 12:37
Show Gist options
  • Save richardqin/2193322 to your computer and use it in GitHub Desktop.
Save richardqin/2193322 to your computer and use it in GitHub Desktop.
monitor the status of nginx
location /nginx_status {
stub_status on;
access_log off;
allow 192.168.1.1;
deny all;
}
active connections:nginx 正处理的活动连接数 20个。
server accepts handled requests:nginx启动到现在共处理了 200个连接 , 成功创建 200 次握手 一般跟第一个一样,差值为请求丢失数。
reading :nginx 读取到客户端的 Header 信息数。
writing : nginx 返回给客户端的 Header 信息数。
waiting :开启 keep-alive 的情况下,这个值等于 active - (reading + writing),意思就是 Nginx 已经处理完正在等候下一次请求指令的驻留连接。
这个状态信息,从nginx启动算起,包括重载配置文件,也会清零
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment