HomeJava Monitoring
Java Monitoring

Java is a set of computer software and specifications that provides a system for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers.

Metrics collected by Java Integration
Metric
– Description
Loaded Class
– Currently loaded class in JVM
Total Loaded Class
– Total loaded class in JVM
Unloaded class
– Currently unloaded class in JVM
Object Pending finalization count
PS Mark Sweep GC Count
– Garbage Collection count from PS Mark Sweep
PS Scavenge GC Count
– Garbage Collection count from PS Scavenge
Heap Memory Committed
– Committed memory Heap area.
Heap Memory Used
– Used memory from Heap area.
Non-Heap Memory Committed
– Committed memory Non-Heap area.
Non-Heap Memory Used
– Used memory from Non-Heap area.
Code Cache Memory Pool Collection Committed
– Committed memory of collection usage from the pool from which memory is used for compilation and storage of native code.
Code Cache Memory Pool Collection Used
– Used memory of the Collection usage from the pool from which memory is used for compilation and storage of native code.
Compressed Class Space Memory Pool Collection Committed
– Committed memory of collection usage from the pool from which memory is use for class metadata.
Compressed Class Space Memory Pool Collection Used
– Used memory of the Collection usage from the pool from which memory is use for class metadata.
Metaspace Memory Pool Collection Committed
Metaspace Memory Pool Collection Used
Ps Eden Space Memory Pool Collection Committed
– Committed memory of collection usage from the pool from which memory is initially allocated for most objects.
Ps Eden Space Memory Pool Collection Used
– Used memory of the Collection usage from the pool from which memory is initially allocated for most objects.
Ps Old Gen Memory Pool Collection Committed
Ps Old Gen Memory Pool Collection Used
Ps Survivor Space Memory Pool Collection Committed
– Committed memory of collection usage from the pool containing objects that have survived the garbage collection of the Eden space.
Ps Survivor Space Memory Pool Collection Used
– Used memory of the Collection usage from the pool containing objects that have survived the garbage collection of the Eden space.
Code Cache Memory Pool Peak Committed
– Committed memory of Peak usage from the pool from which memory is used for compilation and storage of native code.
Code Cache Memory Pool Peak Used
– Used memory of the Peak usage from the pool from which memory is used for compilation and storage of native code.
Compressed Class Space Memory Pool Peak Committed
– Committed memory of Peak usage from the pool from which memory is use for class metadata.
Compressed Class Space Memory Pool Peak Used
– Used memory of the Peak usage from the pool from which memory is use for class metadata.
Metaspace Memory Pool Peak Committed
Metaspace Memory Pool Peak Used
Ps Eden Space Memory Pool Peak Committed
– Committed memory of Peak usage from the pool from which memory is initially allocated for most objects.
Ps Eden Space Memory Pool Peak Used
– Used memory of the Peak usage from the pool from which memory is initially allocated for most objects.
Ps Old Gen Memory Pool Peak Committed
Ps Old Gen Memory Pool Peak Used
Ps Survivor Space Memory Pool Peak Committed
– Committed memory of Peak usage from the pool containing objects that have survived the garbage collection of the Eden space.
Ps Survivor Space Memory Pool Peak Used
– Used memory of the Peak usage from the pool containing objects that have survived the garbage collection of the Eden space.
Code Cache Memory Pool Usage Committed
– Committed memory of the usage from the pool from which memory is used for compilation and storage of native code.
Code Cache Memory Pool Usage Used
– Used memory of the usage from the pool from which memory is used for compilation and storage of native code.
Compressed Class Space Memory Pool Usage Committed
– Committed memory of the usage from the pool from which memory is use for class metadata.
Compressed Class Space Memory Pool Usage Used
– Used memory of the usage from the pool from which memory is use for class metadata.
Metaspace Memory Pool Usage Committed
Metaspace Memory Pool Usage Used
Ps Eden Space Memory Pool Usage Committed
– Committed memory of the usage from the pool from which memory is initially allocated for most objects.
Ps Eden Space Memory Pool Usage Used
– Used memory of the usage from the pool from which memory is initially allocated for most objects.
Ps Old Gen Memory Pool Usage Committed
Ps Old Gen Memory Pool Usage Used
Ps Survivor Space Memory Pool Usage Committed
– Committed memory of the usage from the pool containing objects that have survived the garbage collection of the Eden space.
Ps Survivor Space Memory Pool Usage Used
– Used memory of the usage from the pool containing objects that have survived the garbage collection of the Eden space.
Peak Thread Count
– max Thread simultaneously
Thread Count
– Current thread count
Total Thread Started Count
– Total Threads have been Started
Configuring
  1. Installing module: rptmonitor uses jpype module to interact with Java-JMX monitoring.

    This module should be installed & specifically required from https://github.com/originell/jpype/releases. The minimum required version is 0.6.0 of jpype lib.

    For jpype Installation :

  2. Configure JMX monitoring for java

    • You required to enable the jmx by passing following parameter to your java application.
    • For ex. To monitor your java application via tomcat, you can set this parameter as given below in the tomcat service file at /etc/systemd/system/tomcat.service:

      Environment=’JAVA_OPTS=-Djava.awt.headless=true
      -Djava.security.egd=file:/dev/./urandom
      -Dcom.sun.management.jmxremote
      -Dcom.sun.management.jmxremote.port=9900
      -Dcom.sun.management.jmxremote.rmi.port=9900
      -Dcom.sun.management.jmxremote.ssl=false
      -Dcom.sun.management.jmxremote.authenticate=false
      -Dcom.sun.management.jmxremote.local.only=false
      -Djava.rmi.server.hostname=localhost ‘

  3. Edit the agent’s config.cfg file.

    • Fill in values for variables – jmx_jvm_lib_path, jmx_host, jmx_port. Uncomment the lines containing these variables (remove # symbol).
  4. Restart rptmonitor :

    • For (deb/rpm)package supported Linux distros :

      sudo /etc/init.d/rptmonitor restart
    • For openSUSE(11.4+) with systemd:

      sudo systemctl restart rptmonitor.service
    • For other Linux distro, FreeBSD8+, Mac OS X+ :

      sudo python /usr/local/bin/rptmonitor/monitor.py restart