nginx 모니터링 모듈 httpstub_status_모듈 설치

1956 단어 nginx
        ,        ,            ,             ,    。          ,          ,       。          http_stub_status_module   nginx   。  ,nginx linux                 ,     linux  nginx    。
      ,   nginx -V  ,   :
nginx version: nginx/1.10.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) 
configure arguments: --user=nginx --group=nginx --with-http_stub_status_module
      ,  http_stub_status_module      ,             。
http_stub_status_module     nginx    ,  nginx           。    nginx     ,           :
 1 :rm -rf nginx-1.10.1   //     nginx     ,        
 2 :tar -xf nginx-1.10.1.tar.gz  //     
 3 :cd nginx-1.10.1/  //      
 4 :       nginx      ,               :
      /usr/sbin/groupadd -f nginx
      /usr/sbin/useradd -g nginx nginx
 5 :  configure  :./configure --with-http_stub_status_module
 6 :make
 7 :cd /usr/local/nginx/sbin/
 8 :mv nginx  nginx.bak  //     
 9 :cp /usr/local/nginx-1.10.1/objs/nginx /usr/local/nginx/sbin/ //     nginx           
 10 :vi /usr/local/nginx/conf/nginx.conf //      ,  :
       location /nginx_status {
         stub_status on;
         access_log off;
       }
 11 :nginx -s reload //    nginx    
 12 :curl 127.0.0.1/nginx_status  //   ,     :
       Active connections: 2 
       server accepts handled requests
       7 7 249 
       Reading: 0 Writing: 1 Waiting: 1 
               ,     kill -9  nginx  ,    。
         :
Active connections:            
Server accepts handled requests:      7   ,    7   (         ),     249   .
Reading: nginx       Header   .
Writing: nginx       Header   .
        reading writing    ,            ,                 ,      
       。
Waiting:   keep-alive    ,      Active – (Reading + Writing),    nginx      ,   
             .  ,      ,             ,Waiting        .waiting     
         ,              ,              ,                   。     writing reading  “  ”, waiting  “  ”。


    :https://www.cnblogs.com/fuzhongfaya/p/7808467.html

좋은 웹페이지 즐겨찾기