Project

General

Profile

Mod status » History » Revision 13

Revision 12 (marmar, 2008-10-29 09:18) → Revision 13/21 (nitrox, 2008-10-29 19:59)

{{>toc}} 

 h1. Server Status 

 h2. Module: mod_status 

 .. meta:: 
   :keywords: lighttpd, server status 
  
 .. contents:: Table of Contents 

 h1. Description 

 The server status module generates the status overview of the webserver. The 
 information covers: 

 * uptime 
 * average throughput 
 * current throughput 
 * active connections and their state 


 We need to load the module first. 

   server.modules = ( ..., "mod_status", ... ) 

 By default the status page is disabled to hide internal information from 
 unauthorized users. 

   status.status-url = "/server-status" 

 If you want to open the status page just for users from the local network 
 cover it in a conditional. 

   $HTTP["remoteip"] == "10.0.0.0/8" { 
     status.status-url = "/server-status" 
   } 

 Or require authorization: 
  
   auth.require = ( "/server-status" =>  
     ( "realm" ... ) ) 


 Careful : mod_auth must be loaded *before* mod_status so it works. 

 Please note that when using the server.max-worker directive, the stati of the 
 childs are not combined yet, so you're going to see different stats with each 
 request. 


 h2. Output Format 


 By default a nice looking HTML page is generated. If you append ?auto to the 
 status-url you can get a text version which is simpler to parse. 

   Total Accesses: 1234 
   Total kBytes: 1043 
   Uptime: 1234 
   BusyServers: 123 

 Total Accesses is the number of handled requests, kBytes the overall outgoing  
 traffic, Uptime the uptime in seconds and BusyServers the number of currently 
 active connections. 

 The naming is kept compatible to Apache even if we have another concept and 
 don't start new servers for each connection. 

 h2. Server Statistics  

 The server statistics is a set of counters used to track the different stati in several modules. 
 For example :trac:`wiki:Docs:ModFastCGI mod_fastcgi` is using it to track the usage of the backends: 

   fastcgi.active-requests: 0 
   fastcgi.backend.fcgi-php.0.connected: 10127 
   fastcgi.backend.fcgi-php.0.died: 0 
   fastcgi.backend.fcgi-php.0.disabled: 0 
   fastcgi.backend.fcgi-php.0.load: 0 
   fastcgi.backend.fcgi-php.0.overloaded: 0 
   fastcgi.backend.fcgi-php.1.connected: 93855 
   fastcgi.backend.fcgi-php.1.died: 0 
   fastcgi.backend.fcgi-php.1.disabled: 0 
   fastcgi.backend.fcgi-php.1.load: 0 
   fastcgi.backend.fcgi-php.1.overloaded: 0 
   fastcgi.backend.fcgi-php.load: 1 
   fastcgi.requests: 399355 

   fastcgi.requests 

 is a counter of the requests since the start of the server. 

   fastcgi.active-requests 

 counter of the currently active requests in the module 

   fastcgi.backend.*.*.load 

 the active requests by backend. If the load is above the number 
 of backend processes/threads for this backend the requests will 
 have to wait until a this backend is working again. 

 h2. Options 

   status.status-url 

 relative URL which is used to retrieve the status-page 

 Default: unset 

 Example: 
   status.status-url = "/server-status" 

   status.enable-sort 
  
 add JavaScript which allows client-side sorting for the connection overview 

 Default: enable 

   status.config-url 

 relative URL for the config page which displays the loaded modules 

 Default: unset 

 Example: 

   status.config-url = "/server-config" 

   status.statistics-url 

 relative URL for a plain-text page containing the internal statistics 

 Default: unset 

 Example: 

   status.statistics-url = "/server-statistics" 

 Note: if you receive a 204 (no content / your browser doesn't seems to do anything) when requesting ''/server-statistics'' via your browser is because there's no counter data. Feels weird, but it's 100% correct (at least, for the HTTP standard)