public class LoadReportObserverTask
extends org.hyperic.sigar.cmd.SigarCommandBase
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG
Controls if some debug information is shown on the console
|
Constructor and Description |
---|
LoadReportObserverTask(java.lang.String participantIp)
Constructs the Load Report Observer using the default numberOfCpuUsageMeasurement
|
LoadReportObserverTask(java.lang.String participantIp,
int numberOfCpuUsageMeasurement)
Constructs the Load Report Observer using the numberOfCpuUsageMeasurement informed
|
Modifier and Type | Method and Description |
---|---|
byte |
getAverageCpuUsage()
Gets the average CPU usage using numberOfCpuUsageMeasurement
|
byte |
getCurrentCpuUsage()
Gets the current CPU Usage in byte format
|
LoadReport |
getLoadReportTopic()
Gets a filled LoadReportTopic from the monitored informations
|
void |
output(java.lang.String[] args)
Prints the CPU Information for debug purpose
|
void |
run()
Refresh the monitored resource data
|
complete, completePid, flush, getCompleter, getCompletions, getFormatter, isPidCompleter, printf, printf, printf, println, processCommand, setOutputFormat, sprintf
public static final boolean DEBUG
public LoadReportObserverTask(java.lang.String participantIp, int numberOfCpuUsageMeasurement)
participantIp
- The participant IP. Useful in case of a GatewaynumberOfCpuUsageMeasurement
- Number of measurements to calculate the CPU averagepublic LoadReportObserverTask(java.lang.String participantIp)
participantIp
- The participant IP. Useful in case of a Gatewaypublic void output(java.lang.String[] args) throws org.hyperic.sigar.SigarException
output
in class org.hyperic.sigar.cmd.SigarCommandBase
org.hyperic.sigar.SigarException
public byte getCurrentCpuUsage()
public byte getAverageCpuUsage()
public LoadReport getLoadReportTopic()
public void run()
run
in interface java.lang.Runnable