mod_status.html revision 52a4de2f02f994ab073ef65fc760bc5899012a57
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder<!--#include virtual="header.html" -->
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian MaederThe Status Module is only available in Apache 1.1 and later.<p>
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian MaederThe Status module allows a server administrator to find out how well
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maedertheir server is performing. A HTML page is presented that gives
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maederthe current server statistics in an easily readable form. If required
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maederthis page can be made to automatically refresh (given a compatible
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maederbrowser). Another page gives a simple machine-readable list of the current
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian MaederThe details given are:
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder<li>The number of children serving requests
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder<li>The number of idle children
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder<li>The status of each child, the number of requests that child has
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maederperformed and the total number of bytes served by the child (*)
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder<li>A total number of accesses and byte count served (*)
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder<li>The time the server was started/restarted and the
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maedertime it has been running for
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder<li>Averages giving the number of requests per second,
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maederthe number of bytes served per second and the average number
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maederof bytes per request (*)
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder<li>The current percentage CPU used by each child and in total by
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder<li>The current hosts and requests being processed (*)
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian MaederA compile-time option must be used to display the details marked "(*)" as
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maederthe instrumentation required for obtaining these statistics does not
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maederexist within standard Apache.
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian MaederTo enable status reports only for browsers from the foo.com
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maederdomain add this code to your <code>access.conf</code> configuration file
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder <Location /server-status>
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder SetHandler server-status
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder order deny,allow
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder deny from all
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder </Location>
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian MaederYou can now access server statistics by using a Web browser to access the
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maederpage <code>http://your.server.name/server-status</code>
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian MaederYou can get the status page to update itself automatically if you have
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maedera browser that supports "refresh". Access the page
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder<code>http://your.server.name/server-status?refresh=N</code> to refresh the page
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maederevery N seconds.
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian MaederA machine-readable version of the status file is available by accessing the
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maederpage <code>http://your.server.name/server-status?auto</code>. This is useful
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maederwhen automatically run, see the Perl program in the <code>/support</code>
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maederdirectory of Apache, <code>log_server_status</code>.
ba904a15082557e939db689fcfba0c68c9a4f740Christian MaederTo obtain full statistics you must compile Apache with a special
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maederdirective. On some machines there may be a small performance loss
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maederif you do this. Try full statistics and see if you notice any
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maederdifference. If you do please contact <a href="mailto:mark@ukweb.com">
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maedermark@ukweb.com</a> and tell me your configuration.
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian MaederDo this by adding the following to the AUX_CFLAGS line in the
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder"Configuration" file and then recompiling as usual.
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder AUX_CFLAGS= (something) -DSTATUS
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder<!--#include virtual="footer.html" -->