有关nginx Status

Nginx 状态查看设置

如果要使用状态查看需要在编译时加入--with-http_stub_status_module选项

配置:

需要密码
location /nginx_status {
    # copied from http://blog.kovyrin.net/2006/04/29/monitoring-nginx-with-rrdtool/
    stub_status on;
    access_log   on;
    auth_basic   "NginxStatus";
    auth_basic_user_file conf/auth;
}
不需要密码 限制访问IP
location /nginx_status {
    # copied from http://blog.kovyrin.net/2006/04/29/monitoring-nginx-with-rrdtool/
    stub_status on;
    access_log   off;
    allow SOME.IP.ADD.RESS;
    deny all;
}

查看:
http://servername/nginx_status
每个参数的意义

Active connections: 291 
server accepts handled requests 
16630948 16630948 31070465 
Reading: 6 Writing: 179 Waiting: 106 
active connections ― 对后端发起的活动连接数 
server accepts handled requests ― nginx 总共处理了 16630948 个连接, 成功创建 16630948 次握手 (证明中间没有失败的), 总共处理了 31070465 个请求 (平均每次握手处理了 1.8个数据请求) 
reading ― nginx 读取到客户端的Header信息数 
writing ― nginx 返回给客户端的Header信息数 
waiting ― 开启 keep-alive 的情况下,这个值等于 active – (reading + writing),意思就是Nginx说已经处理完正在等候下一次请求指令的驻留连接
如果 reading + writing数较多,则说明并发访问量非常大,正在处理过程中。

http://wiki.nginx.org/HttpStubStatusModule




你可能感兴趣的:(nginx,技术,staus)