Introduction to VisualVM
VisualVM is a tool that provides a visual interface for viewing detailed information about Java technology-based applications (Java applications) while they are running on a Java Virtual Machine (JVM). VisualVM organizes data about the JVM software that is retrieved by the Java Development Kit (JDK) tools and presents the information in a way that enables you to quickly view data on multiple Java applications. You can view data on local applications and applications that are running on remote hosts. You can also capture data about JVM software instances and save the data to your local system, and view the data later or share the data with others.
In order to benefit from all Java VisualVM's features, you should run the Java Platform, Standard Edition (Java SE) version 6.
After you download and extract the VisualVM zip archive to your local system, navigate to the bin directory of the expanded archive and double-click the VisualVM executable or type the following at the command (shell) prompt:
The first time that you launch VisualVM you are prompted to accept a license agreement.
On Windows, the default location for the VisualVM userdir is the following:
C:\Documents and Settings\<USER>\Application Data\.visualvm\FCS
To find the location of your VisualVM userdir, choose Help > About from the main menu and click Details in the About VisualVM window.
When you start VisualVM, the main VisualVM window opens. The main VisualVM window is divided into two windows.
When you first start VisualVM, the Applications window is visible in the left side of the window and the Start Page is
visible in the right side in the main window.
The Start Page contains links to VisualVM documentation web pages and additional resources.
Note: The Start Page opens by default each time you start VisualVM. You can open the Start Page at any time by choosing Help > Start Page from the main menu. You can also hide the Start page by unchecking the "Show On Startup" check-box.
The Applications window opens in the left side of the main VisualVM window when you launch the application. The Applications window is the main point of entry for exploring the details of running applications. The Applications window uses a tree structure to enable you to quickly view the applications running on the local machine and any connected remote machines. You can also access core dumps (Solaris/Linux) and saved snapshots from the Applications window.
Right-clicking a node in the Applications window opens a popup menu that enables you to perform actions related to that node, including opening application tabs, taking heap and thread dumps and opening snapshots in the main window.
For more details about how to use the Applications window to view and save data, see the following pages:
- Using the Applications Window
- Working with Local Applications
- Working with Remote Applications
- Working with VM Coredumps
- Working with Snapshots
Detailed information about applications is displayed in the main window. When you view data about an application, each application is represented by a tab in the main window that enables you to easily view and navigate the data. Saved thread dumps and heap dumps are also opened in the main window.
For information about the application data that can be displayed in the main window, see the following pages:
- Application Overview Tab
- Monitoring an Application in the Monitor Tab
- Monitoring Threads in the Threads Tab
- Browsing a Heap Dump
- Profiling an Application in the Profiler Tab (local applications only)
- MBeans Tab (requires MBeans plugin)
You can add functionality to VisualVM by using the Plugins manager to install plugins from the VisualVM Plugins Center. You can also extend the functionality of VisualVM by developing your own plugins that can then be added to an update center.
For example, installing the VisualVM-MBeans plugin adds an MBeans tab to the application tab that enables you to monitor and manage MBeans from within VisualVM.
To install a VisualVM plugin:
- Choose Tools > Plugins from the main menu.
- In the Available Plugins tab, select the Install checkbox for the plugin. Click Install.
- Step through and complete the plugin installer.
For more information about creating VisualVM plugins, see the following documents: