1SNMPWALK(1) Net-SNMP SNMPWALK(1)
2
3
4
6 snmpwalk - retrieve a subtree of management values using SNMP GETNEXT
7 requests
8
10 snmpwalk [APPLICATION OPTIONS] [COMMON OPTIONS] AGENT [OID]
11
13 snmpwalk is an SNMP application that uses SNMP GETNEXT requests to
14 query a network entity for a tree of information.
15
16 An object identifier (OID) may be given on the command line. This OID
17 specifies which portion of the object identifier space will be searched
18 using GETNEXT requests. All variables in the subtree below the given
19 OID are queried and their values presented to the user. Each variable
20 name is given in the format specified in variables(5).
21
22 If no OID argument is present, snmpwalk will search the subtree rooted
23 at SNMPv2-SMI::mib-2 (including any MIB object values from other MIB
24 modules, that are defined as lying within this subtree). If the net‐
25 work entity has an error processing the request packet, an error packet
26 will be returned and a message will be shown, helping to pinpoint why
27 the request was malformed.
28
29 If the tree search causes attempts to search beyond the end of the MIB,
30 the message "End of MIB" will be displayed.
31
33 -Cc Do not check whether the returned OIDs are increasing. Some
34 agents (LaserJets are an example) return OIDs out of order, but
35 can complete the walk anyway. Other agents return OIDs that
36 are out of order and can cause snmpwalk to loop indefinitely.
37 By default, snmpwalk tries to detect this behavior and warns
38 you when it hits an agent acting illegally. Use -Cc to turn
39 off this check.
40
41 -CE {OID}
42 End the walk at the specified OID, rather than a simple sub‐
43 tree. This can be used to walk a partial subtree, selected
44 columns of a table, or even two or more tables within a single
45 command.
46
47 -Ci Include the given OID in the search range. Normally snmpwalk
48 uses GETNEXT requests starting with the OID you specified and
49 returns all results in the MIB subtree rooted at that OID.
50 Sometimes, you may wish to include the OID specified on the
51 command line in the printed results if it is a valid OID in the
52 tree itself. This option lets you do this explicitly.
53
54 -CI In fact, the given OID will be retrieved automatically if the
55 main subtree walk returns no useable values. This allows a
56 walk of a single instance to behave as generally expected, and
57 return the specified instance value. This option turns off
58 this final GET request, so a walk of a single instance will
59 return nothing.
60
61 -Cp Upon completion of the walk, print the number of variables
62 found.
63
64 -Ct Upon completion of the walk, print the total wall-clock time it
65 took to collect the data (in seconds). Note that the timer is
66 started just before the beginning of the data request series
67 and stopped just after it finishes. Most importantly, this
68 means that it does not include snmp library initialization,
69 shutdown, argument processing, and any other overhead.
70
71 In addition to these options, snmpwalk takes the common options
72 described in the snmpcmd(1) manual page.
73
75 Note that snmpbulkget REQUIRES an argument specifying the agent to
76 query and at most one OID argument, as described there. The command:
77
78 snmpwalk -Os -c public -v 1 zeus system
79
80 will retrieve all of the variables under system:
81
82 sysDescr.0 = STRING: "SunOS zeus.net.cmu.edu 4.1.3_U1 1 sun4m"
83 sysObjectID.0 = OID: enterprises.hp.nm.hpsystem.10.1.1
84 sysUpTime.0 = Timeticks: (155274552) 17 days, 23:19:05
85 sysContact.0 = STRING: ""
86 sysName.0 = STRING: "zeus.net.cmu.edu"
87 sysLocation.0 = STRING: ""
88 sysServices.0 = INTEGER: 72
89 (plus the contents of the sysORTable).
90
91 The command:
92
93 snmpwalk -Os -c public -v 1 -CE sysORTable zeus system
94
95 will retrieve the scalar values, but omit the sysORTable.
96
98 snmpcmd(1), snmpbulkwalk(1), variables(5).
99
100
101
102V5.7.2 28 May 2007 SNMPWALK(1)