Java FAQ _07JVM Architecture (018) _ How to monitor the operation of the JVM

Source: Internet
Author: User
Tags jprofiler

Click to enter _ more _java thousand ask

1, how to monitor the operation of the JVM

Understanding the JVM memory model look here: What is the Java memory model
Understanding JVM Memory Management Look here: How the JVM manages memory
Understanding the JVM garbage collection mechanism look here: What is the Java garbage collection mechanism
Learn about JVM memory optimization look here: How Java memory is optimized

We typically use JDK tools to monitor the operation of the JVM, but there are many third-party products that are organized to monitor data through the API provided by the JDK. Specifically, there are the following monitoring software:

    • Jconsole
      The JDK comes with a simple function, but can be used with a certain load on the system. The garbage collection algorithm has a very detailed tracking.

    • Javavisualvm
      The JDK comes with powerful features similar to Jprofiler. Recommended, can be started with JDK/BIN/JVISUALVM.

    • Jprofiler
      Commercial software, you need to pay. Powerful.

2, monitoring software can monitor what

These tuning tools provide powerful functionality, but generally are similar, and can monitor CPU, memory, thread, and so on.

For example, JAVAVISUALVM has the following types of features: CPU, Heap, class, thread-critical information, manual garbage collection GC, thread details, CPU, memory sampling information, heap dump, thread dump

See the dump file here: What is a dump file

CPU, Heap, class, thread-critical information
Graphical CPMU, Heap, class, thread-critical information is available for us to view and can be manually garbage collected GC through "perform garbage collection".

Thread Details
The details of each thread in the app, including the threads for runtime, hibernation, waiting, hosting, monitoring, and so on.

CPU, Memory sampling information
Shows memory and thread details by collecting CPU and memory run data for a period of time.

heap dump, thread dump
Analyze the specific dump file by generating a heap of an app, thread dump.
can be monitored by heap dump: heap detail information, in-heap class object analysis, in-heap object instance details, oql heap information custom query
Thread dump can monitor: Thread state changes, thread stack information

Heap Detail Summary information
Displays summary information for heap dump, including heap basic information, environment, System properties, and threads on heap dumps.

analysis of Class object in heap
Shows all classes used within the heap, as well as the number of instances and the size of their usage. The default is reversed by the number of instances.

in-heap object instance details
The class can enter instance details for the specified class, including details for each instance.

oql Heap Information custom query
Query the results we want by OQL language.

Thread Dump Information
Show thread state changes and run information by printing the thread stack.

We are able to follow the information we monitor to enable us to discover code problems and optimize the approach.

Java FAQ _07JVM Architecture (018) _ How to monitor the operation of the JVM

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.