Sharing

2013年10月8日 星期二

How to get Apache status

Apache Document:
http://httpd.apache.org/docs/

Enable mod_status

http://httpd.apache.org/docs/2.2/mod/mod_status.html

Sample: http://www.apache.org/server-status



Get Server Status From Command Line


By LYNX

http://www.cpanelkb.net/apache-status-in-command-line/


$ wget -q -O - --no-proxy http://10.42.93.36/server-status | lynx -stdin                                                                                                                       Apache Status (p1 of 2)
                                                     Apache Server Status for 10.42.93.36                                                     
                                                                                                                                              
   Server Version: Apache/2.2.22 (Ubuntu) mod_apreq2-20090110/2.8.0 mod_perl/2.0.5 Perl/v5.14.2                                               
   Server Built: Feb 13 2013 16:06:29                                                                                                         
     ________________________________________________________________________________________________________________________________         
                                                                                                                                              
   Current Time: Wednesday, 09-Oct-2013 06:22:36 BST                                                                                          
   Restart Time: Wednesday, 09-Oct-2013 04:01:27 BST                                                                                          
   Parent Server Generation: 0                                                                                                                
   Server uptime: 2 hours 21 minutes 8 seconds                                                                                                
   Total accesses: 322 - Total Traffic: 198 kB                                                                                                
   CPU Usage: u4.58 s.26 cu0 cs0 - .0572% CPU load                                                                                            
   .038 requests/sec - 23 B/second - 629 B/request                                                                                            
   1 requests currently being processed, 5 idle workers                                                                                       
                                                                                                                                              
_____W..........................................................                                                                              
................................................................                                                                              
................................................................                                                                              
................................................................                                                                              
                                                                                                                                              
   Scoreboard Key:                                                                                                                            
   "_" Waiting for Connection, "S" Starting up, "R" Reading Request,                                                                          
   "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,                                                                                   
   "C" Closing connection, "L" Logging, "G" Gracefully finishing,                                                                             
   "I" Idle cleanup of worker, "." Open slot with no current process                                                                          
                                                                                                                                              
   Srv PID    Acc   M CPU  SS  Req Conn Child Slot   Client       VHost                 Request                                               
   0-0 3575 0/55/55 _ 0.46 104 3   0.0  0.02  0.02 10.42.93.36 safesync.com GET / HTTP/1.1                                                    
   1-0 3576 0/55/55 _ 1.20 36  0   0.0  0.05  0.05 10.42.93.36 safesync.com GET /server-status HTTP/1.1                                       
   2-0 3577 0/55/55 _ 0.99 18  39  0.0  0.03  0.03 10.42.93.36 safesync.com GET /login HTTP/1.1                                               
   3-0 3578 0/55/55 _ 0.45 9   2   0.0  0.03  0.03 10.42.93.36 safesync.com GET / HTTP/1.1                                                    
   4-0 3579 0/54/54 _ 0.70 117 0   0.0  0.03  0.03 10.42.93.36 safesync.com GET /server-status?auto HTTP/1.1                                  
   5-0 5702 0/48/48 W 1.04 0   0   0.0  0.04  0.04 10.42.93.36 safesync.com GET /server-status HTTP/1.1                                       
     ________________________________________________________________________________________________________________________________         
                                                                                                                                              
    Srv  Child Server number - generation                                                                                                     
    PID  OS process ID                                                                                          

By Auto Parameter


$ wget -q -O - --no-proxy http://10.42.93.36/server-status?auto
Total Accesses: 324
Total kBytes: 202
CPULoad: .0567675
Uptime: 8526
ReqPerSec: .0380014
BytesPerSec: 24.2608
BytesPerReq: 638.42
BusyWorkers: 1
IdleWorkers: 5
Scoreboard: W_____..........................................................................................................................................................................................................................................................






沒有留言: