Jiri has posted 16 posts at DZone. View Full User Profile

VisualVM 1.3: Detailed Application Monitoring

  • submit to reddit

VisualVM 1.3 has just been released and is now available for download at https://visualvm.dev.java.net! The most significant new features in this release include the incorporation of the Sampler plugin into the core tool, the ability to define custom profiling presets, and support for taking a heap dump of a remote JVM. The tool newly enables custom sorting of applications, recognizes the Clojure, Groovy, JRuby, Jython and Scala runtimes, and introduces monitoring remote hosts. Two new plugins have been provided with this release: the Tracer framework and probes plugin enable detailed application monitoring, and the Threads Inspector plugin displays stacks of the selected threads.

Further information about the release is available in the Release Notes, details about the new features are described on the Official NetBeans Profiler and VisualVM Blog.

Monitoring a Java application using the Tracer probes

Let's take a look at the Tracer plugin, which provides a framework and GUI for monitoring and analyzing Java applications. Using various types of probes, the plugin is able to gather metrics from an application and display the data in a timeline. This gives a quick overview of what is happening in various parts of the application and allows you to easily determine the relations between the metrics. The values are displayed both graphically and in a table and can be exported to common formats for further processing with external tools.

The Tracer timeline uses interactive, high-performance charts optimized for displaying large amounts of live data. The rows that represent the probes can be resized to display greater detail. The time axis can be used to mark the samples that represent the important events that occurred during the Tracer session. The appearance and behavior of the timeline can be customized in the Options dialog.

Selecting the probes to use for monitoring

To start using Tracer, you need to download one or more plugins with predefined probes from the Plugin Center. Tracer probes can be found in the "Tracer" category in the list of available plugins. The following probes are available for VisualVM 1.3:

  • Monitor Probes. For monitoring CPU & GC activity, heap & permgen usage, number of loaded classes and application threads. These probes provide the same information as the graphs in the Monitor tab, and allow you to analyze other data in the context of basic JVM telemetry.
  • JVM Probes. For monitoring various virtual machine internals, such as I/O metrics, GC metrics and HotSpot utilization.
  • Jvmstat Probes. For visualizing the metrics exported by the monitored JVM as jvmstat counters (including sun.gc.jvmstat, sun.perfdata.jvmstat, sun.threads.jvmstat, etc.).
  • Swing Probes. Provide detailed information about AWT and Swing GUI performance in terms of paints count, layout times and events utilization.
  • JavaFX Probes. For monitoring the performance of various logical parts of JavaFX applications.
  • DTrace Probes. Provide low-level system metrics, including JVM overhead, utilization of each CPU or syscalls numbers. These probes are available only for the Solaris/OpenSolaris OS.

Tracer displaying detailed data for the selected probes

The initial set of probes primarily uses JMX and BTrace technologies. You can expect to see more probes for monitoring (not only) Java applications in the future because the Tracer framework is general enough to support nearly every technology, including DTrace, Attach API, SNMP, etc. The VisualVM developers encourage you to send any ideas/requests regarding the Tracer probes to feedback@visualvm.dev.java.net.

Average: 4 (1 vote)
Published at DZone with permission of its author, Jiri Sedlacek.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Jörg Buchberger replied on Tue, 2010/07/27 - 3:11am

Thanks for the notice. There is also a VisualVM Eclipse launcher available at https://visualvm.dev.java.net/eclipse-launcher.html, that starts the VisualVM tool along with the monitored application, if setup in the run configuration.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.