Monitor Java program memory and JVM with Jconsole tools

Source: Internet
Author: User
Tags tomcat server jconsole

Transferred from:

I. Find the corresponding process pi for the Java application

Performance test application access address:

The deployed application server is tomcat6.028

    1. After starting the Tomcat server, you can see the Java.exe process in the Task Manager,

PS: There are several other programs launched here

2. Query the process PID number corresponding to the test application (based on the port number)

1) cmd command: netstat-aon|findstr "7070"

Two Start the Jconsole monitoring tool

Method One:

Open the cmd Command window and go to the/bin directory under the JDK installation path.

Input command: JConsole "pid number"

Automatically start and open the Jconsole monitoring interface:

Method Two: Enter the JDK installation directory bin directory, double-click Run JConsole.exe Program, select the application corresponding PID program connection or double-click

Three Perform performance analysis on charts

Jconsole is primarily a monitoring Java application, which is a tool that comes with the JDK, a JMX-based connection to a running JVM that launches to implement the default JMX management client.

1) Overview

The overview interface provides real-time visibility into the heap memory usage, threads, classes, and CPU usage of Java applications.

2) Memory

The memory interface allows you to select the "Heap memory usage" and "non-heap memory usage" graphs in the chart and display memory details: Using memory, allocation: maximum, etc.

PS: Focus on the use of memory, the reasonable ratio between the use of memory and the maximum value of 1:3, the use of memory can not be greater than 1/2 maximum, or memory bottlenecks.

3) thread

Line Partogram is not a major concern, only focuses on the thread situation, and can detect if there are deadlock threads.

4) class

The class diagram is not a major concern, it is related to the number of application classes and has no fixed value.

1) VM Summary

VM Summary diagram is a view of the JVM usage graph

A heap is a memory space used by Java virtual machines (the JVM, referred to in the following JVM, specifically the Sun hotspot JVM) To hold Java classes, objects, and static members, all objects created in a Java program are allocated space in the heap, and the heap is used only to store objects. The application accesses the heap data through a reference that resides within the stack, and a JVM process can have only one heap. The JVM sets the initial and maximum values of the heap, respectively, with the-XMS and-XMX parameters.

This diagram needs to focus on analyzing the current heap size, the maximum heap size, allocated memory, and the physical total memory and available physical memory.

(turn) Monitor Java program memory and JVM with Jconsole tools

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.