分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 网页技术

Nginx输出基本状态信息(Ngx_http_stub_module模块)

发布时间:2023-09-06 01:21责任编辑:赖小花关键词:http

输出Nginx基本状态信息(Ngx_http_stub_status_module)

官方文档:http://nginx.org/en/docs/http/ngx_http_status_module.html

官方定义:

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.

  注意:此模块在编译时启动,指定--with-http_stub_status_module;

#Example Configurationlocation /basic_status {    stub_status;}

Syntax:stub_status;
Default:
Context:server, location

Context:适用配置段


演示环境:

Server:192.168.47.140[root@GaoServer ~]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) [root@GaoServer ~]# uname -r3.10.0-327.el7.x86_64[root@GaoServer ~]# nginx -Vnginx version: nginx/1.10.2......

相关配置:

[root@GaoServer ~]# vim /etc/nginx/conf.d/Vhost.confserver {        listen 80;        location /status {                stub_status;        }}#测试[root@GaoServer ~]# curl http://192.168.47.140/statusActive connections: 1 server accepts handled requests 23 23 50 Reading: 0 Writing: 1 Waiting: 0

状态信息定义:(官方定义)

Active connections:  #当前的活动连接数(包括Waiting状态的连接);

    The current number of active client connections including Waiting connections.

accepts:  #从Nginx启动到此时一共已经接收的请求数;

    The total number of accepted client connections.

handled:  #已经被处理完成的请求;

    The total number of handled connections. Generally, the parameter value is the same as acceptsunless some resource limits have been reached (for example, the worker_connections limit).

requests:  #客户端发来的总请求数;

    The total number of client requests.

Reading:  #Nginx读取客户端请求报文的连接数;

    The current number of connections where nginx is reading the request header.

Writing:  #Nginx处于向客户端发送响应报文的连接数;

    The current number of connections where nginx is writing the response back to the client.

Waiting:  #等待客户端发送新请求的空闲连接数;

    The current number of idle client connections waiting for a request.

Nginx输出基本状态信息(Ngx_http_stub_module模块)

原文地址:http://gning.blog.51cto.com/11847592/1977171

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved