Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

snmpget returns "Cannot find module" in net-snmp

Posted on 2006-04-26
6
Medium Priority
?
5,786 Views
Last Modified: 2012-06-27
How can I get snmpget working ? This is from a Windows XP box

Currently it returns all this :

C:\SNMP\net-snmp\bin>snmpget -v2c -c public 192.168.1.1 system.sysDescr.0
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
system.sysDescr.0:  (Sub-id not found: (top) -> system)


- I've copied net-snmp.dll into c:\windows\system32
- I've set snmp.conf (in the same dir as the EXEs) to

mibdirs c:\snmp\net-snmp\share\snmp\mibs
persistentDir c:\snmp\net-snmp\snmp\persist
tempFilePattern c:\snmp\net-snmp\temp\snmpdXXXXXX

Any ideas ? I get a feeling I need to "install the mibs" but if so how do I do that ?


When I add -m ALL

snmpget v2c -m ALL -c public 192.168.1.1 system.sysDescr.0

I get the error (Sub-id not found).


thanks

0
Comment
Question by:plq
  • 3
5 Comments
 
LVL 22

Expert Comment

by:grg99
ID: 16544532
What language is this?  I dion't recognize the error mesasges from the module loader.

0
 
LVL 8

Author Comment

by:plq
ID: 16544568
snmpget is downloadable from net-snmp on sourceforge. Its compiled from C.

I think the error messages are raised by net-snmp.dll because it can't find the mibs that its supposed to load as default (i.e. when you leave out -m)

So I'm sure its just a case of putting the mib files in the right directory or setting the right config file snmp.conf but I can't get it working so far ..
0
 
LVL 86

Expert Comment

by:jkr
ID: 16545192
Run the DependencyWalker (www.dependencywalker.com) in 'Profile' mode to see what DLLs the app is trying to load.
0
 
LVL 8

Accepted Solution

by:
plq earned 0 total points
ID: 16545425
Found it at last

C:\SNMP\net-snmp\bin>set MIBDIRS=C:\SNMP\net-snmp\share\snmp\mibs

C:\SNMP\net-snmp\bin>snmpget -v1 -c public 192.168.1.1 system.sysDescr.0
SNMPv2-MIB::sysDescr.0 = STRING: Cisco PIX Firewall Version 6.3(3)

I had to do that set statement. The snmp documentation is sooooo bad for windows, I've been stuck on this all day !!!

thanks
0
 
LVL 8

Author Comment

by:plq
ID: 16548292
Yes please. thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question