java.lang.Object
com.ibm.lang.management.JvmCpuMonitorInfo
JvmCpuMonitorInfo
provides a snapshot of JVM CPU usage information
that is distributed across thread categories. A time stamp for the snapshot is
also provided.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JvmCpuMonitorInfo
from
(CompositeData cd) Receives aCompositeData
representing aJvmCpuMonitorInfo
object and attempts to return the rootJvmCpuMonitorInfo
instance.long
This method returns the total CPU usage for all application threads.long[]
This method returns an array of CPU usage for all user defined thread categories.long
This method returns the total CPU usage of all GC threads.long
This method returns the total CPU usage of all JIT Threads.long
This method returns the total CPU usage for all threads of the "Resource-Monitor" category.long
This method returns the total CPU usage of the "System-JVM" category, which includes GC, JIT and other JVM daemon threads.long
This method returns the last sampling time stamp.toString()
Text description of thisJvmCpuMonitorInfo
object.
-
Constructor Details
-
JvmCpuMonitorInfo
public JvmCpuMonitorInfo()Creates a newJvmCpuMonitorInfo
instance.
-
-
Method Details
-
getTimestamp
public long getTimestamp()This method returns the last sampling time stamp.- Returns:
- The last sampling time stamp in microseconds.
-
getApplicationCpuTime
public long getApplicationCpuTime()This method returns the total CPU usage for all application threads. It includes the threads that are in the "Application" category as well as those in the user defined categories (Application-UserX). This does not include information about "Resource-monitor" threads.- Returns:
- "Application" category CPU usage time in microseconds.
-
getResourceMonitorCpuTime
public long getResourceMonitorCpuTime()This method returns the total CPU usage for all threads of the "Resource-Monitor" category. "Resource-Monitor" thread is any thread, that the application has designated as a "Resource-Monitor".- Returns:
- "Resource-Monitor" category CPU usage time in microseconds.
-
getSystemJvmCpuTime
public long getSystemJvmCpuTime()This method returns the total CPU usage of the "System-JVM" category, which includes GC, JIT and other JVM daemon threads. The data also includes usage of any thread that has participated in "GC" activity for the duration spent in that activity if the -XX:-ReduceCPUMonitorOverhead option is specified. See the user guide for more information on this option.- Returns:
- "System-JVM" category CPU usage time in microseconds.
-
getGcCpuTime
public long getGcCpuTime()This method returns the total CPU usage of all GC threads. It also includes CPU usage by non GC threads that participate in GC activity for the period that they do GC work if the -XX:-ReduceCPUMonitorOverhead option is specified. See the user guide for more information on this option. -XX:-ReduceCPUMonitorOverhead is not supported on z/OS.- Returns:
- "GC" category CPU usage time in microseconds.
-
getJitCpuTime
public long getJitCpuTime()This method returns the total CPU usage of all JIT Threads.- Returns:
- "JIT" category CPU usage time in microseconds.
-
getApplicationUserCpuTime
public long[] getApplicationUserCpuTime()This method returns an array of CPU usage for all user defined thread categories.- Returns:
- Array of user defined thread categories' CPU usage time in microseconds.
-
from
Receives aCompositeData
representing aJvmCpuMonitorInfo
object and attempts to return the rootJvmCpuMonitorInfo
instance.- Parameters:
cd
- ACompositeData
that represents aJvmCpuMonitorInfo
.- Returns:
- if
cd
is non-null
, returns a new instance ofJvmCpuMonitorInfo
, Ifcd
isnull
, returnsnull
. - Throws:
IllegalArgumentException
- if argumentcd
does not correspond to aJvmCpuMonitorInfo
with the following attributes:timestamp
(java.lang.Long
)applicationCpuTime
(java.lang.Long
)resourceMonitorCpuTime
(java.lang.Long
)systemJvmCpuTime
(java.lang.Long
)gcCpuTime
(java.lang.Long
)jitCpuTime
(java.lang.Long
)applicationUserCpuTime
-
toString
Text description of thisJvmCpuMonitorInfo
object.- Overrides:
toString
in classObject
- Returns:
- Text description of this
JvmCpuMonitorInfo
object.
-