1SNMPGET(1) Net-SNMP SNMPGET(1)
2
3
4
6 snmpget - communicates with a network entity using SNMP GET requests
7
9 snmpget [COMMON OPTIONS] [-Cf] OID [OID]...
10
12 snmpget is an SNMP application that uses the SNMP GET request to query
13 for information on a network entity. One or more object identifiers
14 (OIDs) may be given as arguments on the command line. Each variable
15 name is given in the format specified in variables(5).
16
17 For example:
18
19 snmpget -c public zeus system.sysDescr.0
20
21 will retrieve the variable system.sysDescr.0:
22
23 system.sysDescr.0 = "SunOS zeus.net.cmu.edu 4.1.3_U1 1 sun4m"
24
25 If the network entity has an error processing the request packet, an
26 error packet will be returned and a message will be shown, helping to
27 pinpoint in what way the request was malformed. If there were other
28 variables in the request, the request will be resent without the bad
29 variable.
30
32 -Cf If -Cf is not specified, some applications (snmpdelta, snmpget,
33 snmpgetnext and snmpstatus) will try to fix errors returned by
34 the agent that you were talking to and resend the request. The
35 only time this is really useful is if you specified a OID that
36 didn't exist in your request and you're using SNMPv1 which
37 requires "all or nothing" kinds of requests. Here is an example
38 (note that system.sysUpTime is an incomplete OID as it needs
39 the .0 index appended to it):
40
41 snmpget -v1 -Cf -c public localhost system.sysUpTime system.sysContact.0
42
43 Error in packet
44 Reason: (noSuchName) There is no such variable name in this MIB.
45 This name doesn't exist: system.sysUpTime
46
47 snmpget -v1 -c public localhost system.sysUpTime system.sysContact.0
48 Error in packet
49 Reason: (noSuchName) There is no such variable name in this MIB.
50 This name doesn't exist: system.sysUpTime
51
52 system.sysContact.0 = STRING: root@localhost
53
54 With the -Cf specified the application will not try to fix the
55 PDU for you.
56
57 In addition to this option, snmpget takes the common options described
58 in the snmpcmd(1) manual page.
59
61 snmpcmd(1), variables(5).
62
63
64
654th Berkeley Distribution 08 Feb 2002 SNMPGET(1)