Class SystemUsageMonitor
java.lang.Object
org.easypeelsecurity.springdog.manager.statistics.SystemUsageMonitor
- All Implemented Interfaces:
SystemUsageMetrics
Monitor system usage.
-
Field Summary
Fields inherited from interface org.easypeelsecurity.springdog.manager.statistics.SystemUsageMetrics
DECIMAL_FORMAT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the current disk usage as a percentage of the total disk space.longRetrieves the maximum JVM heap memory in bytes.Retrieves the current JVM heap memory usage as a percentage of the maximum available.longRetrieves the current JVM heap memory usage in bytes.longRetrieves the maximum JVM non-heap memory in bytes.Retrieves the current JVM non-heap memory usage as a percentage of the maximum available.longRetrieves the current JVM non-heap memory usage in bytes.longRetrieves the total maximum JVM memory (heap + non-heap) in bytes.Retrieves the total current JVM memory usage as a percentage of the total maximum available.longRetrieves the total current JVM memory usage (heap + non-heap) in bytes.longRetrieves the total network input bytes.longRetrieves the total network output bytes.Retrieves the current system memory usage as a percentage of the maximum available.Retrieves the current system CPU usage as a percentage.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.easypeelsecurity.springdog.manager.statistics.SystemUsageMetrics
formatDouble
-
Constructor Details
-
SystemUsageMonitor
public SystemUsageMonitor()Constructor.
-
-
Method Details
-
getSystemMemoryUsagePercent
Description copied from interface:SystemUsageMetricsRetrieves the current system memory usage as a percentage of the maximum available.- Specified by:
getSystemMemoryUsagePercentin interfaceSystemUsageMetrics- Returns:
- the used system memory as a percentage, or -1 if not available
-
systemCpuUsagePercent
Description copied from interface:SystemUsageMetricsRetrieves the current system CPU usage as a percentage.- Specified by:
systemCpuUsagePercentin interfaceSystemUsageMetrics- Returns:
- the system CPU usage as a percentage, or 0.0 if not available
-
diskUsagePercent
Description copied from interface:SystemUsageMetricsRetrieves the current disk usage as a percentage of the total disk space.- Specified by:
diskUsagePercentin interfaceSystemUsageMetrics- Returns:
- the disk usage as a percentage, or -1 if not available
-
getJvmHeapUsed
public long getJvmHeapUsed()Description copied from interface:SystemUsageMetricsRetrieves the current JVM heap memory usage in bytes.- Specified by:
getJvmHeapUsedin interfaceSystemUsageMetrics- Returns:
- the used JVM heap memory in bytes
-
getJvmHeapMax
public long getJvmHeapMax()Description copied from interface:SystemUsageMetricsRetrieves the maximum JVM heap memory in bytes.- Specified by:
getJvmHeapMaxin interfaceSystemUsageMetrics- Returns:
- the maximum JVM heap memory in bytes
-
getJvmHeapUsagePercent
Description copied from interface:SystemUsageMetricsRetrieves the current JVM heap memory usage as a percentage of the maximum available.- Specified by:
getJvmHeapUsagePercentin interfaceSystemUsageMetrics- Returns:
- the JVM heap memory usage as a percentage
-
getJvmNonHeapUsed
public long getJvmNonHeapUsed()Description copied from interface:SystemUsageMetricsRetrieves the current JVM non-heap memory usage in bytes.- Specified by:
getJvmNonHeapUsedin interfaceSystemUsageMetrics- Returns:
- the used JVM non-heap memory in bytes
-
getJvmNonHeapMax
public long getJvmNonHeapMax()Description copied from interface:SystemUsageMetricsRetrieves the maximum JVM non-heap memory in bytes.- Specified by:
getJvmNonHeapMaxin interfaceSystemUsageMetrics- Returns:
- the maximum JVM non-heap memory in bytes, or -1 if not defined
-
getJvmNonHeapUsagePercent
Description copied from interface:SystemUsageMetricsRetrieves the current JVM non-heap memory usage as a percentage of the maximum available.- Specified by:
getJvmNonHeapUsagePercentin interfaceSystemUsageMetrics- 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:SystemUsageMetricsRetrieves the total current JVM memory usage (heap + non-heap) in bytes.- Specified by:
getJvmTotalMemoryUsedin interfaceSystemUsageMetrics- Returns:
- the total used JVM memory in bytes
-
getJvmTotalMemoryMax
public long getJvmTotalMemoryMax()Description copied from interface:SystemUsageMetricsRetrieves the total maximum JVM memory (heap + non-heap) in bytes.- Specified by:
getJvmTotalMemoryMaxin interfaceSystemUsageMetrics- Returns:
- the total maximum JVM memory in bytes
-
getJvmTotalMemoryUsagePercent
Description copied from interface:SystemUsageMetricsRetrieves the total current JVM memory usage as a percentage of the total maximum available.- Specified by:
getJvmTotalMemoryUsagePercentin interfaceSystemUsageMetrics- Returns:
- the total JVM memory usage as a percentage
-
getNetworkInBytes
public long getNetworkInBytes()Description copied from interface:SystemUsageMetricsRetrieves the total network input bytes.- Specified by:
getNetworkInBytesin interfaceSystemUsageMetrics- Returns:
- the total network input bytes
-
getNetworkOutBytes
public long getNetworkOutBytes()Description copied from interface:SystemUsageMetricsRetrieves the total network output bytes.- Specified by:
getNetworkOutBytesin interfaceSystemUsageMetrics- Returns:
- the total network output bytes
-