[mrtg] Re: snmpwalk

Justin Shore listuser at vinnie.ksu.ksu.edu
Fri Feb 18 21:22:47 MET 2000


At 11:25 AM -0600 2/18/00, Christopher L. Barnard wrote:
>This is embarassing, but I'm afraid I need to ask.  I thought I knew enough
>about snmp, but apparently I don't.  What is "snmpwalk" that folks on this
>list keep talking about?  Several people have suggested that I use snmpwalk to
>find out what OIDs my servers will respond to.  I have searched through all
>mrtg source, the source of various utilities that mrtg needs, the server upon
>which the monitoring SNM instance is installed (in other words, the complete
>package) and even did a web search on "snmpwalk".  In all cases, I came up
>empty.  The web search turned up lots of documentation and man pages about
>the snmpwalk library call, but since it didn't say which library it is in
>and I didn't find it in any of my libraries, I can't just write my own C
>program to call this library because I cannot find it...
>

UCD-SNMP has a small work-in-progress tutorial that might help you some.

http://ucd-snmp.ucdavis.edu/tutorial/

What snmpwalk does is asks a device 'what all can you tell me' in a 
basic sense.  That device responds with all that it knows (unless its 
a #$%^& Lucent 130!) in the form of:

system.sysDescr.0 = HP-UX ucd-snmp B.10.20 A 9000/715
system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.hpux10
system.sysUpTime.0 = Timeticks: (586998396) 67 days, 22:33:03.96
system.sysContact.0 = Wes Hardaker wjhardaker at ucdavis.edu
system.sysName.0 = ucd-snmp
system.sysLocation.0 = UCDavis
system.sysORLastChange.0 = Timeticks: (0) 0:00:00.00
system.sysORTable.sysOREntry.sysORIndex.1 = 1
system.sysORTable.sysOREntry.sysORIndex.2 = 2
system.sysORTable.sysOREntry.sysORIndex.3 = 3
system.sysORTable.sysOREntry.sysORIndex.4 = 4
system.sysORTable.sysOREntry.sysORIndex.5 = 5
system.sysORTable.sysOREntry.sysORID.1 = OID: 
.iso.org.dod.internet.snmpV2.snmpModules.snmpMIB

<snip>

You can already see some of the uses for it.  You use it in the following way

$   snmpwalk hostname community_string any_particular_part_of_the_MIB_tree


You might want to pipe it into 'less' since its output may be MBs 
long (like on a Cisco 5300).  The last part about the MIB tree is 
optional in case you want to see all of the device has to tell you. 
It can tell you all sorts of things like the status of ports, errors 
on ports, I/O on ports, temperature if the device can do that, 
contact names, routing tables, etc....   The list is long and never 
ending in a sense.  My examples are for a Linux based machine running 
UCD-SNMP 4.1.1.  Good luck!

Justin


--
Justin Shore
K-State Linux Distro Mirror, Sysadmin
macdaddy at vinnie.ksu.ksu.edu
<http://vinnie.ksu.ksu.edu/mirror/rpm2html>
<ftp://vinnie.ksu.ksu.edu/pub/mirror/linux>

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg



More information about the mrtg mailing list