JVM monitoring
You can use the JvmStats
MXBean for JVM monitoring in Liberty.
Each Liberty instance has one
JvmStats
MXBean.
The
ObjectName
for identifying JVM MXBean
is:WebSphere:type=JvmStats
Available Instances = 1This MXBean is responsible for reporting performance of JVM. Following attributes are available for JVM.
- Heap information
-
- Amount of free heap available (in Bytes)
- Total used memory by JVM for from heap (in Bytes)
- Heap size (in Bytes)
- CPU information
-
- Percentage of CPU consumed by this JVM
- Garbage Collection (GC) Information
-
- Number of times that GC happened since JVM started
- Total time that is taken by GC activity
- General information
-
- Time in milliseconds since JVM started.
- Counter definitions (Attributes to MXBean)
-
Heap
: Heap size that is used for current JVM.FreeMemory
: Free heap available for current JVM.UsedMemory
: Used heap for current JVM.ProcessCPU
: Percentage of CPU used by JVM process.GcCount
: Number of times GC happened since JVM starts.GcTime
: Total accumulated value of GC time.UpTime
: Time in milliseconds, since JVM started.
- Management Interface
- The management interface of JVM monitoring is
com.ibm.websphere.monitor.jmx.JvmMXBean
. You can use the management interface to obtain a proxy object. See Examples of accessing MBean attributes and operations.