components/net-snmp/patches/032.15754602.hr_proc.patch
branchs11u1-sru
changeset 3001 b96508535208
equal deleted inserted replaced
2990:946e9428cb03 3001:b96508535208
       
     1 Source : http://net-snmp.svn.sourceforge.net/viewvc/net-snmp?view=revision&revision=17415
       
     2 
       
     3 ------------------------------------------------------------------------------------------
       
     4 --- a/agent/mibgroup/host/hr_proc.c	Fri May 11 17:32:30 2007
       
     5 +++ b/agent/mibgroup/host/hr_proc.c	Fri Jun 14 11:27:57 2013
       
     6 @@ -175,7 +175,8 @@
       
     7          return (u_char *) nullOid;
       
     8      case HRPROC_LOAD:
       
     9          cpu = netsnmp_cpu_get_byIdx( proc_idx & HRDEV_TYPE_MASK, 0 );
       
    10 -        if ( !cpu || !cpu->history || !cpu->history[0].total_hist )
       
    11 +        if ( !cpu || !cpu->history || !cpu->history[0].total_hist ||
       
    12 +				( cpu->history[0].total_hist == cpu->total_ticks ))
       
    13              return NULL;
       
    14  
       
    15          long_return  = (cpu->idle_ticks  - cpu->history[0].idle_hist)*100;