public class Monitor
extends java.lang.Object
Constructor and Description |
---|
Monitor()
Initialize.
|
Modifier and Type | Method and Description |
---|---|
long |
getCommittedVirtualMemory()
Returns the amount of virtual memory that is guaranteed to be available to the running process
in bytes, or -1 if this operation is not supported.
|
long |
getFreePhysicalMemorySize()
Returns the amount of free physical memory in bytes.
|
long |
getFreeSwapSpace()
Returns free swap space.
|
java.net.InetAddress |
getLocalHost()
Returns local address object.
|
java.lang.String |
getLocalHostAddress()
Returns the local IP address, ex: 192.168.1.2, and when local is no address will return null.
|
double |
getProcessCpuLoad()
Returns current process CPU status.
|
long |
getProcessCpuTime()
Returns the CPU time used by the process on which the Java virtual machine is running in
nanoseconds.
|
double |
getProcessMemoryLoad()
Returns current process memory status.
|
double |
getSystemCpuLoad()
Returns current system CPU status.
|
long |
getTotalPhysicalMemory()
Returns the total amount of physical memory in bytes.
|
long |
getTotalSwapSpaceSize()
Returns the total amount of swap space in bytes.
|
java.lang.Object |
optLocalHostAddress(java.lang.Object feedback)
Returns the local IP address, ex: 192.168.1.2, and when local is no address will return
feedback.
|
public java.lang.String getLocalHostAddress()
public java.lang.Object optLocalHostAddress(java.lang.Object feedback)
feedback
- If get address not foundpublic java.net.InetAddress getLocalHost()
public double getProcessCpuLoad()
public double getSystemCpuLoad()
public long getCommittedVirtualMemory()
public long getFreePhysicalMemorySize()
public long getFreeSwapSpace()
public long getProcessCpuTime()
public long getTotalPhysicalMemory()
public long getTotalSwapSpaceSize()
public double getProcessMemoryLoad()