2009/2/2 Hindley Nick <nick.hind...@hfbp.co.uk>:
> I think that the fix worked.  However, I got another core dump.
>

> #0  0x000796bc in var_hrproc (....)
>    at host/hr_proc.c:183
> 183             long_return  = 100 - long_return;

> (gdb) p cpu->total_ticks
> $3 = 1092197669
> (gdb) p cpu->history[0].total_hist
> $4 = 1092197669

Hmmm....   Try the attached patch.
Does that help at all?

Dave
Index: hr_proc.c
===================================================================
--- hr_proc.c	(revision 17365)
+++ hr_proc.c	(working copy)
@@ -177,7 +177,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;
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to