curl http://localhost:80/nginx_status :404

 

#curl http://192.168.59.103:80/nginx_status 报错,提示404

nginx 可以通过with-http_stub_status_module模块来监控nginx的一些状态信息

查看否有with-http_stub_status_module该模块

#nginx -V

 

 

 

 

修改配置文件

加入以下内容

location /nginx_status {
stub_status on;
access_log off;
#allow 127.0.0.1;允许哪个ip可以访问
}

 

 重启nginx

Active connections

当前活动客户端连接数,包括Waiting连接数

 

server:
accepts
已接受的客户端连接总数
handled
处理的连接总数。通常,参数值与accepts 除非已达到某些资源限制(例如, worker_connections限制)相同
requests
客户端请求的总数


Reading
nginx正在读取请求标头的当前连接数。
Writing
nginx将响应写回客户端的当前连接数。
Waiting
当前等待请求的空闲客户端连接数。

 

posted @   leihongnu  阅读(1308)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
点击右上角即可分享
微信分享提示