1.添加nginx状态信息配置项:
修改nginx配置文件,在http下添加server。
-
# vim /usr/local/nginx/conf/nginx.conf
-
server {
-
listen 80;
-
server_name localhost www.abc.com;
-
location ~ ^/NginxStatus {
-
stub_status on;
-
access_log on;
-
allow all;
-
}
重载nginx服务中
-
# /usr/local/nginx/sbin/nginx -s reload
-
# curl
-
Active connections: 16418
server accepts handled requests
10154446441 10154446441 15444288409
Reading: 1 Writing: 201 Waiting: 16216
-
nginx status解释:
Active connections: 16418 #当前活跃的连接数量
server accepts handled requests
10154446441 10154446441 15444288409 #处理连接总和:10154446441,一共握手10154446441次,15444288409次请求。
Reading: 1 Writing: 201 Waiting: 16216 #读取客户端的连接1个,响应客户端的连接数据201个,由于开启了keep-alive,值是16418-reading-writing,大意是处理完成等候下一次请求的驻留连接数。
阅读(1174) | 评论(0) | 转发(0) |