Document new findleaks command
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 12 Feb 2010 18:03:48 +0000 (18:03 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 12 Feb 2010 18:03:48 +0000 (18:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@909542 13f79535-47bb-0310-9956-ffa450edef68

webapps/docs/html-manager-howto.xml
webapps/docs/manager-howto.xml

index 8c5e194..a5463d9 100644 (file)
@@ -36,7 +36,7 @@ to manage your web applications without having to shut down and restart
 Tomcat.  This document is for the HTML web interface to the web application
 <a href="manager-howto.html">manager</a>.</p>
 
-<p>The interface is divided into five sections:
+<p>The interface is divided into six sections:
 <ul>
   <li><strong>Message</strong> - Displays success and failure messages.</li>
   <li><strong>Manager</strong> - General manager operations like list and
@@ -44,6 +44,7 @@ Tomcat.  This document is for the HTML web interface to the web application
   <li><strong>Applications</strong> - List of web applications and
       commands.</li>
   <li><strong>Deploy</strong> - Deploying web applications.</li>
+  <li><strong>Diagnostocs</strong> - Identifying potential problems.</li>
   <li><strong>Server Information</strong> - Information about the Tomcat
       server.</li>
 </ul>
@@ -546,6 +547,19 @@ error message.  Possible causes for problems include:</p>
 </subsection>
 </section>
 
+<section name="Diagnostics">
+
+<p><strong>The find leaks diagnostic triggers a full garbage collection. It
+should be used with extreme caution on production systems.</strong></p>
+
+<p>The find leaks diagnostic attempts to identify web applications that have
+caused memory leaks when they were reloaded. Results should always be confirmed
+with a profiler. The diagnostic uses additional functionality provided by the
+StandardHost implementation. It will not work if a custom host is used that
+does not extend StandardHost.</p>
+
+</section>
+
 <section name="Server Information">
 
 <p>This section displays information about Tomcat, the operating system of
index 5b0c09d..274aa24 100644 (file)
@@ -51,6 +51,8 @@ List Available Global JNDI Resources</a><br />
 <a href="#Stop an Existing Application">Stop an Existing Application</a><br />
 <a href="#Undeploy an Existing Application">
 Undeploy an Existing Application</a><br />
+<a href="#Server Status">Server Status</a><br />
+<a href="#Finding memory leaks">Finding memory leaks</a><br />
 </blockquote>
 <a href="#Executing Manager Commands With Ant">
 Executing Manager Commands With Ant</a><br />
@@ -891,6 +893,35 @@ error message.  Possible causes for problems include:</p>
 
 </subsection>
 
+<subsection name="Finding memory leaks">
+
+<source>
+http://localhost:8080/manager/text/findleaks
+</source>
+
+<p><strong>The find leaks diagnostic triggers a full garbage collection. It
+should be used with extreme caution on production systems.</strong></p>
+
+<p>The find leaks diagnostic attempts to identify web applications that have
+caused memory leaks when they were reloaded. Results should always be confirmed
+with a profiler. The diagnostic uses additional functionality provided by the
+StandardHost implementation. It will not work if a custom host is used that
+does not extend StandardHost.</p>
+
+<p>If this command succeeds, you will see a response like this:</p>
+<source>
+/leaking-webapp
+</source>
+
+<p>Each context path for a web application that is believed to have triggered a
+memory leak when it was reloaded will be listed on a new line. If an application
+has been reloaded several times, it may be listed several times.</p>
+
+<p>If the command does not succeed, the response will start with
+<code>FAIL</code> and include an error message.</p>
+</subsection>
+
 <subsection name="Server Status">
 
 <p>From this link , you can view information about the server.</p>