First, Module introduction
The ngx_http_stub_status_module
module provides access to basic status information.
This module isn't built by default, it should are enabled with the --with-http_stub_status_module
configuration parameter.
This module provides access to the basic access status information;
Description: The status information includes the number of active connections, the total number of user requests that the server accepts has accepted, and the number of connections that the server handled has handled (typically server accepts and server handled are the same. That is, the number of user requests that have been accepted is the same as the number of connections that Nginx has processed, and the total amount of requests from the server requests users.
This module is not installed by default and can be configured when it is installed through the source code./configure Command plus --with-http_stub_status_module
这个参数这种方式启用该模块。
Second, about the module of the relevant configuration instructions
Configuration instance
1 location/basic_status {2 stub_status; 3 }
Location Configuration
This configuration can be enabled in the configuration module of HTTP or in a specific virtual host, and is typically enabled in a specific virtual host to count the actual access to the corresponding site. Specific where to turn on, see the actual situation
This configuration creates a simple Web page with basic status data which could look like as follows:
Active connections:291 Server accepts handled requests 16630948 16630948 31070465 reading:6 writing:179 waiting:10 6
instruction Description:
Syntax:stub_status;
default:-
Context:server, location
In versions prior to 1.7.5, the directive syntax required a arbitrary argument, for example, " stub_status on
".
before the 1.7.5 version, the syntax of the instruction requires an arbitrary parameter, such as " stub_status on
"
Related parameter description:
The following status information is Provided:active connections the current number of Active client connections Includi ng waiting connections.
The number of active connections currently, including the number of connections that are waiting accepts the total numbers of accepted client connections.
The total number of client connections that are currently accepted handled the handled connections. Generally, the parameter value is the same as accepts unless some resource limits has been reached ( forexample, the worker_connections limit).
Total number of connections processed. Typically, the value of this parameter is the same as the number of client connections currently accepted (accepts), unless Nginx restricts the number of connections to the user. Requests the total number of client requests.
Client requests reading the current number of connections where Nginx is reading the request header.
The number of connections to the request header is currently being read by Nginx, that is, the number of connections to the header that the connection is in and is being read by the Nginx writing the current numbers of connections where Nginx is W Riting the response back to the client.
The number of requests the current nginx is reading for its principal, or the number of requests that are processing its requested content, or the number of responses being sent to the client waiting the connections waiting
forA request.
The number of connections that remain connected in long-link mode, which is the active connection, normally reading+wirting
Nginx--> Advanced-->module-->ngx_http_stub_status_module