components/net-snmp/patches/032.15754602.hr_proc.patch
author Mohana Rao Gorai <mohana.gorai@oracle.com>
Tue, 18 Mar 2014 08:39:20 -0700
branchs11-update
changeset 2989 b14351c01d53
permissions -rw-r--r--
16242256 linkUpDownNotifications does not work as described in snmpd.conf man page 15819411 SUNBT7201970 There is no "PORTNUMBER" info for "traphandle" in solaris11 snmptra 15754602 SUNBT7111031 snmpd dumping during walk as strs test suite winds down its connect

Source : http://net-snmp.svn.sourceforge.net/viewvc/net-snmp?view=revision&revision=17415

------------------------------------------------------------------------------------------
--- a/agent/mibgroup/host/hr_proc.c	Fri May 11 17:32:30 2007
+++ b/agent/mibgroup/host/hr_proc.c	Fri Jun 14 11:27:57 2013
@@ -175,7 +175,8 @@
         return (u_char *) nullOid;
     case HRPROC_LOAD:
         cpu = netsnmp_cpu_get_byIdx( proc_idx & HRDEV_TYPE_MASK, 0 );
-        if ( !cpu || !cpu->history || !cpu->history[0].total_hist )
+        if ( !cpu || !cpu->history || !cpu->history[0].total_hist ||
+				( cpu->history[0].total_hist == cpu->total_ticks ))
             return NULL;
 
         long_return  = (cpu->idle_ticks  - cpu->history[0].idle_hist)*100;