The CPU plugin on AIX gets its values from OS level commands, as well as the native AIX perfstat library.
The CPU count is parsed from the output of the commands from
To indicate if the CPU is online, the plugin checks the difference of values (user, sys, idle, wait) from the previous sample (ticks). If the computed value was 0 or less, that CPU will be set as offline and all usage stats are set to 0%.
/usr/sbin/lscfg -l proc\*The percentUsertime, percentSystemtime, percentWaittime, percentIdletime are taken from the computed average from perfstat_cpu values:
/usr/sbin/lsattr -E -l sys0
|user||Number of clock ticks spent in user mode|
|sys||Number of clock ticks spent in system (kernel) mode|
|idle||Number of clock ticks spent idle with no I/O pending|
|wait||Number of clock ticks spent idle with I/O pending|
if (dDiffTotal <= 0.0)CPU percentUlitilization is computed as ( 100 - perfstat_cpu idle ) value per cpu
pCpu->bOnline = false;
pCpu->dUser = pCpu->dSys = pCpu->dIdle = pCpu->dWait = 0.0;
double dUtil = 100 - pCpu->dIdle;CPU clockspeed is derived from perfstat_cpu_total then the value is divided by 1000000.0
double(tot.processorHZ) / 1000000.0
Please sign in to leave a comment.