Documentation Contents
Java Platform, Standard Edition Troubleshooting Guide
Contents Previous Next

# 2.10 Java VisualVM

The Java VisualVM is one of the latest tools included in the JDK download. This tool is useful for Java application developers to troubleshoot applications and to monitor and improve the applications' performance. With Java VisualVM you can generate and analyze heap dumps, track down memory leaks, perform and monitor garbage collection, and perform lightweight memory and CPU profiling. The tool is also useful for tuning, heap sizing, offline analysis, and postmortem diagnosis.

In addition, you can use existing plug-ins that expand the functionality of Java VisualVM. For example, most of the functionality of the JConsole tool is available through the MBeans tab and the JConsole plug-in wrapper tab. You can choose from a catalog of standard Java VisualVM plug-ins by choosing Plugins from the Tools menu in the main Java VisualVM window.

For more details, see the Java VisualVM documentation.

The following section describes Troubleshoot with Java VisualVM.

## 2.10.1 Troubleshoot with Java VisualVM

Java VisualVM allows you to perform the following troubleshooting activities:

- View a list of local and remote Java applications.

- View application configuration and runtime environment. For each application, the tool shows basic runtime information: PID, host, main class, arguments passed to the process, JVM version, JDK home, JVM flags, JVM arguments, and system properties.

- Enable and disable the creation of a heap dump when a specified application encounters an `OutOfMemoryError` exception.

- Monitor application memory consumption, running threads, and loaded classes.

- Trigger a garbage collection immediately.

- Create a heap dump immediately. You can then view the heap dump in several views: summary, by class, by instance. You can also save the heap dump to your local file system.

- Profile application performance or analyze memory allocation (for local applications only). You can also save the profiling data.

- Create a thread dump (stack trace of the application's active threads) immediately. You can then view the thread dump.

- Analyze core dumps (with Oracle Solaris and Linux operating systems).

- Analyze applications offline, by taking application snapshots.

- Get additional plug-ins contributed by the community.

- Write and share your own plug-ins.

- Display and interact with MBeans (after installing the MBeans tab plug-in).

When you start Java VisualVM, the main Application window opens, displaying a list of Java applications running on the local machine, a list of Java applications running on any connected remote machines, a list of any JVM core dumps that were taken and saved (with Oracle Solaris and Linux operating systems), and a list of any application snapshots that were taken and saved.

Th Java VisualVM automatically detects and connects to the Java Management Extensions (JMX) agents for Java applications that are running on JDK or that have been started with the correct system properties. For the tool to detect and connect to the agents on a remote machine, the `jstatd` daemon must be running on the remote machine, see The jstatd Daemon. If Java VisualVM cannot automatically discover and connect to JMX agents that are running in a target application, then the tool provides a means for you to explicitly create these connections.

Contents Previous Next

Copyright © 1993, 2018, Oracle and/or its affiliates. All rights reserved.
Contact Us