Jump to content
The Inquirer-Home

A look at Java's new Visualvm

First Inqpressions Free Java tool investigated
Wednesday, 16 July 2008, 18:48

THE MOST RECENT of the Java Developer Kit (JDK), version 6 update 7, incorporates a new utility dubbed Visualvm.

There have been many integral monitoring and diagnostic features built into JDK 6, but Visualvm is the first comprehensive GUI-based tool to come packaged with the JDK and utilise the new hooks.

In fact, most of the previously standalone tools Jconsole, Jstat, Jinfo, Jstack, and Jmap are now incorporated into Visualvm, yet still available separately.

Visualvm has been available from its development site for some time, but this is the first official packaging of the program within theJDK.

Running the program and monitoring a Java program is as simple as launching the executable from the Java bin folder, and choosing theJVM PID you wish to connect to - all of which are listed on start-up for your convenience.

The first page viewable entitled 'Overview' gives the user basic run-time information including: PID, main class, arguments passed to the java process, JVM version, JDK home, JVM flags and arguments and system properties.

Below you can see the 'Monitor' tab which demonstrates the use of JVM memory use, thread count, and class count, in real-time. A user may also force garbage collection or heap dump - similar to what Jconsole will show an administrator.

alt='visualvm1b'

Within the next shot, you can see the 'Threads' tab showing the threads running in a Java process over a given timeline.

alt='visualvm2'

Taking a leaf from applications like Jprobe, Visualvm has a built-in application profiler which can visualize where time is being spent or which how much memory objects are consuming.

You may also take a thread-dump on the fly, allowing the user to search for deadlocked processes or simply to examine what threads are currently processing.

You can also connect Visualvm to a remote host - however, although it can retrieve monitoring information on remote applications it cannot profile remote applications.

To take full advantage of the program, your JVMs need to be utilising a version 6 JVM or higher. Version 5 JVMs will show much less information. The feature/version matrix is available at the bottom of the features page.

You can also utilise various plug-ins, or build your own - Visualvm is built upon the Netbeans platform, so it should be relatively easy to develop to for Netbean-aware developers.

Overall this is a welcome addition to the JDK package, and presents a variety of features that most users will find invaluable - without the need to shell out for applications likeJprobe.

It also packages a wide array of Java utilities into one, usable, GUI, allowing a variety of tools to be accessed immediately without any fumbling around on the command line.

A full list of features is available here. ?

Share this:

Comments
Nice!

More articles of this type the inquirer please :)

posted by : haq, 16 July 2008 Complain about this comment
The only problem is...

The very first time I tried it I connected to my IDE and tried to take a heap snapshot. In response the IDE's VM died a swift death.

Moral of the story: don't use this against a production process until the kinks are ironed out in 3 or 4 builds' time.

posted by : Chris Miller, 17 July 2008 Complain about this comment
Cool!

Worked great for me. The program is very clean and UI is very well done. I was able to observe netbeans, two of my own apps, and even Visualvm itself with no probs. This is a must have tool for every Java developer.

posted by : Hassan, 18 July 2008 Complain about this comment
Useful!

This looks really useful!

posted by : Ian M, 18 July 2008 Complain about this comment
can I mention this link?

hello,
an excellent intervention !
can i mention this link on my weblog:
http://dgsjava.wordpress.com/ ?
best regards
dgs

posted by : dgs010243, 30 July 2008 Complain about this comment
Advertisement
Subscribe to the INQ Newsletter
Sign-up for the INQBot weekly newsletter
Click here to sign up Existing user
Advertisement
INQ Poll

Christmas computer sales

Will you be buying a new computer this Christmas?