TUT:snmpwalk

From Net-SNMP Wiki
Revision as of 19:36, 23 January 2007 by Wes (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

snmpwalk

The snmpwalk command essentially performs a whole series of getnexts automatically for you, and stops when it returns results that are no longer inside the range of the OID that you originally specified. If you wanted to get all of the information stored on a machine in the system MIB group, for instance, you could use this command to do so:

 % snmpwalk -v 2c -c demopublic test.net-snmp.org system
 system.sysDescr.0 = HP-UX net-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@ucdavis.edu
 system.sysName.0 = net-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
 system.sysORTable.sysOREntry.sysORID.2 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpVacmMIB.vacmMIBConformance.vacmMIBGroups.vacmBasicGroup
 system.sysORTable.sysOREntry.sysORID.3 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpFrameworkMIB.snmpFrameworkMIBConformance.snmpFrameworkMIBCompliances.snmpFrameworkMIBCompliance
 system.sysORTable.sysOREntry.sysORID.4 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpMPDMIB.snmpMPDMIBConformance.snmpMPDMIBCompliances.snmpMPDCompliance
 system.sysORTable.sysOREntry.sysORID.5 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpUsmMIB.usmMIBConformance.usmMIBCompliances.usmMIBCompliance
 system.sysORTable.sysOREntry.sysORDescr.1 = The Mib module for SNMPv2 entities.
 system.sysORTable.sysOREntry.sysORDescr.2 = View-based Access Control Model for SNMP.
 system.sysORTable.sysOREntry.sysORDescr.3 = The SNMP Management Architecture MIB.
 system.sysORTable.sysOREntry.sysORDescr.4 = The MIB for Message Processing and Dispatching.
 system.sysORTable.sysOREntry.sysORDescr.5 = The management information definitions for the SNMP User-based Security Model.
 system.sysORTable.sysOREntry.sysORUpTime.1 = Timeticks: (0) 0:00:00.00
 system.sysORTable.sysOREntry.sysORUpTime.2 = Timeticks: (0) 0:00:00.00
 system.sysORTable.sysOREntry.sysORUpTime.3 = Timeticks: (0) 0:00:00.00
 system.sysORTable.sysOREntry.sysORUpTime.4 = Timeticks: (0) 0:00:00.00
 system.sysORTable.sysOREntry.sysORUpTime.5 = Timeticks: (0) 0:00:00.00

Tutorial Sections

About the SNMP Protocol

These tutorial links talk about SNMP generically and how the protocol itself works. They are good introductory reading material and the concepts are important to understand before diving into the later tutorials about Net-SNMP itself.

Net-SNMP Command Line Applications

These tutorial pages discuss the command line tools provided in the Net-SNMP suite of tools. Nearly all the example commands in these tutorials works if you try it yourself, as they're all examples that talk to our online Net-SNMP test agent. Given them a shot!

Application Configuration

All of our applications support configuration to allow you to customize how they behave.

Net-SNMP Daemons

Net-SNMP comes with two long-running daemons: a SNMP agent (snmpd) for responding to management requests and a notification receiver (snmptrapd) for receiving SNMP notifications.

Coding Tutorials

Net-SNMP comes with a highly flexible and extensible API. The API allows you to create your own commands, add extensions to the agent to support your own MIBs and perform specialized processing of notifications.

Debugging SNMP Applications and Agents

All our tools and applications have extensive debugging output. These tutorials talk about how the debugging system works and how you can add your own debugging statements to you code:

Operating System Specific Tutorials