HeapStats

From IcedTea

Jump to: navigation, search

[Japanese]

A lightweight monitoring and analysis tool for HotSpot JVMs.

Contents

1 News

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

The deadlock detection feature 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)

https://www.oracle.com/javaone/dukes-choice-award.html


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

https://github.com/HeapStats/heapstats


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.0.5, a new version of HeapStats 2.0 series, has released on June 22th, 2017.

Download HeapStats 2.0.5 (2017/06/22)

  • A minor update.
    • Improve a test framework for race-condition to prevent potential bugs
      • Bug 3999: Fix potential error when conflict between class loading and GC
      • Core components has been tested. The others will be tested in the future.
    • 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.y.z-r

  • 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

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 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-1.6.0.0-1.22.1.9.8.el5_6 or later.
      • Red Hat Enterprise Linux 6 (RHEL6): HeapStats works with java-1.6.0-openjdk-1.6.0.0-1.39.1.9.8.el6_1 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-1.7.0.55-2.4.7.1.el6_5.x86_64.rpm java-1.7.0-openjdk-debuginfo-1.7.0.55-2.4.7.1.el6_5.x86_64.rpm java-1.7.0-openjdk-devel-1.7.0.55-2.4.7.1.el6_5.x86_64.rpm
      • 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.
  • 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