Re: net-snmp and solaris dynamic reconfiguration

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2009/2/2 Hindley Nick <[email protected]>:
> 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

------------------------------------------------------------------------------
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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
hr_proc.diff (text/x-patch, 602 B)
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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.