Nginx-->进阶-->Module-->ngx_http_stub_status_module

一、模块介绍

The ngx_http_stub_status_module module provides access to basic status information.

This module is not built by default, it should be enabled with the --with-http_stub_status_module configuration parameter.

这个模块提供了访问的基本访问状态信息;

说明:状态信息包括活动连接数、server accepts已经接受的用户请求的总个数、server handled即nginx已经处理的连接数(一般情况server accepts和server handled是相同的,即为已经接受的用户请求个数和nginx已经处理完成的连接数是相同的)、server requests用户的请求总数。

这个模块默认情况下是没有安装的,可以在配置的时候即为通过源码安装时./configure命令加上 --with-http_stub_status_module这个参数这种方式启用该模块。

二、关于该模块的相关配置说明

配置实例

1 location /basic_status {
2     stub_status;
3 }

location配置

该配置可以在http的配置模块中启用,也可以在具体的虚拟主机中启用,一般情况下是在某个具体的虚拟主机中启用,其目的是统计对应的站点的实际访问情况。具体在哪里启用,看实际情况This configuration creates a simple web page with basic status data which may look like as follows:
Active connections: 291
server accepts handled requests
 16630948 16630948 31070465
Reading: 6 Writing: 179 Waiting: 106 指令说明:Syntax:     stub_status;Default:     —Context:     server, locationIn versions prior to 1.7.5, the directive syntax required an arbitrary argument, for example, “stub_status on”.在1.7.5版本之前,指令的语法需要一个任意参数,例如“stub_status on”相关参数说明:
The following status information is provided:

Active connections
    The current number of active client connections including Waiting connections.   当前的活动连接数的个数,包括正在等待的连接数
accepts
    The total number of accepted client connections.   当前被接受的客户端连接总数
handled
    The total number of handled connections. Generally, the parameter value is the same as accepts unless some resource limits have been reached (for example, the worker_connections limit).  所有被处理的连接数总数。通常情况下,这个参数的值和当前被接受的客户端连接数是相同的(accepts),除非nginx对用户的连接数做了限制。
requests
    The total number of client requests.   客户端请求的个数
Reading
    The current number of connections where nginx is reading the request header.   当前nginx正在读取请求头部信息的连接数的个数,也就是说这个连接连进来了并且正在被nginx读取请求的头部的连接数的个数
Writing
    The current number of connections where nginx is writing the response back to the client.   当前nginx正在读取其主体的请求的个数,或者正在处理其请求内容的请求的个数,或者正在向客户端发送响应的个数
Waiting
    The current number of idle client connections waiting for a request.   长链接模式的保持连接的连接个数,即为正处于活动状态的连接,正常情况下为reading+wirting
时间: 2024-08-04 19:56:39

Nginx-->进阶-->Module-->ngx_http_stub_status_module的相关文章

Nginx - SSI Module

SSI, for Server Side Includes, is actually a sort of server-side programming language interpreted by Nginx. Its name is based on the fact that the most used functionality of the language is the include command. Back in the 1990s, such languages were

转:使用 Nginx Upload Module 实现上传文件功能

普通网站在实现文件上传功能的时候,一般是使用Python,Java等后端程序实现,比较麻烦.Nginx有一个Upload模块,可以非常简单的实现文件上传功能.此模块的原理是先把用户上传的文件保存到临时文件,然后在交由后台页面处理,并且把文件的原名,上传后的名称,文件类型,文件大小set到页面.下面和大家具体介绍一下. 一.编译安装Nginx 为了使用Nginx Upload Module,需要编译安装Nginx,将upload module编译进去.upload module的代码可以去Gith

Nginx - Events Module

The Events module comes with directives that allow you to configure network mechanisms. Some of the parameters have an important impact on the application's performance. All of the directives listed in the following table must be placed in the events

nginx上传模块—nginx upload module-

一. nginx upload module原理 官方文档: http://www.grid.net.ru/nginx/upload.en.html Nginx upload module通过nginx服务来接受用户上传的文件,自动解析请求体中存储的所有文件上传到upload_store指定的目录下.这些文件信息从原始请求体中分离并根据nginx.conf中的配置重新组装好上传参数,交由upload_pass指定的段处理,从而允许处理任意上传文件.每个上传文件中的file字段值被一系列的uplo

Nginx Upload Module 上传模块

传统站点在处理文件上传请求时,普遍使用后端编程语言处理,如:Java.PHP.Python.Ruby等.今天给大家介绍Nginx的一个模块,Upload Module上传模块,此模块的原理是先把用户上传的文件保存到临时文件,然后在交由后台页面处理,并且把文件的原名,上传后的名称,文件类型,文件大小set到页面. GitHub: https://github.com/vkholodkov/nginx-upload-module/tree/2.2 Site: http://wiki.nginx.or

Nginx进阶

常见的web架构 LAMP - Linux +Apache +MySQL + PHP LNMP - Linux +Nginx + Mysql + PHP RHEL开源  Linux系统  RHEL CentOS Fedora 开源 --- 开放源代码 Nginx和Apache本身对动态网页没有处理能力 ----> PHP Apache + PHP ---->apxs命令 ---> DSO方式 把libphp5.so模块插入到apache 配置中 Nginx + PHP --->通过

架构设计:负载均衡层设计方案(3)——Nginx进阶

上篇文章<架构设计:负载均衡层设计方案(2)——Nginx安装>(http://blog.csdn.net/yinwenjie/article/details/46620711),我们介绍了Nginx的核心设计思想.基本安装和使用.本来准备继续介绍Nginx的几个使用特性,但是奈何博文篇幅太长,只有将一篇文章拆成两篇.本文我们将承接上文,继续讲解Nginx的实用特性,包括gzip功能.rewirte功能和一个第三方的节点监测模块.本文我们还将提到Taobao团队对Nginx的深度改造Tengi

Nginx - Rewrite Module

Initially, the purpose of this module (as the name suggests) is to perform URL rewriting. This mechanism allows you to get rid of ugly URLs containing multiple parameters, for instance, http://example.com/article. php?id=1234&comment=32 — such URLs b

Nginx - Core Module Directives

The following is the list of directives made available by the Core module. Most of these directives must be placed at the root of the configuration file and can only be used once. However, some of them are valid in multiple contexts. If that is the c

saltstack部署nginx进阶

上一篇其实对通过saltstack部署nginx做了演示,但是可能与我目前的环境还是有点出入,然后sls的结构也不太清晰,所以就又做了改变和优化,叫做进阶可能有点噱头了,不过还是记录如下: nginx安装目标: 1)安装必要依赖 2)准备pcre安装包 2)源码安装pcre 3)准备nginx安装包 4)源码安装nginx nginx配置: 1)拷贝nginx.conf配置文件 2)拷贝启停脚本 3)添加系统服务并设置开机启动 4)拷贝日志切割脚本 5)添加定时任务 salt master上的目