Class JvmCpuMonitorInfo

java.lang.Object
com.ibm.lang.management.JvmCpuMonitorInfo

public final class JvmCpuMonitorInfo extends Object
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 Details

    • JvmCpuMonitorInfo

      public JvmCpuMonitorInfo()
      Creates a new JvmCpuMonitorInfo 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

      public static JvmCpuMonitorInfo from(CompositeData cd)
      Receives a CompositeData representing a JvmCpuMonitorInfo object and attempts to return the root JvmCpuMonitorInfo instance.
      Parameters:
      cd - A CompositeData that represents a JvmCpuMonitorInfo.
      Returns:
      if cd is non- null, returns a new instance of JvmCpuMonitorInfo, If cd is null, returns null.
      Throws:
      IllegalArgumentException - if argument cd does not correspond to a JvmCpuMonitorInfo 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

      public String toString()
      Text description of this JvmCpuMonitorInfo object.
      Overrides:
      toString in class Object
      Returns:
      Text description of this JvmCpuMonitorInfo object.