Purpose

Java VisualVM allows to examine all Java applications running and detect memory leaks and CPU profiling.
It can display for each application:

  • the JVM used
  • the JVM arguments
  • all threads and their call stacks
  • CPU
  • memory
  • number of classes

Java VisualVM is the equivalent to ADPlus for Java.

This page will help you with the following

Details

Installing Java VisualVM

This tool is provided with the Java Development Kit (JDK)
In order to be able to monitor a JVM, the JDK version must equal or higher than the JVM version.
So to dump CAST-MS, JDK must be at least at version 6.0.15
JDK download can be found at this location http://java.sun.com/javase/downloads/index.jsp

The tool is located in the "bin" subfolder of the JDK
For example

C:\Program Files\Java\jdk1.6.0_15\bin\jvisualvm.exe

Creating a thread dump

If the Java application hangs, you may create a thread dump

  1. Open jvisualvm.exe
  2. Locate your Application 
    If the tool cannot display the application name (<Unknown Application>), you can open the Task Manager to get the Process Id (pid) or use the Java Home property in "Overview" tab
  3. Select the "Threads" tab
  4. Click on button "Thread Dump"


Analyzing the thread dump

It contains the call stacks of all running threads
If there is a deadlock, it is mentioned at the end of the report

Notes / Comments


Related Pages