JVisualVM – the UI for JVM monitoring

The jcmd command is a great command-line tool but is a bit raw. However, the JVM provides additional tooling to yield metrics linked to performance and, in particular, the CPU and memory. JVisualVM and JConsole are two such tools packaged with the JDK (not the JRE). Since both are pretty similar, we will only deal with JVisualVM in this section, but most of the information and tools can be used with JConsole as well.

To launch JVisualVM, you just have to execute a command of the same name:

$ $JAVA_HOME/bin/jvisualvm

Once launched, you will see the welcome screen of jvisualvm:

To start using jvisualvm

Get Java EE 8 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.