JConsole use of Java Performance Analyzer

A, JConsole is what
    starts Java 5 introduced JConsole. JConsole is a built-in Java Performance Analyzer can be run from the command line or in the GUI shell. You can easily use JConsole (or its more high-end "close" VisualVM) to monitor the code for Java application performance and tracking in Java.

Second, how to start JConsole
if it is started from the command line, the JDK on the PATH, you can run jconsole.
If you start from the GUI shell, find the JDK installation path, open the bin folder, double-click jconsole.
As shown below:

    When the pop-up analysis tool (Java version and the number of Java programs that are running depends running), may see a dialog box asking for the URL to connect to a process, it could list many different local Java processes (sometimes It includes JConsole process itself) to connect. as the picture shows:

Double-click on the program you want to analyze that process.

Third, how to set up JAVA program run can be JConsolse analyzed connect
the local program (relative to the computer is turned on the JConsole), without setting any parameters can be opened locally Connecting JConsole (Java SE 6 start without setting prior to or need to set the run parameter -Dcom.sun.management.jmxremote)
four, JConsole how to connect the remote machine JAVA program (for example)
can directly use the command:

Java code  

jconsole.exe 192.168.0.181:8999  


 May also have been opened in the JConsole interface operation connection - Select remote process> - -> New Connection> Enter the remote host IP and port number -> click "Connect" as shown:

 

Performance Analysis

After entering this view include six tabs:

  • 概述: Displays overview information about the Java VM and monitored values.
  • Memory: Shows the memory usage information
  • Thread: Use the information display thread
  • Class: class loading information display
  • * VM Summary: * display java VM information
  • MBeans: display MBeans.

The figure description have the information we need, and right-click on the data can be saved to a CSV file.

RAM


Memory usually requires us to view, see the heap, non-heap memory status of the memory pool allocation and overall memory usage and GC were different frequency and duration of garbage collection. GC can manually view the memory changes. JAVA memory problems in the analysis of tune very useful when you want to learn JVM memory model, and then find that each value here has meaning. GC algorithms and parameters on the performance of a significant effect, attention garbage recycle numbers, time, and partial GC and Full GC, different GC adjusted used and well parameters at each GC, then observed in this view, to give a good performance.

In addition to the above memory, as well as the thread, class, VM, MBean such as these, can be viewed as necessary.

Guess you like

Origin blog.csdn.net/yuyecsdn/article/details/91410786