添加显示状态的字段
location /status {
stub_status on;
allow 10.0.95.5;
deny all;
access_log off;
}
重启nginx
访问http://192.168.33.252/status,
出现
Active connections: 95
server accepts handled requests
9947 9947 9950
Reading: 2 Writing: 93 Waiting: 0
active connections – 所有打开的连接,包括连接到后端服务器的。
server accepts handled requests – nginx已经接受并处理9947个连接,9950个请求
reading – 正在读取的请求头。
writing – 正在读取的请求主体,正在处理的请求或者正在写入的应答。
waiting – keepalive连接数,等于active – (reading + writing)。
转载于:https://blog.51cto.com/record/784725