zoukankan      html  css  js  c++  java
  • nginx状态监控

    定义在server和locationb标签中
    源码编译安装需要加上该模块:--with-http_stub_status_module
    1.定义

    #vim /usr/local/nginx/conf/nginx.conf 
    location /status {
    	stub_status on;
    	access_log off;
    }
    #nginx -t 
    #nginx -s reload 
    


    2.访问

    http://192.168.1.31/status
    


    3.状态概述

    Active	connections:1 				//Nginx当前活跃连接数
    server	accepts	handled	requests request_time
    5 5 21 0
    server								//Nginx处理接收握手总次数。
    accepts								//表示Nginx处理接收总连接数。
    									//请求丢失数=(握手数-连接数)可以看出,本次状态显示没有丢失请求。
    handled	requests					//表示总共处理了19次请求。
    Reading								//Nginx读取数据
    Writing								//Nginx写的情况
    Waiting								//Nginx开启keep-alive的连接情况下,既没有读也没有写,建立连接情况
    
  • 相关阅读:
    Java多线程同步和异步问题
    最优二叉查找树
    岛屿的周长
    Mac 环境下 go 国内代理配置
    岛屿数量
    字符串解码
    环形链表 II
    颜色分类
    无重复字符的最长子串
    完全平方数
  • 原文地址:https://www.cnblogs.com/lovelinux199075/p/9052023.html
Copyright © 2011-2022 走看看