Hallo, before this drives me crazy: I am pulling the ssCpuRawIdle counter from M0n0wall 1.231 installed on a Soekris box. In my understanding the sum of idle-, user and system-time should equal the total time. So if I poll with f.e. a 120 second-delta it should be easy to calculate the % of idle CPU time.
Let's do some maths:
Delta: 1180990837-1180990710 = 127 seconds Idle: 357383171-357367509 = 15662 ticks System: 18994663-18994462 = 201 ticks User: 212313-212311 = 2 ticks
100 ticks = 1 second
156,62 + 2,01 + 0,02 = 158,65 seconds which is *not* the same as 127
Below the whole trace ...
Any idea?
TIA Ingo
$ date +%s && snmpwalk -c mg5 -mAll -v2c fw2 .1.3.6.1.4.1.2021.11 && sleep 120 && date +%s && snmpwalk -c mg5 -mAll -v2c fw2 .1.3.6.1.4.1.2021.11 1180990710 UCD-SNMP-MIB::ssIndex.0 = INTEGER: 1 UCD-SNMP-MIB::ssErrorName.0 = STRING: systemStats UCD-SNMP-MIB::ssSwapIn.0 = INTEGER: 0 UCD-SNMP-MIB::ssSwapOut.0 = INTEGER: 0 UCD-SNMP-MIB::ssSysInterrupts.0 = INTEGER: 1115 UCD-SNMP-MIB::ssSysContext.0 = INTEGER: 5 UCD-SNMP-MIB::ssCpuUser.0 = INTEGER: 0 UCD-SNMP-MIB::ssCpuSystem.0 = INTEGER: 0 UCD-SNMP-MIB::ssCpuIdle.0 = INTEGER: 99 UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 212311 UCD-SNMP-MIB::ssCpuRawNice.0 = Counter32: 158065 UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 18994462 UCD-SNMP-MIB::ssCpuRawIdle.0 = Counter32: 357367509 UCD-SNMP-MIB::ssCpuRawKernel.0 = Counter32: 340693 UCD-SNMP-MIB::ssCpuRawInterrupt.0 = Counter32: 18653769 UCD-SNMP-MIB::ssRawInterrupts.0 = Counter32: 3657067098 UCD-SNMP-MIB::ssRawContexts.0 = Counter32: 15219741 1180990837 UCD-SNMP-MIB::ssIndex.0 = INTEGER: 1 UCD-SNMP-MIB::ssErrorName.0 = STRING: systemStats UCD-SNMP-MIB::ssSwapIn.0 = INTEGER: 0 UCD-SNMP-MIB::ssSwapOut.0 = INTEGER: 0 UCD-SNMP-MIB::ssSysInterrupts.0 = INTEGER: 1126 UCD-SNMP-MIB::ssSysContext.0 = INTEGER: 5 UCD-SNMP-MIB::ssCpuUser.0 = INTEGER: 0 UCD-SNMP-MIB::ssCpuSystem.0 = INTEGER: 1 UCD-SNMP-MIB::ssCpuIdle.0 = INTEGER: 98 UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 212313 UCD-SNMP-MIB::ssCpuRawNice.0 = Counter32: 158068 UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 18994663 UCD-SNMP-MIB::ssCpuRawIdle.0 = Counter32: 357383171 UCD-SNMP-MIB::ssCpuRawKernel.0 = Counter32: 340705 UCD-SNMP-MIB::ssCpuRawInterrupt.0 = Counter32: 18653958 UCD-SNMP-MIB::ssRawInterrupts.0 = Counter32: 3657208214 UCD-SNMP-MIB::ssRawContexts.0 = Counter32: 15220351
|