Class 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:
    For more information on thread categories.
    • Constructor Detail

      • JvmCpuMonitorInfo

        public JvmCpuMonitorInfo()
        Creates a new JvmCpuMonitorInfo instance.
    • Method Detail

      • 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.