public class SystemUsage
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static double |
getAverageSystemLoad()
Check how active the system is (CPU) or if not available, using system load average.
|
static long |
getFreeDiskSpace()
Check how much disk space is available on the current partition.
|
static long |
getUsedMemory()
Check how much memory (in Mb) is in use.
|
public static long getUsedMemory()
public static double getAverageSystemLoad()
- On some OSes CPU usage information is not available, and system load average is used instead. - On some OSes system load average is not available.
public static long getFreeDiskSpace()
java.lang.SecurityException
- if permission is required to see disk space.