Class JvmCpuMonitorInfo
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.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JvmCpuMonitorInfofrom(CompositeData cd) Receives aCompositeDatarepresenting aJvmCpuMonitorInfoobject and attempts to return the rootJvmCpuMonitorInfoinstance.longThis 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.longThis method returns the total CPU usage of all GC threads.longThis method returns the total CPU usage of all JIT Threads.longThis method returns the total CPU usage for all threads of the "Resource-Monitor" category.longThis method returns the total CPU usage of the "System-JVM" category, which includes GC, JIT and other JVM daemon threads.longThis method returns the last sampling time stamp.toString()Text description of thisJvmCpuMonitorInfoobject.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Constructor Details
-
JvmCpuMonitorInfo
public JvmCpuMonitorInfo()Creates a newJvmCpuMonitorInfoinstance.
-
-
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 aCompositeDatarepresenting aJvmCpuMonitorInfoobject and attempts to return the rootJvmCpuMonitorInfoinstance.- Parameters:
cd- ACompositeDatathat represents aJvmCpuMonitorInfo.- Returns:
- if
cdis non-null, returns a new instance ofJvmCpuMonitorInfo, Ifcdisnull, returnsnull. - Throws:
IllegalArgumentException- if argumentcddoes not correspond to aJvmCpuMonitorInfowith 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 thisJvmCpuMonitorInfoobject.- Overrides:
toStringin classObject- Returns:
- Text description of this
JvmCpuMonitorInfoobject.
-