Class SystemUsageMonitor

java.lang.Object
org.easypeelsecurity.springdog.manager.statistics.SystemUsageMonitor
All Implemented Interfaces:
SystemUsageMetrics

public class SystemUsageMonitor extends Object implements SystemUsageMetrics
Monitor system usage.
  • Constructor Details

    • SystemUsageMonitor

      public SystemUsageMonitor()
      Constructor.
  • Method Details

    • getSystemMemoryUsagePercent

      public Double getSystemMemoryUsagePercent()
      Description copied from interface: SystemUsageMetrics
      Retrieves the current system memory usage as a percentage of the maximum available.
      Specified by:
      getSystemMemoryUsagePercent in interface SystemUsageMetrics
      Returns:
      the used system memory as a percentage, or -1 if not available
    • systemCpuUsagePercent

      public Double systemCpuUsagePercent()
      Description copied from interface: SystemUsageMetrics
      Retrieves the current system CPU usage as a percentage.
      Specified by:
      systemCpuUsagePercent in interface SystemUsageMetrics
      Returns:
      the system CPU usage as a percentage, or 0.0 if not available
    • diskUsagePercent

      public Double diskUsagePercent()
      Description copied from interface: SystemUsageMetrics
      Retrieves the current disk usage as a percentage of the total disk space.
      Specified by:
      diskUsagePercent in interface SystemUsageMetrics
      Returns:
      the disk usage as a percentage, or -1 if not available
    • getJvmHeapUsed

      public long getJvmHeapUsed()
      Description copied from interface: SystemUsageMetrics
      Retrieves the current JVM heap memory usage in bytes.
      Specified by:
      getJvmHeapUsed in interface SystemUsageMetrics
      Returns:
      the used JVM heap memory in bytes
    • getJvmHeapMax

      public long getJvmHeapMax()
      Description copied from interface: SystemUsageMetrics
      Retrieves the maximum JVM heap memory in bytes.
      Specified by:
      getJvmHeapMax in interface SystemUsageMetrics
      Returns:
      the maximum JVM heap memory in bytes
    • getJvmHeapUsagePercent

      public Double getJvmHeapUsagePercent()
      Description copied from interface: SystemUsageMetrics
      Retrieves the current JVM heap memory usage as a percentage of the maximum available.
      Specified by:
      getJvmHeapUsagePercent in interface SystemUsageMetrics
      Returns:
      the JVM heap memory usage as a percentage
    • getJvmNonHeapUsed

      public long getJvmNonHeapUsed()
      Description copied from interface: SystemUsageMetrics
      Retrieves the current JVM non-heap memory usage in bytes.
      Specified by:
      getJvmNonHeapUsed in interface SystemUsageMetrics
      Returns:
      the used JVM non-heap memory in bytes
    • getJvmNonHeapMax

      public long getJvmNonHeapMax()
      Description copied from interface: SystemUsageMetrics
      Retrieves the maximum JVM non-heap memory in bytes.
      Specified by:
      getJvmNonHeapMax in interface SystemUsageMetrics
      Returns:
      the maximum JVM non-heap memory in bytes, or -1 if not defined
    • getJvmNonHeapUsagePercent

      public Double getJvmNonHeapUsagePercent()
      Description copied from interface: SystemUsageMetrics
      Retrieves the current JVM non-heap memory usage as a percentage of the maximum available.
      Specified by:
      getJvmNonHeapUsagePercent in interface SystemUsageMetrics
      Returns:
      the JVM non-heap memory usage as a percentage, or -1 if maximum is not defined
    • getJvmTotalMemoryUsed

      public long getJvmTotalMemoryUsed()
      Description copied from interface: SystemUsageMetrics
      Retrieves the total current JVM memory usage (heap + non-heap) in bytes.
      Specified by:
      getJvmTotalMemoryUsed in interface SystemUsageMetrics
      Returns:
      the total used JVM memory in bytes
    • getJvmTotalMemoryMax

      public long getJvmTotalMemoryMax()
      Description copied from interface: SystemUsageMetrics
      Retrieves the total maximum JVM memory (heap + non-heap) in bytes.
      Specified by:
      getJvmTotalMemoryMax in interface SystemUsageMetrics
      Returns:
      the total maximum JVM memory in bytes
    • getJvmTotalMemoryUsagePercent

      public Double getJvmTotalMemoryUsagePercent()
      Description copied from interface: SystemUsageMetrics
      Retrieves the total current JVM memory usage as a percentage of the total maximum available.
      Specified by:
      getJvmTotalMemoryUsagePercent in interface SystemUsageMetrics
      Returns:
      the total JVM memory usage as a percentage
    • getNetworkInBytes

      public long getNetworkInBytes()
      Description copied from interface: SystemUsageMetrics
      Retrieves the total network input bytes.
      Specified by:
      getNetworkInBytes in interface SystemUsageMetrics
      Returns:
      the total network input bytes
    • getNetworkOutBytes

      public long getNetworkOutBytes()
      Description copied from interface: SystemUsageMetrics
      Retrieves the total network output bytes.
      Specified by:
      getNetworkOutBytes in interface SystemUsageMetrics
      Returns:
      the total network output bytes