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] [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 -Ci Include the given OID in the search range. Normally snmpwalk
42 uses GETNEXT requests starting with the OID you specified and
43 returns all results in the MIB subtree rooted at that OID.
44 Sometimes, you may wish to include the OID specified on the
45 command line in the printed results if it is a valid OID in the
46 tree itself. This option lets you do this explicitly.
47
48 -CI In fact, the given OID will be retrieved automatically if the
49 main subtree walk returns no useable values. This allows a
50 walk of a single instance to behave as generally expected, and
51 return the specified instance value. This option turns off
52 this final GET request, so a walk of a single instance will
53 return nothing.
54
55 -Cp Upon completion of the walk, print the number of variables
56 found.
57
58 -Ct Upon completion of the walk, print the total wall-clock time it
59 took to collect the data (in seconds). Note that the timer is
60 started just before the beginning of the data request series
61 and stopped just after it finishes. Most importantly, this
62 means that it does not include snmp library initialization,
63 shutdown, argument processing, and any other overhead.
64
65 In addition to these options, snmpwalk takes the common options
66 described in the snmpcmd(1) manual page.
67
69 The command:
70
71 snmpwalk -Os -c public -v 1 zeus system
72
73 will retrieve all of the variables under system:
74
75 sysDescr.0 = STRING: "SunOS zeus.net.cmu.edu 4.1.3_U1 1 sun4m"
76 sysObjectID.0 = OID: enterprises.hp.nm.hpsystem.10.1.1
77 sysUpTime.0 = Timeticks: (155274552) 17 days, 23:19:05
78 sysContact.0 = STRING: ""
79 sysName.0 = STRING: "zeus.net.cmu.edu"
80 sysLocation.0 = STRING: ""
81 sysServices.0 = INTEGER: 72
82
84 snmpcmd(1), snmpbulkwalk(1), variables(5).
85
86
87
884th Berkeley Distribution 08 Feb 2002 SNMPWALK(1)