Merge branch 'V5-5-patches' into V5-6-patches
* V5-5-patches:
BUG #2521: AIX: dont die when CPU is dynamically added to system.
diff --git a/agent/mibgroup/hardware/cpu/cpu_perfstat.c b/agent/mibgroup/hardware/cpu/cpu_perfstat.c
index 47d56c6..f0ff2d2 100644
--- a/agent/mibgroup/hardware/cpu/cpu_perfstat.c
+++ b/agent/mibgroup/hardware/cpu/cpu_perfstat.c
@@ -88,7 +88,7 @@
strcpy( name.name, "");
if (perfstat_cpu(&name, cs2, sizeof(perfstat_cpu_t), n) > 0) {
for ( i = 0; i < n; i++ ) {
- cpu = netsnmp_cpu_get_byIdx( i, 0 );
+ cpu = netsnmp_cpu_get_byIdx( i, 1 );
cpu->user_ticks = (unsigned long long)cs2[i].user;
cpu->sys_ticks = (unsigned long long)cs2[i].sys + (unsigned long long)cs2[i].wait;
cpu->kern_ticks = (unsigned long long)cs2[i].sys;