如何查看nginx运行状态及相关属性说明

如何查看nginx运行状态及相关属性说明。

需要查看nginx是否已经加载了 http_stub_status_module模块

/usr/sbin/nginx  -V 查看nginx的安装状态

nginx.conf中加入:
location /status {
stub_status on;
access_log off;
}

访问地址:http://yours/status
会看到如下信息:
Active connections: 557
server accepts handled requests
36573075 36573075 43806112
Reading: 3 Writing: 16 Waiting: 538
其中:
Active connections -- 对后端发起的活动连接数。
server accepts handled requests -- nginx总共处理了36573075个连接, 成功创建36573075次握手 (相等表示中间没有失败的), 总共处理了43806112个请求 (平均每次握手处理了1.2个数据请求)。
Reading -- nginx读取到客户端的Header信息数。
Writing -- nginx返回给客户端的Header信息数。
Waiting -- 开启keep-alive的情况下,这个值等于active - (reading + writing),意思就是Nginx说已经处理完正在等候下一次请求指令的驻留连接。

时间: 2024-07-29 14:24:41

如何查看nginx运行状态及相关属性说明的相关文章

在浏览器里查看Nginx和PHP-FPM的运行状态

查看Nginx状态 location /nginx_status { stub_status on; access_log off; allow 127.0.0.1; deny all; } curl http://127.0.0.1/nginx_status http://nginx.org/en/docs/http/ngx_http_status_module.html 输出样例: Active connections: 3 server accepts handled requests 1

HTTP缓存相关属性的服务器配置

http://blog.csdn.net/goldlevi/article/details/7705160 之前和网络部门的人一起搭建我们的下载服务器,里面涉及了cache-control/expires的设置,之前每日更新也出现了文件无法下载的情况,最后发现是因为Lastmodified参数的值有变动.这里我把之前整理的与缓存有关系的HTTP头的资料和大家分享一下. 一.     基本知识: 先大概总结一下相关属性的含义. 1.Expires属性 Expires(过期时间)属性是HTTP控制缓

如何查看nginx状态?如何统计访问量?

nginx是个什么玩意儿本文不再多说,直奔主题! 1. 如何查看nginx的状态? stub_status 模块介绍 stub_status 模块主要用于查看Nginx的一些状态信息. 本模块默认是不会编译进Nginx的,如果你要使用该模块,则要在编译安装Nginx时指定: ./configure –with-http_stub_status_module 一.查看已安装的 Nginx 是否包含 stub_status 模块 #/usr/local/nginx/sbin/nginx -V 如果包

Android总结篇系列:Activity Intent Flags及Task相关属性

同上文一样,本文主要引用自网上现有博文,并加上一些自己的理解,在此感谢原作者. 原文地址: http://blog.csdn.net/liuhe688/article/details/6761337 -------------------------------------------------------------------------- 今天我们来讲一下Activity的task相关内容. 上次我们讲到Activity的四种启动模式的时候,已经了解到一些关于task的技术,今天我再向大

linux中查看nginx、apache、php、mysql配置文件路径的方法

转自:http://www.phper163.com/archives/368 如何在linux中查看nginx.apache.php.mysql配置文件路径了,如果你接收一个别人配置过的环境,但没留下相关文档.这时该怎么判断找到正确的加载文件路径了.可以通过以下来判断1.判断apache首先执行命令找到httpd路径ps aux | grep httpd如httpd路径为 /usr/local/apache/bin/httpd然后执行以下命令/usr/local/apache/bin/http

查看nginx | apache | php | tengine | tomcat版本的信息以及如何隐藏版本信息

昨天配置nginx的时候说道隐藏版本信息的问题,今天就罗列一下 要操作的信息列表 nginx版本信息查询及隐藏 Apache版本信息查询及隐藏 php版本信息查询及隐藏 tengine版本信息查询及隐藏 tomcat版本信息查询及隐藏 详细操作步骤 1.1.nginx版本信息查询       [[email protected]_nginx ~]# nginx -vnginx version: nginx/1.6.0 1.2.nginx编译配置参数查询        [[email protec

12.13 Nginx防盗链;12.14 Nginx访问控制;12.15 Nginx解析php相关配

扩展: 502问题汇总  : http://ask.apelearn.com/question/9109 location优先级 : http://blog.lishiming.net/?p=100 12.13 Nginx防盗链 设定目录访问受限: 1. 配置test.com网站目录的防盗链,编辑虚拟主机配置文件 : [[email protected] ~]# vim /usr/local/nginx/conf/vhost/test.com.conf 插入黄框内容(注释掉红框行): locat

Nginx防盗链 Nginx访问控制 Nginx解析php相关配置 Nginx代理

12.13 Nginx防盗链cd /usr/local/nginx/conf/vhostvi test.com.conf将以上内容复制到下图位置测试,成功前提data/wwwroot/test.com目录下要有1.gif12.14 Nginx访问控制cd /usr/local/nginx/conf/vhostvi test.com.confFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=" alt="Nginx

四十九、Nginx防盗链、Nginx访问控制、Nginx解析PHP相关配置、Nginx代理

一.Nginx防盗链 必须和"不记录日志和过期时间"结合在一起,因为它们同时用到了location. # vim /usr/local/nginx/conf/vhost/test.com.conf location ~* ^.+\.(gif|jpg|png|bmp|swf|jpeg|flv|rar|zip|doc|pdf|gz|bz2|xls)$ { expires 7d;    过期时间 valid_referers none blocked server_names *.test.