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