mod_status.html revision 52a4de2f02f994ab073ef65fc760bc5899012a57
2e29e4797a48d78d669821722bdb54fd0a1d3b94Timo Sirainen<!--#include virtual="header.html" -->
2e29e4797a48d78d669821722bdb54fd0a1d3b94Timo SirainenThe Status Module is only available in Apache 1.1 and later.<p>
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo SirainenThe Status module allows a server administrator to find out how well
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo Sirainentheir server is performing. A HTML page is presented that gives
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo Sirainenthe current server statistics in an easily readable form. If required
91e2dc36b9c0c91f0af716be81dc2aa6cbbed6c2Timo Sirainenthis page can be made to automatically refresh (given a compatible
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo Sirainenbrowser). Another page gives a simple machine-readable list of the current
2e29e4797a48d78d669821722bdb54fd0a1d3b94Timo SirainenThe details given are:
0f39a57760d93cddbce3ca43096d78e0fe2f42fdTimo Sirainen<li>The number of children serving requests
3313a51ef9b245248d672c20f930c52a577a42f7Timo Sirainen<li>The number of idle children
0f39a57760d93cddbce3ca43096d78e0fe2f42fdTimo Sirainen<li>The status of each child, the number of requests that child has
3313a51ef9b245248d672c20f930c52a577a42f7Timo Sirainenperformed and the total number of bytes served by the child (*)
0f39a57760d93cddbce3ca43096d78e0fe2f42fdTimo Sirainen<li>A total number of accesses and byte count served (*)
3313a51ef9b245248d672c20f930c52a577a42f7Timo Sirainen<li>The time the server was started/restarted and the
3313a51ef9b245248d672c20f930c52a577a42f7Timo Sirainentime it has been running for
0f39a57760d93cddbce3ca43096d78e0fe2f42fdTimo Sirainen<li>Averages giving the number of requests per second,
3313a51ef9b245248d672c20f930c52a577a42f7Timo Sirainenthe number of bytes served per second and the average number
3313a51ef9b245248d672c20f930c52a577a42f7Timo Sirainenof bytes per request (*)
0f39a57760d93cddbce3ca43096d78e0fe2f42fdTimo Sirainen<li>The current percentage CPU used by each child and in total by
0f39a57760d93cddbce3ca43096d78e0fe2f42fdTimo Sirainen<li>The current hosts and requests being processed (*)
3313a51ef9b245248d672c20f930c52a577a42f7Timo SirainenA compile-time option must be used to display the details marked "(*)" as
3313a51ef9b245248d672c20f930c52a577a42f7Timo Sirainenthe instrumentation required for obtaining these statistics does not
3313a51ef9b245248d672c20f930c52a577a42f7Timo Sirainenexist within standard Apache.
ee6df9526e9716b3f1734d85b566e00fc41208bcTimo SirainenTo enable status reports only for browsers from the foo.com
cd75c360f244c96b9ee10e01ee3a66fad13183c8Timo Sirainendomain add this code to your <code>access.conf</code> configuration file
c2f24d55319fad0b6c03425f402f0cb0cb1a318bTimo Sirainen <Location /server-status>
6fabfb7bbfd88d0c1de66981e52850f26067623bTimo Sirainen SetHandler server-status
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo Sirainen order deny,allow
2e29e4797a48d78d669821722bdb54fd0a1d3b94Timo Sirainen deny from all
e9503210d3521a6833ed62dc332fc42ffb0e7a13Timo Sirainen </Location>
2e29e4797a48d78d669821722bdb54fd0a1d3b94Timo SirainenYou can now access server statistics by using a Web browser to access the
b0e9375a1ff97c9c7d40655922af5ccc73ecaa76Timo Sirainenpage <code>http://your.server.name/server-status</code>
b0e9375a1ff97c9c7d40655922af5ccc73ecaa76Timo SirainenYou can get the status page to update itself automatically if you have
2e29e4797a48d78d669821722bdb54fd0a1d3b94Timo Sirainena browser that supports "refresh". Access the page
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo Sirainen<code>http://your.server.name/server-status?refresh=N</code> to refresh the page
f08c6da58d4cffc5b4777485ebc475dff614e491Timo Sirainenevery N seconds.
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo SirainenA machine-readable version of the status file is available by accessing the
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo Sirainenpage <code>http://your.server.name/server-status?auto</code>. This is useful
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo Sirainenwhen automatically run, see the Perl program in the <code>/support</code>
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo Sirainendirectory of Apache, <code>log_server_status</code>.
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo SirainenTo obtain full statistics you must compile Apache with a special
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo Sirainendirective. On some machines there may be a small performance loss
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo Sirainenif you do this. Try full statistics and see if you notice any
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo Sirainendifference. If you do please contact <a href="mailto:mark@ukweb.com">
1aad8ad0590bee2d09d5fdb5413af72e2a8e156aTimo Sirainenmark@ukweb.com</a> and tell me your configuration.
91e2dc36b9c0c91f0af716be81dc2aa6cbbed6c2Timo SirainenDo this by adding the following to the AUX_CFLAGS line in the
e9371f899a3d4207a0ffd3923ea5ec7250cf5e75Timo Sirainen"Configuration" file and then recompiling as usual.
43d3ea2780b5f8557ede7b4c039e8f56cb8d357dTimo Sirainen AUX_CFLAGS= (something) -DSTATUS
e9371f899a3d4207a0ffd3923ea5ec7250cf5e75Timo Sirainen<!--#include virtual="footer.html" -->