1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5 This file is generated from xml source: DO NOT EDIT
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8 <title>mod_status - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
12 <script src="../style/scripts/prettify.js" type="text/javascript">
15 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
17 <div id="page-header">
18 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
19 <p class="apache">Apache HTTP Server Version 2.5</p>
20 <img alt="" src="../images/feather.gif" /></div>
21 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
23 <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.5</a> > <a href="./">Modules</a></div>
24 <div id="page-content">
25 <div id="preamble"><h1>Apache Module mod_status</h1>
27 <p><span>Available Languages: </span><a href="../en/mod/mod_status.html" title="English"> en </a> |
28 <a href="../fr/mod/mod_status.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
29 <a href="../ja/mod/mod_status.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
30 <a href="../ko/mod/mod_status.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
31 <a href="../tr/mod/mod_status.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
33 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Provides information on server activity and
35 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
36 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>status_module</td></tr>
37 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_status.c</td></tr></table>
40 <p>The Status module allows a server administrator to find out
41 how well their server is performing. A HTML page is presented
42 that gives the current server statistics in an easily readable
43 form. If required this page can be made to automatically
44 refresh (given a compatible browser). Another page gives a
45 simple machine-readable list of the current server state.</p>
47 <p>The details given are:</p>
50 <li>The number of worker serving requests</li>
52 <li>The number of idle worker</li>
54 <li>The status of each worker, the number of requests that
55 worker has performed and the total number of bytes served by
58 <li>A total number of accesses and byte count served (*)</li>
60 <li>The time the server was started/restarted and the time it
61 has been running for</li>
63 <li>Averages giving the number of requests per second, the
64 number of bytes served per second and the average number of
65 bytes per request (*)</li>
67 <li>The current percentage CPU used by each worker and in
68 total by all workers combined (*)</li>
70 <li>The current hosts and requests being processed (*)</li>
73 <p>The lines marked "(*)" are only available if
74 <code class="directive"><a href="../mod/core.html#extendedstatus">ExtendedStatus</a></code>
75 is <code>On</code>. In version 2.3.6, loading mod_status will
76 toggle <code class="directive"><a href="../mod/core.html#extendedstatus">ExtendedStatus</a></code> On
79 <div id="quickview"><h3 class="directives">Directives</h3>
80 <p>This module provides no
84 <li><img alt="" src="../images/down.gif" /> <a href="#enable">Enabling Status Support</a></li>
85 <li><img alt="" src="../images/down.gif" /> <a href="#autoupdate">Automatic Updates</a></li>
86 <li><img alt="" src="../images/down.gif" /> <a href="#machinereadable">Machine Readable Status File</a></li>
87 <li><img alt="" src="../images/down.gif" /> <a href="#troubleshoot">Using server-status to troubleshoot</a></li>
88 </ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
89 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
91 <h2><a name="enable" id="enable">Enabling Status Support</a></h2>
94 <p>To enable status reports only for browsers from the example.com
95 domain add this code to your <code>httpd.conf</code>
96 configuration file</p>
97 <pre class="prettyprint lang-config">
98 <Location /server-status>
99 SetHandler server-status
100 Require host example.com
105 <p>You can now access server statistics by using a Web browser
107 <code>http://your.server.name/server-status</code></p>
108 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
109 <div class="section">
110 <h2><a name="autoupdate" id="autoupdate">Automatic Updates</a></h2>
113 <p>You can get the status page to update itself automatically if
114 you have a browser that supports "refresh". Access the page
115 <code>http://your.server.name/server-status?refresh=N</code> to
116 refresh the page every N seconds.</p>
118 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
119 <div class="section">
120 <h2><a name="machinereadable" id="machinereadable">Machine Readable Status File</a></h2>
123 <p>A machine-readable version of the status file is available by
125 <code>http://your.server.name/server-status?auto</code>. This
126 is useful when automatically run, see the Perl program
127 <code>log_server_status</code>, which you will find in the
128 <code>/support</code> directory of your Apache HTTP Server installation.</p>
131 <strong>It should be noted that if <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> is
132 loaded into the server, its handler capability is available
133 in <em>all</em> configuration files, including
134 <em>per</em>-directory files (<em>e.g.</em>,
135 <code>.htaccess</code>). This may have security-related
136 ramifications for your site.</strong>
139 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
140 <div class="section">
141 <h2><a name="troubleshoot" id="troubleshoot">Using server-status to troubleshoot</a></h2>
144 <p>The <code>server-status</code> page may be used as a starting
145 place for troubleshooting a situation where your server is consuming
146 all available resources (CPU or memory), and you wish to identify
147 which requests or clients are causing the problem.</p>
149 <p>First, ensure that you have <code class="directive"><a href="../mod/core.html#extendedstatus">ExtendedStatus</a></code> set on, so that you can see
150 the full request and client information for each child or
153 <p>Now look in your process list (using <code>top</code>, or similar
154 process viewing utility) to identify the specific processes that are
155 the main culprits. Order the output of <code>top</code> by CPU
156 usage, or memory usage, depending on what problem you're trying to
159 <p>Reload the <code>server-status</code> page, and look for those process
160 ids, and you'll be able to see what request is being served by that
161 process, for what client. Requests are transient, so you may need to
162 try several times before you catch it in the act, so to speak.</p>
164 <p>This process <em>should</em> give you some idea what client, or
165 what type of requests, are primarily responsible for your load
166 problems. Often you will identify a particular web application that
167 is misbehaving, or a particular client that is attacking your
172 <div class="bottomlang">
173 <p><span>Available Languages: </span><a href="../en/mod/mod_status.html" title="English"> en </a> |
174 <a href="../fr/mod/mod_status.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
175 <a href="../ja/mod/mod_status.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
176 <a href="../ko/mod/mod_status.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
177 <a href="../tr/mod/mod_status.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
178 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
179 <script type="text/javascript"><!--//--><![CDATA[//><!--
180 var comments_shortname = 'httpd';
181 var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_status.html';
183 if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
184 d.write('<div id="comments_thread"><\/div>');
185 var s = d.createElement('script');
186 s.type = 'text/javascript';
188 s.src = 'https://c.apaste.info/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
189 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
192 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
194 })(window, document);
195 //--><!]]></script></div><div id="footer">
196 <p class="apache">Copyright 2012 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
197 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
198 if (typeof(prettyPrint) !== 'undefined') {