Dave Shield wrote: > 2009/5/7 Peter Hicks <peter.hi...@poggs.co.uk>: > >> What I did was to check for an instance in the returned VarBind, and if >> there's no instance, convert the OID to numeric format, lop off the last >> element (in this case, "0") and use that as the instance, then convert >> the OID back to text. > > Another possibility would be to tweak the DISMAN-EVENT-MIB file, > and comment out the definition of sysUpTimeInstance. > > It's generally recognised that this was a bad idea in the first place.
I thought about that - seriously, I did - as well as automagically unloading DISMAN-EVENT-MIB if it were loaded. I turned both options down as non-obvious requires-the-user-to-understand hacks. In case anyone's interested or wants to patch SNMP.pm: if($vb->[1] eq "") { my $numeric_oid = &SNMP::translateObj($vb->[0]); $numeric_oid =~ m/(.+)\.(\d+)/; $vb->[0] = &SNMP::translateObj($1); $vb->[1] = $2; } Peter -- Peter Hicks | e: my.n...@poggs.co.uk | g: 0x5DA31330 | w: www.poggs.com A: Because it destroys the flow of the conversation Q: Why is top-posting bad? ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-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