@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class SysInfo extends Object
Constructor and Description |
---|
SysInfo() |
Modifier and Type | Method and Description |
---|---|
abstract long |
getAvailablePhysicalMemorySize()
Obtain the total size of the available physical memory present
in the system.
|
abstract long |
getAvailableVirtualMemorySize()
Obtain the total size of the available virtual memory present
in the system.
|
abstract long |
getCpuFrequency()
Obtain the CPU frequency of on the system.
|
abstract float |
getCpuUsagePercentage()
Obtain the CPU usage % of the machine.
|
abstract long |
getCumulativeCpuTime()
Obtain the cumulative CPU time since the system is on.
|
abstract long |
getNetworkBytesRead()
Obtain the aggregated number of bytes read over the network.
|
abstract long |
getNetworkBytesWritten()
Obtain the aggregated number of bytes written to the network.
|
abstract int |
getNumCores()
Obtain total number of physical cores present on the system.
|
abstract int |
getNumProcessors()
Obtain the total number of logical processors present on the system.
|
abstract float |
getNumVCoresUsed()
Obtain the number of VCores used.
|
abstract long |
getPhysicalMemorySize()
Obtain the total size of the physical memory present in the system.
|
abstract long |
getStorageBytesRead()
Obtain the aggregated number of bytes read from disks.
|
abstract long |
getStorageBytesWritten()
Obtain the aggregated number of bytes written to disks.
|
abstract long |
getVirtualMemorySize()
Obtain the total size of the virtual memory present in the system.
|
static SysInfo |
newInstance()
Return default OS instance.
|
public static SysInfo newInstance()
UnsupportedOperationException
- If cannot determine OS.public abstract long getVirtualMemorySize()
public abstract long getPhysicalMemorySize()
public abstract long getAvailableVirtualMemorySize()
public abstract long getAvailablePhysicalMemorySize()
public abstract int getNumProcessors()
public abstract int getNumCores()
public abstract long getCpuFrequency()
public abstract long getCumulativeCpuTime()
public abstract float getCpuUsagePercentage()
public abstract float getNumVCoresUsed()
public abstract long getNetworkBytesRead()
public abstract long getNetworkBytesWritten()
public abstract long getStorageBytesRead()
public abstract long getStorageBytesWritten()
Copyright © 2021 Apache Software Foundation. All rights reserved.