zoukankan      html  css  js  c++  java
  • nginx的stub_status状态信息解释

    [WEB] nginx的stub_status状态信息解释  

    一、加载http_stub_status模块

    [root@10.10.90.97 ~]# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module
    [root@10.10.90.97 ~]# make && make install

    二、修改nginx配置文件

    在server中,添加如下代码:
    location /NginxStatus {
      stub_status on;
      access_log on;
      auth_basic "NginxStatus";
      auth_basic_user_file htpasswd;
    }
    [root@10.10.90.97 ~]# htpasswd -c /usr/local/nginx/conf/htpasswd nginx_focus #连续输入两次密码
    New password:
    Re-type new password:
    Adding password for user nginx_focus
    重新加载nginx.conf:

    [root@10.10.90.97 ~]# kill -USR1 `cat /usr/local/nginx/logs/nginx.pid`
       

    三、打开nginx的stub_status可以通过页面链接看到如下信息:

    Active connections: 145
    server accepts handled requests
     1749 1749 3198
    Reading: 0 Writing: 3 Waiting: 142
    参数详解:  
    Active connections:145           
    #nginx 正处理的活动连接数145个。
    server accepts handled requests
     1749 1749 3198                   
    #nginx启动到现在共处理了 1749个连接 ,nginx启动到现在共成功创建 1749次握手 请求丢失数=(握手-连接),可以看出,我们没丢请求;总共处理了3198 次请求。
    Reading: 0 Writing: 3 Waiting: 142
    #Reading :nginx读取到客户端的Header信息数。
    #Writing : nginx返回给客户端的Header信息数。
    #Waiting : Nginx已经处理完正在等候下一次请求指令的驻留连接.开启keep-alive的情况下,这个值等于active–(reading+writing)。
          
  • 相关阅读:
    PopupWindow设置动画效果
    android判断是否含有某权限
    每日一更提醒
    利用Pattern和Mather来禁止特殊字符的输入
    Android毛玻璃处理代码(Blur)
    how to render html tag
    数组
    复杂度分析
    书写markdown的利器
    cannot insert multiple commands into a prepared statement问题原因及解决办法
  • 原文地址:https://www.cnblogs.com/derekchen/p/2429397.html
Copyright © 2011-2022 走看看