VisualVM 1.3: Detailed Application Monitoring
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.
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.
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.
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 email@example.com.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)