components/net-snmp/patches/015.6956251.vmstat_solaris2.patch
changeset 252 ee0fb1eabcbf
equal deleted inserted replaced
251:f527656d334f 252:ee0fb1eabcbf
       
     1 --- patch/net-snmp-5.4.1/agent/mibgroup/ucd-snmp/vmstat_solaris2.c	Tue Aug  3 06:04:52 2010
       
     2 +++ net-snmp-5.4.1/agent/mibgroup/ucd-snmp/vmstat_solaris2.c	Wed Oct  6 01:27:48 2010
       
     3 @@ -589,6 +589,13 @@
       
     4              cpu_sum += (css_new->css_cpu[i] - css_old->css_cpu[i]);
       
     5          }
       
     6  
       
     7 +	/*
       
     8 +	 * Assign a minimum value to get around divide by zero case
       
     9 +	 */
       
    10 +	if (cpu_sum == 0) {
       
    11 +		cpu_sum = 1;
       
    12 +	}
       
    13 +
       
    14          /*
       
    15           * Now calculate the absolute percentage values 
       
    16           * Looks somewhat complicated sometimes but tries to get around using floats to increase speed