VisualVM is a DIAGNOSTIC tool for the JVM that comes with the JDK. Many functions can be extended through plug-ins, and plug-in extensions are the essence of this tool.

Provides a visual interface for viewing detailed information about a Java application while it is running on a Java virtual machine. This information can be used for troubleshooting local and remote applications and for performance analysis of local applications.

With Java VisualVM, you can generate and analyze heap dumps, track memory leaks, perform and monitor garbage collection, and perform lightweight memory and CPU performance analysis. The tool is also useful for resizing, heap sizing, offline analysis, and post-mortem diagnostics.

Method of use

  1. Start the
cd <JDK_HOME>/bin
jvisualvm
Copy the code
  1. Selecting a Monitoring process

Of course monitoring supports remote JMX monitoring and remote host monitoring

  1. Monitoring view: Monitors CPU, heap, class load, and thread count

4. Thread monitoring: deadlock diagnosis, etc5. CPU and memory sampling analysis: CPU thread occupation analysis, memory occupation analysis, etc

  1. GC monitoring plug-in

The plugin is recommended

  • Visual GC

Integrate visual garbage collection monitoring tools into VisualVM. The Visual GC attaches to the application and collects and graphically displays the garbage collection, class loader, and HotSpot compiler performance numbers

  • VisualVM MBeans

The MBeans browser plug-in provides functionality similar to the MBeans browser in JConsole: displays the application’s MBeans, displaying values, actions, and notifications. In VisualVM, the browser has been further improved to provide better usability and support for the latest JMX features

  • VisualVM Extensions

The purpose of this module is to add additional features that are not supported by the VisualVM core module when VisualVM is released (such as new JDK, JVM, HotSpot versions…). The support of

  • Tracer

A framework and GUI for detailed monitoring and analysis of Java applications. The tracker uses various probes to collect metrics from the application and display data in a timeline. The data is displayed graphically and in tabular form and can be exported to a common format for further processing by external tools

  • JConsole

Support for using existing JConsole plug-ins (such as JTop) in VisualVM

  • Threads Inspector

The Thread inspector adds a new section on the Threads TAB that shows the stack trace for the selected active thread.

Scan it. Focus on me