VisualVM now part of the JDK set of tools
By octav on Jul 08, 2008
The NetBeans team just announced the availability of VisualVM 1.0, which ships along JDK 6 update 7.
"VisualVM is a free opensource visual tool integrating several commandline JDK tools and lightweight performance and memory profiling capabilities. Designed for both production and development time use, it further enhances the capability of monitoring and performance analysis for the Java SE platform."
This version of the tool requires Java SE 6, so to run it on the Mac you'll have to install the latest version from the Apple website. In addition you'll likely have to invoke the tool with the --jdkhome flag to load the appropriate version of the JDK.
./visualvm --jdkhome /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/
As you can see from the screen shot, you can easily monitor local and remote Java applications. The tool will help you discover performance and memory bottlenecks, debug threading problems or inspect contents of the heap. The data can be saved into a single snapshot and processed offline.