View | Details | Raw Unified | Return to bug 57261
Collapse All | Expand All

(-)java/org/apache/catalina/manager/ManagerServlet.java (-36 / +16 lines)
Lines 16-33 Link Here
16
 */
16
 */
17
package org.apache.catalina.manager;
17
package org.apache.catalina.manager;
18
18
19
import java.io.BufferedOutputStream;
19
import org.apache.catalina.*;
20
import java.io.File;
20
import org.apache.catalina.connector.Connector;
21
import java.io.FileInputStream;
21
import org.apache.catalina.core.StandardHost;
22
import java.io.FileOutputStream;
22
import org.apache.catalina.core.StandardServer;
23
import java.io.IOException;
23
import org.apache.catalina.startup.ExpandWar;
24
import java.io.PrintWriter;
24
import org.apache.catalina.util.ContextName;
25
import java.util.Enumeration;
25
import org.apache.catalina.util.RequestUtil;
26
import java.util.HashMap;
26
import org.apache.catalina.util.ServerInfo;
27
import java.util.HashSet;
27
import org.apache.tomcat.util.Diagnostics;
28
import java.util.Locale;
28
import org.apache.tomcat.util.ExceptionUtils;
29
import java.util.Map;
29
import org.apache.tomcat.util.modeler.Registry;
30
import java.util.Set;
30
import org.apache.tomcat.util.res.StringManager;
31
31
32
import javax.management.MBeanServer;
32
import javax.management.MBeanServer;
33
import javax.management.ObjectName;
33
import javax.management.ObjectName;
Lines 40-69 Link Here
40
import javax.servlet.http.HttpServlet;
40
import javax.servlet.http.HttpServlet;
41
import javax.servlet.http.HttpServletRequest;
41
import javax.servlet.http.HttpServletRequest;
42
import javax.servlet.http.HttpServletResponse;
42
import javax.servlet.http.HttpServletResponse;
43
import java.io.*;
44
import java.util.*;
43
45
44
import org.apache.catalina.Container;
45
import org.apache.catalina.ContainerServlet;
46
import org.apache.catalina.Context;
47
import org.apache.catalina.Engine;
48
import org.apache.catalina.Host;
49
import org.apache.catalina.Manager;
50
import org.apache.catalina.Server;
51
import org.apache.catalina.Service;
52
import org.apache.catalina.Session;
53
import org.apache.catalina.Wrapper;
54
import org.apache.catalina.connector.Connector;
55
import org.apache.catalina.core.StandardHost;
56
import org.apache.catalina.core.StandardServer;
57
import org.apache.catalina.startup.ExpandWar;
58
import org.apache.catalina.util.ContextName;
59
import org.apache.catalina.util.RequestUtil;
60
import org.apache.catalina.util.ServerInfo;
61
import org.apache.tomcat.util.Diagnostics;
62
import org.apache.tomcat.util.ExceptionUtils;
63
import org.apache.tomcat.util.modeler.Registry;
64
import org.apache.tomcat.util.res.StringManager;
65
46
66
67
/**
47
/**
68
 * Servlet that enables remote management of the web applications installed
48
 * Servlet that enables remote management of the web applications installed
69
 * within the same virtual host as this web application is.  Normally, this
49
 * within the same virtual host as this web application is.  Normally, this
Lines 539-545 Link Here
539
     */
519
     */
540
    protected void vmInfo(PrintWriter writer,
520
    protected void vmInfo(PrintWriter writer,
541
            Enumeration<Locale> requestedLocales) {
521
            Enumeration<Locale> requestedLocales) {
542
        writer.print(Diagnostics.getVMInfo(requestedLocales));
522
        writer.print("OK -Write some VM info "+Diagnostics.getVMInfo(requestedLocales));
543
    }
523
    }
544
524
545
    /**
525
    /**
Lines 550-556 Link Here
550
     */
530
     */
551
    protected void threadDump(PrintWriter writer,
531
    protected void threadDump(PrintWriter writer,
552
            Enumeration<Locale> requestedLocales) {
532
            Enumeration<Locale> requestedLocales) {
553
        writer.print(Diagnostics.getThreadDump(requestedLocales));
533
        writer.print("OK -Write a JVM thread dump "+Diagnostics.getThreadDump(requestedLocales));
554
    }
534
    }
555
535
556
    protected void sslConnectorCiphers(PrintWriter writer,
536
    protected void sslConnectorCiphers(PrintWriter writer,
(-)webapps/docs/manager-howto.xml (+39 lines)
Lines 878-883 Link Here
878
878
879
</subsection>
879
</subsection>
880
880
881
    <subsection name="Java Virtual Machine Info">
882
883
        <source>http://localhost:8080/manager/text/vminfo</source>
884
885
        <p>Java Virtual Machine Info.</p>
886
887
        <p>The response will look something like this:</p>
888
        <source>OK -Write some VM info 2014-11-27 10:48:59.834
889
            Runtime information:
890
            vmName: Java HotSpot(TM) 64-Bit Server VM
891
            vmVersion: 24.71-b01
892
            vmVendor: Oracle Corporation
893
            specName: Java Virtual Machine Specification
894
            specVersion: 1.7
895
            specVendor: Oracle Corporation
896
            managementSpecVersion: 1.2
897
            ...</source>
898
899
    </subsection>
900
901
    <subsection name="JVM thread dump">
902
903
        <source>http://localhost:8080/manager/text/threaddump</source>
904
905
        <p>Write a JVM thread dump.</p>
906
907
        <p>The response will look something like this:</p>
908
        <source>OK -Write a JVM thread dump 2014-11-27 10:56:26.991
909
            Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.71-b01 mixed mode):
910
911
            "http-nio-8080-exec-5" Id=29 cpu=0 ns usr=0 ns blocked 0 for -1 ms waited 0 for -1 ms
912
            java.lang.Thread.State: RUNNABLE
913
            locks java.util.concurrent.ThreadPoolExecutor$Worker@65286e01
914
            at sun.management.ThreadImpl.dumpThreads0(Native Method)
915
            at sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:446)
916
            ...</source>
917
918
    </subsection>
919
881
</section>
920
</section>
882
921
883
<section name="Server Status">
922
<section name="Server Status">

Return to bug 57261