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