mod_status.html revision a236c0fe4abe4c5682c11c706c2399fbc90adbba
1549N/A<html><head>
1549N/A<title>Apache module mod_status</title>
1549N/A</head><body>
1549N/A
1549N/A<!--#include virtual="header.html" -->
1549N/A<h1>Module mod_status</h1>
1549N/A
1549N/AThe Status Module is only available in Apache 1.1 and later.<p>
1549N/A
1549N/A<h2>Function</h2>
1549N/A
1549N/AThe Status module allows a server administrator to find out how well
1549N/Atheir server is performing. A HTML page is presented that gives
1549N/Athe current server statistics in an easily readable form. If required
1549N/Athis page can be made to automatically refresh (given a compatible
1549N/Abrowser). Another page gives a simple machine-readable list of the current
1549N/Aserver state.
1549N/A<p>
1549N/AThe details given are:
1549N/A<ul>
1549N/A<li>The number of children serving requests
1549N/A<li>The number of idle children
1549N/A<li>The status of each child, the number of requests that child has
1549N/Aperformed and the total number of bytes served by the child (*)
1549N/A<li>A total number of accesses and byte count served (*)
1549N/A<li>The time the server was started/restarted and the
1549N/Atime it has been running for
1549N/A<li>Averages giving the number of requests per second,
1549N/Athe number of bytes served per second and the average number
1549N/Aof bytes per request (*)
1549N/A<li>The current percentage CPU used by each child and in total by
1549N/AApache (*)
1549N/A<li>The current hosts and requests being processed (*)
1549N/A</ul>
1549N/A
1549N/AA compile-time option must be used to display the details marked "(*)" as
1549N/Athe instrumentation required for obtaining these statistics does not
1549N/Aexist within standard Apache.
1549N/A
1549N/A<h2>Enabling Status Support</h2>
1549N/A
1549N/ATo enable status reports only for browsers from the foo.com
1549N/Adomain add this code to your <code>access.conf</code> configuration file
1549N/A<pre>
1549N/A &lt;Location /server-status&gt;
1549N/A SetHandler server-status
1549N/A
1549N/A order deny,allow
1549N/A deny from all
1549N/A allow from .foo.com
1549N/A &lt;/Location&gt;
1549N/A</pre>
1549N/A<p>
1549N/AYou can now access server statistics by using a Web browser to access the
1549N/Apage <code>http://your.server.name/server-status</code>
1549N/A<h3>Automatic Updates</h3>
1549N/AYou can get the status page to update itself automatically if you have
a browser that supports "refresh". Access the page
<code>http://your.server.name/server-status?refresh=N</code> to refresh the page
every N seconds.
<h3>Machine Readable Status File</h3>
A machine-readable version of the status file is available by accessing the
page <code>http://your.server.name/server-status?auto</code>. This is useful
when automatically run, see the Perl program in the <code>/support</code>
directory of Apache, <code>log_server_status</code>.
<h2>Full Instrumentation</h2>
To obtain full statistics you must compile Apache with a special
directive. On some machines there may be a small performance loss
if you do this. Try full statistics and see if you notice any
difference. If you do please contact <a href="mailto:mark@ukweb.com">
mark@ukweb.com</a> and tell me your configuration.
<p>
Do this by adding the following to the AUX_CFLAGS line in the
"Configuration" file and then recompiling as usual.
<pre>
AUX_CFLAGS= (something) -DSTATUS
</pre>
<BLOCKQUOTE>
<STRONG>
It should be noted that if <SAMP>mod_status</SAMP> is compiled into
the server, its handler capability is available in <EM>all</EM>
configuration files, including <EM>per</EM>-directory files
(<EM>e.g.</EM>, <SAMP>.htaccess</SAMP>). This may have
security-related ramifications for your site.
</STRONG>
</BLOCKQUOTE>
<!--#include virtual="footer.html" -->
</BODY>
</HTML>