public class SystemLoadMonitor extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
Constructor and Description |
---|
SystemLoadMonitor() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(SystemLoadListener listener) |
int[] |
getAverageCpuLoad()
Gets the average CPU load computed in the last two minutes:
first value: the 'average cpu usage' for the whole system second value: the 'average cpu usage' for the JVM process |
int[] |
getCpuLoad()
Retrieve the CPU load:
first value: the 'recent cpu usage' for the whole system second value: the 'recent cpu usage' for the JVM process |
boolean |
isAverageCpuOverLoaded()
Check if the 'average' CPU load is over the limit defined in
'system.cpuload.max' config parameter.
|
boolean |
isCpuOverLoaded()
Check if the 'recent' CPU load is over the limit defined in
'load.cpumax' config parameter.
|
void |
removeListener(SystemLoadListener listener) |
void |
setConfig(ContextProperties config) |
void |
setSamplesTotal(int samplesTotal) |
void |
start() |
public void setConfig(ContextProperties config)
public void setSamplesTotal(int samplesTotal)
public void addListener(SystemLoadListener listener)
public void removeListener(SystemLoadListener listener)
public int[] getAverageCpuLoad()
public boolean isCpuOverLoaded()
public int[] getCpuLoad()
public boolean isAverageCpuOverLoaded()
public void start()
Copyright © 2008-2014 Logical Objects. All Rights Reserved.