8/2/11

Java monitoring tools

Java monitoring tools

There are a few tools you can use to monitor and identify performance inhibitors in your Java™ applications.

vmstat
Provides information about various system resources. It reports statistics on kernel threads in the run queue as well as in the wait queue, memory usage, paging space, disk I/O, interrupts, system calls, context switches, and CPU activity.
iostat
Reports detailed disk I/O information.
topas
Reports CPU, network, disk I/O, Workload Manager and process activity.
tprof
Profiles the application to pinpoint any hot routines or methods, which can be considered performance problems.
ps -mo THREAD
Shows to which CPU a process or thread is bound.
Java profilers [-Xrunhprof, Xrunjpa64]
Determines which routines or methods are the most heavily used.
java -verbose:gc
Checks the impact of garbage collection on your application. It reports total time spent doing garbage collection, average time per garbage collection, average memory collected per garbage collection, and average objects collected per garbage collection.

Here are 10 tools useful for Java application performance troubleshooting.


  • jconsole comes together with JDK 1.5 and above. It is a Java Monitoring and Management Console - JMX-compliant graphical tool for monitoring a Java virtual machine. It can monitor both local and remote JVMs.

  • VisualVM is a visual tool that integrates several existing JDK software tools and lightweight memory and CPU profiling capabilities. This tool is designed for both production and development time use and further enhances the capability of monitoring and performance analysis for the Java SE platform.

  • HeapAnalyzer allows the finding of a possible Java™ heap leak area through its heuristic search engine and analysis of the JavaTM heap dump in Java applications. It analyzes Java heap dumps by parsing the Java heap dump, creating directional graphs, transforming them into directional trees, and executing the heuristic search engine.

  • PerfAnal is a GUI-based tool for analyzing the performance of applications on the Java 2 Platform. You can use PerfAnal to identify performance problems in your code and locate code that needs tuning.

  • JAMon is a free, simple, high performance, thread safe, Java API that allows developers to easily monitor production applications.

  • Eclipse Memory Analyzer is a fast and feature-rich Java heap analyzer that helps you find memory leaks and reduce memory consumption.

  • GCViewer is a free open source tool to visualize data produced by the Java VM options -verbose:gc and -Xloggc:<file>. It also calculates garbage collection related performance metrics (throughput, accumulated pauses, longest pause, etc.).