--- net-snmp-5.9.4/agent/mibgroup/ucd-snmp/vmstat_solaris2.c.orig +++ net-snmp-5.9.4/agent/mibgroup/ucd-snmp/vmstat_solaris2.c @@ -590,6 +590,13 @@ cpu_sum += (css_new->css_cpu[i] - css_old->css_cpu[i]); } + /* + * Assign a minimum value to get around divide by zero case + */ + if (cpu_sum == 0) { + cpu_sum = 1; + } + /* * Now calculate the absolute percentage values * Looks somewhat complicated sometimes but tries to get around using floats to increase speed