|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsysmon.CPUMonitoringData
This class stores monitoring information for the whole system. CPU Usages are provided as a double value between 0.0 and 1.0. If the underlying system cannot provide some information, they are set to 0
Field Summary | |
static int |
IDLE_INDEX
Index of Idle information in returned results |
static int |
IO_INDEX
Index of IOWait information in returned results |
static int |
IRQ_INDEX
Index of IRQ information in returned results |
static int |
NB_INDEXES
Number of indexes available. |
static int |
NICE_INDEX
Index of Nice information in returned results |
static int |
SOFT_IRQ_INDEX
Index of Soft IRQ information in returned results |
static int |
STEAL_INDEX
Index of Steal information in returned results |
static int |
SYSTEM_INDEX
Index of System information in returned results |
static int |
TOTAL_INDEX
Index of Aggregated information in returned results The value at this index are compute on recalcTotal call |
static int |
USER_INDEX
Index of User information in returned results |
Constructor Summary | |
CPUMonitoringData(int nbCpus)
Initializes SystemMonitoringData for given number of CPUs |
Method Summary | |
long |
getTime(int cpuIndex,
int index)
Returns the CPU time for the specified type and CPU |
long[] |
getTimes(int cpuIndex)
Returns all the Times for the given CPU The indexes of the information in the returned array are ones of *_INDEX |
long |
getTotalTime(int index)
Returns the Total time for the specified type |
long[] |
getTotalTimes()
Returns all the Total Times. |
double |
getTotalUsage(int index)
Return the Total CPU Usage for the specified type |
double[] |
getTotalUsages()
Returns all the Total Usages The indexes of the information in the returned array are ones of *_INDEX |
double |
getUsage(int cpuIndex,
int index)
Return the CPU Usage for the specified type and CPU |
double[] |
getUsages(int cpuIndex)
Returns all the Usages for a given CPU The indexes of the information in the returned array are ones of *_INDEX |
protected void |
recalcTotal()
Recalculate all values at TOTAL_INDEX |
void |
recalcUsages(CPUMonitoringData previousInfo)
Recalculates the CPU Usage during time spent since provided information |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int USER_INDEX
public static final int NICE_INDEX
public static final int SYSTEM_INDEX
public static final int IDLE_INDEX
public static final int IRQ_INDEX
public static final int SOFT_IRQ_INDEX
public static final int STEAL_INDEX
public static final int IO_INDEX
public static final int TOTAL_INDEX
public static final int NB_INDEXES
Constructor Detail |
public CPUMonitoringData(int nbCpus)
nbCpus
- Method Detail |
public long getTotalTime(int index)
index
- One of *_INDEX
public long getTime(int cpuIndex, int index)
cpuIndex
- CPU index to considerindex
- One of *_INDEX
public double getTotalUsage(int index)
index
- One of *_INDEX
public double getUsage(int cpuIndex, int index)
cpuIndex
- CPU index to considerindex
- One of *_INDEX
public long[] getTotalTimes()
public long[] getTimes(int cpuIndex)
cpuIndex
- CPU Index to consider
public double[] getTotalUsages()
public double[] getUsages(int cpuIndex)
cpuIndex
- CPU Index to consider
public void recalcUsages(CPUMonitoringData previousInfo)
previousInfo
- protected void recalcTotal()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |