Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jdavidb (1361)

jdavidb
  (email not shown publicly)
http://voiceofjohn.blogspot.com/

J. David Blackstone has a Bachelor of Science in Computer Science and Engineering and nine years of experience at a wireless telecommunications company, where he learned Perl and never looked back. J. David has an advantage in that he works really hard, he has a passion for writing good software, and he knows many of the world's best Perl programmers.

Journal of jdavidb (1361)

Wednesday March 15, 2006
02:26 PM

SNMP

[ #29003 ]

I'm still having my SNMP problem (and after yesterday, I'm not really any closer than I was on Monday. Today I'm trying every other SNMP module I can find, and any other ideas I have. If it doesn't work by the end of the day, I'm going to forget using the module and just parse the output of the snmpwalk command. Sigh.

Presently I think I'm installing an alternative module to Net::SNMP which will actually talk directly to the same library that snmpwalk uses. I suppose Net::SNMP is a pure Perl implementation of the protocol.

I did discover that when I try to do what snmpwalk does, which I think consists of repeated calls to get_next_request, it simply skips this Counter64 value (I should get the MIB that points at it returned at some point, but I never do; it simply returns the next non-Counter64 value), while when I pass in that MIB directly to get_request, it gives me this error: "Received noSuchName(2) error-status at error-index 1." Whatever that is.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I too am trying to wrap my head around SNMP. What version are you using: 1, 2, 3? It sounds quite a bit like you are SNMPv2 when using snmpwalk but SNMPv1 when using Perl. Version 1 doesn't know about Counter64's and it does in fact return noSuchName when it is asked for one. See RFC2089, Mapping SNMPv2 onto SNMPv1 within a bi-lingual SNMP agent. Specifically bullet point 2 under both Section 3.1 Processing an SNMPv1 GET request [rfc.net] and Section 3.2 Processing an SNMPv1 GETNEXT request [rfc.net].
    • Hmmm, I was pretty sure it was version 2 (or version 2c???) for both, but you raise a good point that I should check that. Thank you.

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
    • THANK YOU!!!!!! That was my problem!!!

      Net::SNMP defaults to version 1. I'm using version 2 with snmpwalk. (Actually apparently the formal name is 2c, but Net::SNMP names it "2".)

      I had only thought to be explicit about the version with snmpwalk, which wanted to use 3 by default and failed to work at all, with noisy error messages. Using 1 only silently failed for the Counter64's.

      I owe you a drink sometime, but since I don't buy alcohol, maybe we'll make it a soda and a burger. :) Thank you so much

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
      • Glad I could help. I work in Irving near 161 and 114, perhaps we can do lunch sometime.
        • Wow; yeah. Didn't realize you were in the area. I definitely owe you lunch, so we'll have to arrange that at some point.

          --
          J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers