From IcedTea

Jump to: navigation, search


A lightweight monitoring and analysis tool for HotSpot JVMs.


1 News

HeapStats 2.1 has been released! (03/30/2018)

HeapStats ready for JDK 9 (2017/8/15)

Now that JDK 9 has reached `Final Release Candidate phase` [1], and then we can announce that HeapStats (trunk) ready for JDK 9! Latest HeapStats source code is available ([icedtea]) and ([github]).

[1] http://openjdk.java.net/projects/jdk9/

Notice: the deadlock detection feature is only for experimental use (2017/01/17)

The deadlock detection feature which includes until HeapStats 2.0 might cause an abort of the monitored Java process ([Bug 3285]). It is caused in very rare corner case. However, "massive" multithreading program with synchronization might have the relatively higher risk. We recommend not to use the deadlock detection feature, so we move this feature as an experimental till a fixed version is released. Turn off the deadlock detection feature is also a workaround:

Edit heapstats.conf

Version 2.x:check_deadlock=false

Version 1.x:trigger_on_loglock=false

HeapStats won Duke's Choice Award 2016 ! Thank you !(2016/09/20)


You can contribute / develop HeapStats @ GitHub. Join us!! (Jan 19 2016)


New documents are added on this site.(2015/3/30).

Previous News

2 What is HeapStats?

HeapStats is a lightweight JavaVM monitoring tool for Java heap and GC status. It sends a real-time alert via an SNMP trap when it predicts a fault. It also yields rather small log files which you can analyze with a GUI equipped tool.

It is consisted of two separate programs:

  • agent - a JVMTI agent program which collect JavaVM information.
  • analyzer - a java application for analyzing the information.

We are discussing on HeapStats ML . Please join us !

2.1 Latest Version

HeapStats 2.1.0 has been released on Mar 30th, 2018.

Download HeapStats 2.1.0 (03/30/2018)

  • Major update release
    • The user can choose timerange via slidebar.
    • HeapStats Agent uses Intel TBB. It realize reliability improvement.
    • Deadlock detector has been refactored. Thus it has come back to official feature.
    • And fixes some other bugs.

2.1.1 Previous versions

Previous versions are here.

2.1.2 Version number of HeapStats

Version of HeapStats is represented with 4-segments:


  • x and y
    • Major version
    • If these number is incremented, HeapStats will be added new (big) feature or new algorithms.
  • z
    • Minor version
    • If these number is incremented, HeapStats will have some bug fixes or improvements, enhancements.
  • r
    • Revision number
    • Usually, this number does not appear.
    • If these number is incremented (or appeared), HeapStats will have fixes of packaging issue or critical bug / security issues.

2.2 License

The HeapStats agent and analyzer are licensed under the GNU General Public License, version 2 .

2.3 A Screenshot of the analyzer


3 Using HeapStats

3.1 Monitoring objects/indicators

HeapStats agent collects various information from JVM and OS. See information to be collected for details.

3.2 Download

3.3 Operating Environment

  • Agent
    • Use with OpenJDK6 or later and OpenJDK10 or earlier on Linux for x86/x86_64. (binaries for RHEL/CentOS, Fedora are provided at the link above.)
      • Red Hat Enterprise Linux 5 (RHEL5): HeapStats works with java-1.6.0-openjdk- or later.
      • Red Hat Enterprise Linux 6 (RHEL6): HeapStats works with java-1.6.0-openjdk- or later.
      • HeapStats works with OracleJDK6u18 or later on Linux.
    • Notice: Debug symbols are required. If you install OpenJDK with an rpm, you also need to install the same version of "debug info package" of the rpm.
      • Example: rpm -ivh java-1.7.0-openjdk- java-1.7.0-openjdk-debuginfo- java-1.7.0-openjdk-devel-
      • Further notice: You need exactly the same version of debuginfo as the regular package. Do not confuse the RHEL debuginfo package and the CentOS's one. Although their names/versions are the same, they are different.
        • Since Fedora 27, you need to install an additional debuginfo of the headless package, e.g., java-1.8.0-openjdk-headless-debuginfo.
  • Analyzer
    • Use with OpenJDK6/OracleJDK6 or later.

3.4 How to use

  • Agent
    • Install the agent rpm or build the source file.
      • Example: rpm -ivh heapstats_agent-2.0.0-0.el7.x86_64.rpm
    • Start your Java program with an option "-agentlib:heapstats":
      • Example(1): java -agentlib:heapstats -version
    • You can also use another option "-agentpath:<path to lib>" to set the heapstats library path directly:
      • Example(2): java -agentpath:/usr/local/lib/libheapstats.so -version
    • Log files named "heapstats_*" will be yielded in the current working directory.
  • Analyzer
    • Download the analzyer binary or build the source file.
    • Analyzer needs JGraphX, JFreeChart and JCommon libraries. Download the libraries and put in "lib" directory. (the 2.0 install binaries include those libraries.)
    • Run heapstats.jar
      • Example: java -jar heapstats.jar
    • More detail information will be provided in an attached text file, "howtouse(_ja).txt".
  • How to analyze a memory leak
  • General Information for HeapStats Users

3.5 How to build

3.6 Configuration

HeapStats Agent and Analyzer has configuration files.

  • Agent
    • heapstats.conf
    • If you use RPM package, you can find it on /etc/heapstats/heapstats.conf .
  • Analyzer

3.7 Tips

3.8 Technology of HeapStats

HeapStats is based on implementation of HotSpot VM. If you wondered "How HeapStats realizes low overhead" or "How heapstats synchronizes itself to GC", please see HeapStats Technology.

Please see also:

4 Change Logs

Recent changes on HeapStats are shown below:

5 Image garalley

Personal tools