mod_status.html revision a236c0fe4abe4c5682c11c706c2399fbc90adbba
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<html><head>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<title>Apache module mod_status</title>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China</head><body>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<!--#include virtual="header.html" -->
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<h1>Module mod_status</h1>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing ChinaThe Status Module is only available in Apache 1.1 and later.<p>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<h2>Function</h2>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing ChinaThe Status module allows a server administrator to find out how well
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinatheir server is performing. A HTML page is presented that gives
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinathe current server statistics in an easily readable form. If required
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinathis page can be made to automatically refresh (given a compatible
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinabrowser). Another page gives a simple machine-readable list of the current
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinaserver state.
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<p>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing ChinaThe details given are:
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<ul>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<li>The number of children serving requests
a56d24ea912a4459d5c9470f9acbc39a73339568Mark Johnson<li>The number of idle children
a56d24ea912a4459d5c9470f9acbc39a73339568Mark Johnson<li>The status of each child, the number of requests that child has
a56d24ea912a4459d5c9470f9acbc39a73339568Mark Johnsonperformed and the total number of bytes served by the child (*)
a56d24ea912a4459d5c9470f9acbc39a73339568Mark Johnson<li>A total number of accesses and byte count served (*)
a56d24ea912a4459d5c9470f9acbc39a73339568Mark Johnson<li>The time the server was started/restarted and the
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinatime it has been running for
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<li>Averages giving the number of requests per second,
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinathe number of bytes served per second and the average number
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinaof bytes per request (*)
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<li>The current percentage CPU used by each child and in total by
6d0043d8d3eb6aec4dcd2a08b6f9ec812da10113Robert MustacchiApache (*)
6d0043d8d3eb6aec4dcd2a08b6f9ec812da10113Robert Mustacchi<li>The current hosts and requests being processed (*)
6d0043d8d3eb6aec4dcd2a08b6f9ec812da10113Robert Mustacchi</ul>
6d0043d8d3eb6aec4dcd2a08b6f9ec812da10113Robert Mustacchi
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing ChinaA compile-time option must be used to display the details marked "(*)" as
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinathe instrumentation required for obtaining these statistics does not
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinaexist within standard Apache.
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<h2>Enabling Status Support</h2>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing ChinaTo enable status reports only for browsers from the foo.com
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinadomain add this code to your <code>access.conf</code> configuration file
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<pre>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China &lt;Location /server-status&gt;
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China SetHandler server-status
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China
6d0043d8d3eb6aec4dcd2a08b6f9ec812da10113Robert Mustacchi order deny,allow
6d0043d8d3eb6aec4dcd2a08b6f9ec812da10113Robert Mustacchi deny from all
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China allow from .foo.com
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China &lt;/Location&gt;
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China</pre>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<p>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing ChinaYou can now access server statistics by using a Web browser to access the
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinapage <code>http://your.server.name/server-status</code>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<h3>Automatic Updates</h3>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing ChinaYou can get the status page to update itself automatically if you have
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinaa browser that supports "refresh". Access the page
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<code>http://your.server.name/server-status?refresh=N</code> to refresh the page
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinaevery N seconds.
5ee6ac27d4fd4c9412183aa8cc1143f36ae04a8cRichard Lowe<h3>Machine Readable Status File</h3>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing ChinaA machine-readable version of the status file is available by accessing the
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinapage <code>http://your.server.name/server-status?auto</code>. This is useful
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinawhen automatically run, see the Perl program in the <code>/support</code>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinadirectory of Apache, <code>log_server_status</code>.
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<h2>Full Instrumentation</h2>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing ChinaTo obtain full statistics you must compile Apache with a special
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinadirective. On some machines there may be a small performance loss
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinaif you do this. Try full statistics and see if you notice any
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinadifference. If you do please contact <a href="mailto:mark@ukweb.com">
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing Chinamark@ukweb.com</a> and tell me your configuration.
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<p>
91e187871f25f5f4cebb89ca6783e31ac6e8a540lucy wang - Sun Microsystems - Beijing China
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing ChinaDo this by adding the following to the AUX_CFLAGS line in the
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China"Configuration" file and then recompiling as usual.
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<pre>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China AUX_CFLAGS= (something) -DSTATUS
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China</pre>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<BLOCKQUOTE>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China <STRONG>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China It should be noted that if <SAMP>mod_status</SAMP> is compiled into
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China the server, its handler capability is available in <EM>all</EM>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China configuration files, including <EM>per</EM>-directory files
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China (<EM>e.g.</EM>, <SAMP>.htaccess</SAMP>). This may have
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China security-related ramifications for your site.
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China </STRONG>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China</BLOCKQUOTE>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China<!--#include virtual="footer.html" -->
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China</BODY>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China</HTML>
04b6cca3fef9f6205a9aa479c48d196116193dd9lucy wang - Sun Microsystems - Beijing China