]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_status.html
Place a note in some of the files that contain obsolete information.
[apache] / docs / manual / mod / mod_status.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3  <HEAD>
4   <TITLE>Apache module mod_status</TITLE>
5  </HEAD>
6 <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
7 <BODY
8  BGCOLOR="#FFFFFF"
9  TEXT="#000000"
10  LINK="#0000FF"
11  VLINK="#000080"
12  ALINK="#FF0000"
13 >
14
15 <!--#include virtual="header.html" -->
16
17 <blockquote><strong>Warning:</strong>
18 This document has not been updated to take into account changes
19 made in the 2.0 version of the Apache HTTP Server.  Some of the
20 information may still be relevant, but please use it
21 with care.
22 </blockquote>
23
24 <H1 ALIGN="CENTER">Module mod_status</H1>
25
26 <p>This module provides information on server activity and
27 performance.</p>
28
29 <P><A
30 HREF="module-dict.html#Status"
31 REL="Help"
32 ><STRONG>Status:</STRONG></A> Base
33 <BR>
34 <A
35 HREF="module-dict.html#SourceFile"
36 REL="Help"
37 ><STRONG>Source File:</STRONG></A> mod_status.c
38 <BR>
39 <A
40 HREF="module-dict.html#ModuleIdentifier"
41 REL="Help"
42 ><STRONG>Module Identifier:</STRONG></A> status_module
43 <BR>
44 <A
45 HREF="module-dict.html#Compatibility"
46 REL="Help"
47 ><STRONG>Compatibility:</STRONG></A> Available in Apache 1.1 and later.
48 </P>
49
50
51 <H2>Summary</H2>
52
53 <p>The Status module allows a server administrator to find out how well
54 their server is performing.  A HTML page is presented that gives
55 the current server statistics in an easily readable form.  If required
56 this page can be made to automatically refresh (given a compatible
57 browser).  Another page gives a simple machine-readable list of the current
58 server state.</p>
59
60 <P>
61 The details given are:
62 <UL>
63 <LI>The number of children serving requests
64 <LI>The number of idle children
65 <LI>The status of each child, the number of requests that child has
66 performed and the total number of bytes served by the child (*)
67 <LI>A total number of accesses and byte count served (*)
68 <LI>The time the server was started/restarted and the
69 time it has been running for
70 <LI>Averages giving the number of requests per second,
71 the number of bytes served per second and the average number
72 of bytes per request (*)
73 <LI>The current percentage CPU used by each child and in total by
74 Apache (*)
75 <LI>The current hosts and requests being processed (*)
76 </UL>
77
78 A compile-time option must be used to display the details marked "(*)" as
79 the instrumentation required for obtaining these statistics does not
80 exist within standard Apache.
81
82 <h2>Directives</h2>
83
84 <ul>
85 <li><a href="#extendedstatus">ExtendedStatus</a></li>
86 </ul>
87
88
89 <H2>Enabling Status Support</H2>
90
91 To enable status reports only for browsers from the foo.com
92 domain add this code to your <CODE>access.conf</CODE> configuration file
93 <PRE>
94     &lt;Location /server-status&gt;
95     SetHandler server-status
96
97     Order Deny,Allow
98     Deny from all
99     Allow from .foo.com
100     &lt;/Location&gt;
101 </PRE>
102 <P>
103 You can now access server statistics by using a Web browser to access the
104 page <CODE>http://your.server.name/server-status</CODE>
105 <P>
106 Note that mod_status will only work when you are running Apache in
107 <A HREF="core.html#servertype">standalone</A> mode and not
108 <A HREF="core.html#servertype">inetd</A> mode.
109
110 <H3>Automatic Updates</H3>
111 You can get the status page to update itself automatically if you have
112 a browser that supports "refresh".  Access the page
113 <CODE>http://your.server.name/server-status?refresh=N</CODE> to refresh the
114 page every N seconds.
115 <H3>Machine Readable Status File</H3>
116 A machine-readable version of the status file is available by accessing the
117 page <CODE>http://your.server.name/server-status?auto</CODE>.  This is useful
118 when automatically run, see the Perl program in the <CODE>/support</CODE>
119 directory of Apache, <CODE>log_server_status</CODE>.
120
121 <BLOCKQUOTE>
122  <STRONG>
123   It should be noted that if <SAMP>mod_status</SAMP> is compiled into
124   the server, its handler capability is available in <EM>all</EM>
125   configuration files, including <EM>per</EM>-directory files
126   (<EM>e.g.</EM>, <SAMP>.htaccess</SAMP>).  This may have
127   security-related ramifications for your site.
128  </STRONG>
129 </BLOCKQUOTE>
130
131 <hr>
132
133 <H2><A NAME="extendedstatus">ExtendedStatus directive</A></H2>
134 <!--%plaintext &lt;?INDEX {\tt ExtendedStatus} directive&gt; -->
135 <A
136  HREF="directive-dict.html#Syntax"
137  REL="Help"
138 ><STRONG>Syntax:</STRONG></A> ExtendedStatus On|Off<BR>
139 <A
140  HREF="directive-dict.html#Default"
141  REL="Help"
142 ><STRONG>Default:</STRONG></A> <CODE>ExtendedStatus Off</CODE><BR>
143 <A
144  HREF="directive-dict.html#Context"
145  REL="Help"
146 ><STRONG>Context:</STRONG></A> server config <BR>
147 <A
148  HREF="directive-dict.html#Status"
149  REL="Help"
150 ><STRONG>Status:</STRONG></A> Base<BR>
151  <A
152   HREF="directive-dict.html#Module"
153   REL="Help"
154   ><STRONG>Module:</STRONG></A> mod_status<BR>
155 <A
156  HREF="directive-dict.html#Compatibility"
157  REL="Help"
158 ><STRONG>Compatibility:</STRONG></A> ExtendedStatus is only available
159  in Apache 1.3.2 and later.
160
161 <P>
162 This directive controls whether the server keeps track of extended
163 status information for each request. This is only useful if the status module
164 is enabled on the server.
165 </P>
166 <P>
167 This setting applies to the entire server, and cannot be enabled or
168 disabled on a virtualhost-by-virtualhost basis.
169 </P>
170
171 <!--#include virtual="footer.html" -->
172 </BODY>
173 </HTML>