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
7      -->
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.min.js" type="text/javascript">
13</script>
14
15<link href="/images/favicon.ico" rel="shortcut icon" /></head>
16<body>
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.4</p>
20<img alt="" src="/images/feather.gif" /></div>
21<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
22<div id="path">
23<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Modules</a></div>
24<div id="page-content">
25<div id="preamble"><h1>Apache Module mod_status</h1>
26<div class="toplang">
27<p><span>Available Languages: </span><a href="/en/mod/mod_status.html" title="English">&nbsp;en&nbsp;</a> |
28<a href="/fr/mod/mod_status.html" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a> |
29<a href="/ja/mod/mod_status.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
30<a href="/ko/mod/mod_status.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
31<a href="/tr/mod/mod_status.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
32</div>
33<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Provides information on server activity and
34performance</td></tr>
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>
38<h3>Summary</h3>
39
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>
46
47    <p>The details given are:</p>
48
49    <ul>
50      <li>The number of worker serving requests</li>
51
52      <li>The number of idle worker</li>
53
54      <li>The status of each worker, the number of requests that
55      worker has performed and the total number of bytes served by
56      the worker (*)</li>
57
58      <li>A total number of accesses and byte count served (*)</li>
59
60      <li>The time the server was started/restarted and the time it
61      has been running for</li>
62
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>
66
67      <li>The current percentage CPU used by each worker and in
68      total by all workers combined (*)</li>
69
70      <li>The current hosts and requests being processed (*)</li>
71    </ul>
72
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
77    by default.</p>
78</div>
79<div id="quickview"><h3 class="directives">Directives</h3>
80<p>This module provides no
81            directives.</p>
82<h3>Topics</h3>
83<ul id="topics">
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>
90<div class="section">
91<h2><a name="enable" id="enable">Enabling Status Support</a></h2>
92    
93
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">&lt;Location /server-status&gt;
98    SetHandler server-status
99    Require host example.com
100&lt;/Location&gt;</pre>
101
102
103    <p>You can now access server statistics by using a Web browser
104    to access the page
105    <code>http://your.server.name/server-status</code></p>
106</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
107<div class="section">
108<h2><a name="autoupdate" id="autoupdate">Automatic Updates</a></h2>
109
110    
111    <p>You can get the status page to update itself automatically if
112    you have a browser that supports "refresh". Access the page
113    <code>http://your.server.name/server-status?refresh=N</code> to
114    refresh the page every N seconds.</p>
115
116</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
117<div class="section">
118<h2><a name="machinereadable" id="machinereadable">Machine Readable Status File</a></h2>
119
120    
121    <p>A machine-readable version of the status file is available by
122    accessing the page
123    <code>http://your.server.name/server-status?auto</code>. This
124    is useful when automatically run, see the Perl program
125    <code>log_server_status</code>, which you will find in the
126    <code>/support</code> directory of your Apache HTTP Server installation.</p>
127
128    <div class="note">
129      <strong>It should be noted that if <code class="module"><a href="/mod/mod_status.html">mod_status</a></code> is
130      loaded into the server, its handler capability is available
131      in <em>all</em> configuration files, including
132      <em>per</em>-directory files (<em>e.g.</em>,
133      <code>.htaccess</code>). This may have security-related
134      ramifications for your site.</strong>
135    </div>
136
137</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
138<div class="section">
139<h2><a name="troubleshoot" id="troubleshoot">Using server-status to troubleshoot</a></h2>
140    
141
142    <p>The <code>server-status</code> page may be used as a starting
143    place for troubleshooting a situation where your server is consuming
144    all available resources (CPU or memory), and you wish to identify
145    which requests or clients are causing the problem.</p>
146
147    <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
148    the full request and client information for each child or
149    thread.</p>
150
151    <p>Now look in your process list (using <code>top</code>, or similar
152    process viewing utility) to identify the specific processes that are
153    the main culprits. Order the output of <code>top</code> by CPU
154    usage, or memory usage, depending on what problem you're trying to
155    address.</p>
156
157    <p>Reload the <code>server-status</code> page, and look for those process
158    ids, and you'll be able to see what request is being served by that
159    process, for what client. Requests are transient, so you may need to
160    try several times before you catch it in the act, so to speak.</p>
161
162    <p>This process <em>should</em> give you some idea what client, or
163    what type of requests, are primarily responsible for your load
164    problems. Often you will identify a particular web application that
165    is misbehaving, or a particular client that is attacking your
166    site.</p>
167
168</div>
169</div>
170<div class="bottomlang">
171<p><span>Available Languages: </span><a href="/en/mod/mod_status.html" title="English">&nbsp;en&nbsp;</a> |
172<a href="/fr/mod/mod_status.html" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a> |
173<a href="/ja/mod/mod_status.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
174<a href="/ko/mod/mod_status.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
175<a href="/tr/mod/mod_status.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
176</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&amp;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>
177<script type="text/javascript"><!--//--><![CDATA[//><!--
178var comments_shortname = 'httpd';
179var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_status.html';
180(function(w, d) {
181    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
182        d.write('<div id="comments_thread"><\/div>');
183        var s = d.createElement('script');
184        s.type = 'text/javascript';
185        s.async = true;
186        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
187        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
188    }
189    else { 
190        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
191    }
192})(window, document);
193//--><!]]></script></div><div id="footer">
194<p class="apache">Copyright 2014 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>
195<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[//><!--
196if (typeof(prettyPrint) !== 'undefined') {
197    prettyPrint();
198}
199//--><!]]></script>
200</body></html>