mod_status.html revision 7b3e47feb2f0d0a120f80b2de66656a55d0e63ef
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu <TITLE>Apache module mod_status</TITLE>
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
431571057e88a650a974adec93ea4bb5173b6213Felix Gabriel Mance BGCOLOR="#FFFFFF"
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu VLINK="#000080"
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu ALINK="#FF0000"
19e01e1a7e319063434bd86c8ecbc5f241ef9993Felix Gabriel Mance<!--#include virtual="header.html" -->
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae BungiuThis document has not been updated to take into account changes
a604cbad8e2202147b5c6bb9f2e06ae61162d654Felix Gabriel Mancemade in the 2.0 version of the Apache HTTP Server. Some of the
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiuinformation may still be relevant, but please use it
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu<H1 ALIGN="CENTER">Module mod_status</H1>
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu<p>This module provides information on server activity and
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiuperformance.</p>
1a38107941725211e7c3f051f7a8f5e12199f03acmaederHREF="module-dict.html#SourceFile"
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu><STRONG>Source File:</STRONG></A> mod_status.c
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae BungiuHREF="module-dict.html#ModuleIdentifier"
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu><STRONG>Module Identifier:</STRONG></A> status_module
431571057e88a650a974adec93ea4bb5173b6213Felix Gabriel ManceHREF="module-dict.html#Compatibility"
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu><STRONG>Compatibility:</STRONG></A> Available in Apache 1.1 and later.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu<p>The Status module allows a server administrator to find out how well
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiutheir server is performing. A HTML page is presented that gives
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiuthe current server statistics in an easily readable form. If required
be00381168b3f10192afabbba136fb06d3a9f358Christian Maederthis page can be made to automatically refresh (given a compatible
be00381168b3f10192afabbba136fb06d3a9f358Christian Maederbrowser). Another page gives a simple machine-readable list of the current
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiuserver state.</p>
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae BungiuThe details given are:
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu<LI>The number of children serving requests
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu<LI>The number of idle children
27fdf879983dd28e211b41f3be6c0e930b7c816bFelix Gabriel Mance<LI>The status of each child, the number of requests that child has
d0f58d27c2536eba454d8f77de8617bc6a2c99cdFelix Gabriel Manceperformed and the total number of bytes served by the child (*)
d0f58d27c2536eba454d8f77de8617bc6a2c99cdFelix Gabriel Mance<LI>A total number of accesses and byte count served (*)
d0f58d27c2536eba454d8f77de8617bc6a2c99cdFelix Gabriel Mance<LI>The time the server was started/restarted and the
d0f58d27c2536eba454d8f77de8617bc6a2c99cdFelix Gabriel Mancetime it has been running for
431571057e88a650a974adec93ea4bb5173b6213Felix Gabriel Mance<LI>Averages giving the number of requests per second,
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiuthe number of bytes served per second and the average number
27fdf879983dd28e211b41f3be6c0e930b7c816bFelix Gabriel Manceof bytes per request (*)
424860079d47bf490fa98d5d7498096a0447c569mcodescu<LI>The current percentage CPU used by each child and in total by
60f30f0eeeacdfc1e0dfe39664373ddf5a0675adFelix Gabriel Mance<LI>The current hosts and requests being processed (*)
424860079d47bf490fa98d5d7498096a0447c569mcodescuA compile-time option must be used to display the details marked "(*)" as
424860079d47bf490fa98d5d7498096a0447c569mcodescuthe instrumentation required for obtaining these statistics does not
60f30f0eeeacdfc1e0dfe39664373ddf5a0675adFelix Gabriel Manceexist within standard Apache.
60f30f0eeeacdfc1e0dfe39664373ddf5a0675adFelix Gabriel Mance<li><a href="#extendedstatus">ExtendedStatus</a></li>
7852de3551fc797566ee71165bafe05b6d81728cnotanartistTo enable status reports only for browsers from the foo.com
80875f917d741946a39d0ec0b5721e46ba609823Till Mossakowskidomain add this code to your <CODE>access.conf</CODE> configuration file
424860079d47bf490fa98d5d7498096a0447c569mcodescu <Location /server-status>
0dd6e7830de0887c9a12356447975a826b3b3db2Christian Maeder SetHandler server-status
424860079d47bf490fa98d5d7498096a0447c569mcodescu Order Deny,Allow
0dd6e7830de0887c9a12356447975a826b3b3db2Christian Maeder Deny from all
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu </Location>
60f30f0eeeacdfc1e0dfe39664373ddf5a0675adFelix Gabriel ManceYou can now access server statistics by using a Web browser to access the
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiupage <CODE>http://your.server.name/server-status</CODE>
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae BungiuNote that mod_status will only work when you are running Apache in
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu<A HREF="core.html#servertype">standalone</A> mode and not
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu<A HREF="core.html#servertype">inetd</A> mode.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae BungiuYou can get the status page to update itself automatically if you have
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiua browser that supports "refresh". Access the page
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu<CODE>http://your.server.name/server-status?refresh=N</CODE> to refresh the
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroederpage every N seconds.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu<H3>Machine Readable Status File</H3>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von SchroederA machine-readable version of the status file is available by accessing the
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroederpage <CODE>http://your.server.name/server-status?auto</CODE>. This is useful
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiuwhen automatically run, see the Perl program in the <CODE>/support</CODE>
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiudirectory of Apache, <CODE>log_server_status</CODE>.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu It should be noted that if <SAMP>mod_status</SAMP> is compiled into
31e9d2a02e15b7dbc157e0d3fb3b84f6c8666482Christian Maeder the server, its handler capability is available in <EM>all</EM>
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu configuration files, including <EM>per</EM>-directory files
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu (<EM>e.g.</EM>, <SAMP>.htaccess</SAMP>). This may have
656f17ae9b7610ff2de1b6eedeeadea0c3bcdc8dChristian Maeder security-related ramifications for your site.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu<H2><A NAME="extendedstatus">ExtendedStatus directive</A></H2>
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu<!--%plaintext <?INDEX {\tt ExtendedStatus} directive> -->
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu><STRONG>Syntax:</STRONG></A> ExtendedStatus On|Off<BR>
0dd6e7830de0887c9a12356447975a826b3b3db2Christian Maeder><STRONG>Default:</STRONG></A> <CODE>ExtendedStatus Off</CODE><BR>
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu><STRONG>Context:</STRONG></A> server config <BR>
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu><STRONG>Status:</STRONG></A> Base<BR>
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu ><STRONG>Module:</STRONG></A> mod_status<BR>
32bbac77828be0233953f8fe476edb0a9585408dChristian Maeder HREF="directive-dict.html#Compatibility"
80875f917d741946a39d0ec0b5721e46ba609823Till Mossakowski><STRONG>Compatibility:</STRONG></A> ExtendedStatus is only available
80875f917d741946a39d0ec0b5721e46ba609823Till Mossakowski in Apache 1.3.2 and later.
80875f917d741946a39d0ec0b5721e46ba609823Till MossakowskiThis directive controls whether the server keeps track of extended
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiustatus information for each request. This is only useful if the status module
cf0439f74f1d55a9840d38a88f9b0f4fc00d5547Christian Maederis enabled on the server.
cf0439f74f1d55a9840d38a88f9b0f4fc00d5547Christian MaederThis setting applies to the entire server, and cannot be enabled or
b84c87f199dc287d235d7dad6ea344f6912ef531Christian Maederdisabled on a virtualhost-by-virtualhost basis.
cf0439f74f1d55a9840d38a88f9b0f4fc00d5547Christian Maeder<!--#include virtual="footer.html" -->