/ 中存储网

Nginx服务器配置运行状态监控查看页面

2014-03-12 08:46:01 来源:kejihao
Stub Status模块(Stub Status),这个模块可以取得一些nginx的运行状态。

要使用这个模块必须在编译时指定下列编译参数:

--with-http_stub_status_module

示例配置:

location /nginx_status {

  stub_status on;

  access_log   off;

}

这个模块可以生成一个类似mathopd状态页面的纯文本信息:

Active connections: 291

server accepts handled requests

  16630948 16630948 31070465

Reading: 6 Writing: 179 Waiting: 106

active connections – 所有打开的连接,包括连接到后端服务器的。

server accepts handled requests – nginx已经接受并处理16630948个连接,31070465个请求(每个连接1.8个请求)。

reading – 正在读取的请求头。

writing – 正在读取的请求主体,正在处理的请求或者正在写入的应答。

waiting – keepalive连接数,等于active - (reading + writing)。