public class CPUUtils
extends java.lang.Object
Constructor | Description |
---|---|
CPUUtils() |
Modifier and Type | Method | Description |
---|---|---|
static float |
getSystemCpuUsage(java.lang.String start,
java.lang.String end) |
Computes and returns the total CPU/Core usage, in percent.
|
static java.lang.String |
readSystemStats(CPUManager manager) |
Reads and returns the status of the provided core index from the system.
|
public static java.lang.String readSystemStats(CPUManager manager) throws CPUException
manager
- The CPUManager used to read the system stats.CPUException
- If there is an error during the configuration
process.public static float getSystemCpuUsage(java.lang.String start, java.lang.String end)
start
- First read of /proc/stat.end
- Second read of /proc/stat.readSystemStats(CPUManager)