bsnmp-ucd returns incorrect value of ssCpuRawSoftIRQ
I was researching an issue with high system part of CPU load at one of our servers. While working on it I fond that bsnmp-ucd we use to monitor our server reports incorrect value of ssCpuRawSoftIRQ. According to MIB it must be "The number of 'ticks' (typically 1/100s) spent
processing software interrupts." bsnmp-ucd uses value of vm.stats.sys.v_soft sysctl, which in turn is just a number of software interrupts. Hope I'll have a time to send bug report.
Update. Here is the patch:
--- ucd_tree.def.orig 2010-06-08 10:16:58.000000000 +0400
+++ ucd_tree.def 2010-06-08 10:17:11.000000000 +0400
@@ -97,7 +97,7 @@
# (58 ssIORawReceived COUNTER op_systemStats GET)
(59 ssRawInterrupts COUNTER op_systemStats GET)
(60 ssRawContexts COUNTER op_systemStats GET)
- (61 ssCpuRawSoftIRQ COUNTER op_systemStats GET)
+# (61 ssCpuRawSoftIRQ COUNTER op_systemStats GET)
(62 ssRawSwapIn COUNTER op_systemStats GET)
(63 ssRawSwapOut COUNTER op_systemStats GET)
)
--- mibss.c.orig 2010-06-08 10:17:30.000000000 +0400
+++ mibss.c 2010-06-08 10:17:49.000000000 +0400
@@ -63,7 +63,6 @@
uint32_t cpuRawInterrupt;
uint32_t rawInterrupts;
uint32_t rawContexts;
- uint32_t cpuRawSoftIRQ;
uint32_t rawSwapIn;
uint32_t rawSwapOut;
};
@@ -159,8 +158,6 @@
mibss.rawInterrupts = (uint32_t) val;
sysctlval("vm.stats.sys.v_swtch", &val);
mibss.rawContexts = (uint32_t) val;
- sysctlval("vm.stats.sys.v_soft", &val);
- mibss.cpuRawSoftIRQ = (uint32_t) val;
current = get_ticks();
if (current > last_update) {
@@ -293,9 +290,6 @@
case LEAF_ssRawContexts:
value->v.uint32 = mibss.rawContexts;
break;
- case LEAF_ssCpuRawSoftIRQ:
- value->v.uint32 = mibss.cpuRawSoftIRQ;
- break;
case LEAF_ssRawSwapIn:
value->v.uint32 = mibss.rawSwapIn;
break;