]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_status.xml
Update xforms!
[apache] / docs / manual / mod / mod_status.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
7  Licensed to the Apache Software Foundation (ASF) under one or more
8  contributor license agreements.  See the NOTICE file distributed with
9  this work for additional information regarding copyright ownership.
10  The ASF licenses this file to You under the Apache License, Version 2.0
11  (the "License"); you may not use this file except in compliance with
12  the License.  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <modulesynopsis metafile="mod_status.xml.meta">
24
25 <name>mod_status</name>
26 <description>Provides information on server activity and
27 performance</description>
28 <status>Base</status>
29 <sourcefile>mod_status.c</sourcefile>
30 <identifier>status_module</identifier>
31
32
33 <summary>
34     <p>The Status module allows a server administrator to find out
35     how well their server is performing. A HTML page is presented
36     that gives the current server statistics in an easily readable
37     form. If required this page can be made to automatically
38     refresh (given a compatible browser). Another page gives a
39     simple machine-readable list of the current server state.</p>
40
41     <p>The details given are:</p>
42
43     <ul>
44       <li>The number of worker serving requests</li>
45
46       <li>The number of idle worker</li>
47
48       <li>The status of each worker, the number of requests that
49       worker has performed and the total number of bytes served by
50       the worker (*)</li>
51
52       <li>A total number of accesses and byte count served (*)</li>
53
54       <li>The time the server was started/restarted and the time it
55       has been running for</li>
56
57       <li>Averages giving the number of requests per second, the
58       number of bytes served per second and the average number of
59       bytes per request (*)</li>
60
61       <li>The current percentage CPU used by each worker and in
62       total by all workers combined (*)</li>
63
64       <li>The current hosts and requests being processed (*)</li>
65     </ul>
66
67     <p>The lines marked "(*)" are only available if
68     <directive module="core">ExtendedStatus</directive>
69     is <code>On</code>.  In version 2.3.6, loading mod_status will
70     toggle <directive module="core">ExtendedStatus</directive> On
71     by default.</p>
72 </summary>
73
74 <section id="enable">
75     <title>Enabling Status Support</title>
76
77     <p>To enable status reports only for browsers from the example.com
78     domain add this code to your <code>httpd.conf</code>
79     configuration file</p>
80 <highlight language="config">
81 &lt;Location "/server-status"&gt;
82     SetHandler server-status
83     Require host example.com
84 &lt;/Location&gt;
85 </highlight>
86
87     <p>You can now access server statistics by using a Web browser
88     to access the page
89     <code>http://your.server.name/server-status</code></p>
90 </section>
91
92 <section id="autoupdate">
93
94     <title>Automatic Updates</title>
95     <p>You can get the status page to update itself automatically if
96     you have a browser that supports "refresh". Access the page
97     <code>http://your.server.name/server-status?refresh=N</code> to
98     refresh the page every N seconds.</p>
99
100 </section>
101
102 <section id="machinereadable">
103
104     <title>Machine Readable Status File</title>
105     <p>A machine-readable version of the status file is available by
106     accessing the page
107     <code>http://your.server.name/server-status?auto</code>. This
108     is useful when automatically run, see the Perl program
109     <code>log_server_status</code>, which you will find in the
110     <code>/support</code> directory of your Apache HTTP Server installation.</p>
111
112     <note>
113       <strong>It should be noted that if <module>mod_status</module> is
114       loaded into the server, its handler capability is available
115       in <em>all</em> configuration files, including
116       <em>per</em>-directory files (<em>e.g.</em>,
117       <code>.htaccess</code>). This may have security-related
118       ramifications for your site.</strong>
119     </note>
120
121 </section>
122
123 <section id="troubleshoot">
124     <title>Using server-status to troubleshoot</title>
125
126     <p>The <code>server-status</code> page may be used as a starting
127     place for troubleshooting a situation where your server is consuming
128     all available resources (CPU or memory), and you wish to identify
129     which requests or clients are causing the problem.</p>
130
131     <p>First, ensure that you have <directive
132     module="core">ExtendedStatus</directive> set on, so that you can see
133     the full request and client information for each child or
134     thread.</p>
135
136     <p>Now look in your process list (using <code>top</code>, or similar
137     process viewing utility) to identify the specific processes that are
138     the main culprits. Order the output of <code>top</code> by CPU
139     usage, or memory usage, depending on what problem you're trying to
140     address.</p>
141
142     <p>Reload the <code>server-status</code> page, and look for those process
143     ids, and you'll be able to see what request is being served by that
144     process, for what client. Requests are transient, so you may need to
145     try several times before you catch it in the act, so to speak.</p>
146
147     <p>This process <em>should</em> give you some idea what client, or
148     what type of requests, are primarily responsible for your load
149     problems. Often you will identify a particular web application that
150     is misbehaving, or a particular client that is attacking your
151     site.</p>
152
153 </section>
154
155 </modulesynopsis>