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