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 Summary

    Constructors
    Constructor
    Description
    Creates a new JvmCpuMonitorInfo instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    Receives a CompositeData representing a JvmCpuMonitorInfo object and attempts to return the root JvmCpuMonitorInfo 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.
    Text description of this JvmCpuMonitorInfo object.

    Methods declared in class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
    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.
    boolean
    Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    May cause performance issues, deadlocks and hangs.
    final Class<? extends Object>
    Answers the unique instance of java.lang.Class which represents the class of the receiver.
    int
    Answers an integer hash code for the receiver.
    final void
    Causes one thread which is waiting on the receiver to be made ready to run.
    final void
    Causes all threads which are waiting on the receiver to be made ready to run.
    final void
    Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated by notify or notifyAll).
    final void
    wait(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 by notify or notifyAll) or the expiration of the timeout.
    final void
    wait(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 by notify or notifyAll) or the expiration of the timeout.
  • 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.