1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
3 <title>Apache module mod_status</title>
4 </head><!-- Background white, links blue (unvisited), navy (visited), red (active) -->
13 <!--#include virtual="header.html" -->
14 <h1 ALIGN="CENTER">Module mod_status</h1>
16 The Status Module is only available in Apache 1.1 and later.<p>
20 The Status module allows a server administrator to find out how well
21 their server is performing. A HTML page is presented that gives
22 the current server statistics in an easily readable form. If required
23 this page can be made to automatically refresh (given a compatible
24 browser). Another page gives a simple machine-readable list of the current
27 The details given are:
29 <li>The number of children serving requests
30 <li>The number of idle children
31 <li>The status of each child, the number of requests that child has
32 performed and the total number of bytes served by the child (*)
33 <li>A total number of accesses and byte count served (*)
34 <li>The time the server was started/restarted and the
35 time it has been running for
36 <li>Averages giving the number of requests per second,
37 the number of bytes served per second and the average number
38 of bytes per request (*)
39 <li>The current percentage CPU used by each child and in total by
41 <li>The current hosts and requests being processed (*)
44 A compile-time option must be used to display the details marked "(*)" as
45 the instrumentation required for obtaining these statistics does not
46 exist within standard Apache.
48 <h2>Enabling Status Support</h2>
50 To enable status reports only for browsers from the foo.com
51 domain add this code to your <code>access.conf</code> configuration file
53 <Location /server-status>
54 SetHandler server-status
62 You can now access server statistics by using a Web browser to access the
63 page <code>http://your.server.name/server-status</code>
65 Note that mod_status will only work when you are running Apache in
66 <A HREF="core.html#servertype">standalone</A> mode and not
67 <A HREF="core.html#servertype">inetd</A> mode.
69 <h3>Automatic Updates</h3>
70 You can get the status page to update itself automatically if you have
71 a browser that supports "refresh". Access the page
72 <code>http://your.server.name/server-status?refresh=N</code> to refresh the page
74 <h3>Machine Readable Status File</h3>
75 A machine-readable version of the status file is available by accessing the
76 page <code>http://your.server.name/server-status?auto</code>. This is useful
77 when automatically run, see the Perl program in the <code>/support</code>
78 directory of Apache, <code>log_server_status</code>.
80 <h2>Full Instrumentation</h2>
82 To obtain full statistics you must compile Apache with a special
83 directive. On some machines there may be a small performance loss
84 if you do this. Try full statistics and see if you notice any
85 difference. If you do please contact <a href="mailto:mark@ukweb.com">
86 mark@ukweb.com</a> and tell me your configuration.
90 Do this by adding the following to the AUX_CFLAGS line in the
91 "Configuration" file and then recompiling as usual.
93 AUX_CFLAGS= (something) -DSTATUS
98 It should be noted that if <SAMP>mod_status</SAMP> is compiled into
99 the server, its handler capability is available in <EM>all</EM>
100 configuration files, including <EM>per</EM>-directory files
101 (<EM>e.g.</EM>, <SAMP>.htaccess</SAMP>). This may have
102 security-related ramifications for your site.
105 <!--#include virtual="footer.html" -->