1SNMPGET(1)                         Net-SNMP                         SNMPGET(1)
2
3
4

NAME

6       snmpget - communicates with a network entity using SNMP GET requests
7

SYNOPSIS

9       snmpget [COMMON OPTIONS] [-Cf] OID [OID]...
10

DESCRIPTION

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

OPTIONS

18       -Cf     If -Cf is not specified, some applications (snmpdelta, snmpget,
19               snmpgetnext  and snmpstatus) will try to fix errors returned by
20               the agent that you were talking to and resend the request.  The
21               only  time this is really useful is if you specified a OID that
22               didn't exist in your request  and  you're  using  SNMPv1  which
23               requires "all or nothing" kinds of requests.
24
25       In  addition  to  this option, snmpget REQUIRES options and agent argu‐
26       ments, as described in the snmpcmd(1) manual page.
27

EXAMPLES

29       The command:
30
31           snmpget -c public zeus system.sysDescr.0
32
33       will retrieve the variable system.sysDescr.0 from the host  zeus  using
34       the community string public :
35
36           system.sysDescr.0 = "SunOS zeus.net.cmu.edu 4.1.3_U1 1 sun4m"
37
38       If  the  network  entity has an error processing the request packet, an
39       error packet will be returned and a message will be shown,  helping  to
40       pinpoint  in  what  way the request was malformed.  If there were other
41       variables in the request, the request will be resent  without  the  bad
42       variable.
43
44       Here  is another example. The -c and -v options are defined in the snm‐
45       pcmd(1) manual page. (Note that system.sysUpTime is an incomplete  OID,
46       as it needs the .0 index appended to it):
47
48           snmpget -v1 -Cf -c public localhost system.sysUpTime system.sysContact.0
49
50       This example will return the following:
51
52           Error in packet
53           Reason: (noSuchName) There is no such variable name in this MIB.
54           This name doesn't exist: system.sysUpTime
55
56       Similarly, the command:
57           snmpget -v1 -c public localhost system.sysUpTime system.sysContact.0
58
59       Will return:
60
61           Error in packet
62           Reason: (noSuchName) There is no such variable name in this MIB.
63           This name doesn't exist: system.sysUpTime
64
65           system.sysContact.0 = STRING: root@localhost
66
67       With the -Cf flag specified the application will not try to fix the PDU
68       for you.
69

SEE ALSO

71       snmpcmd(1), snmpwalk(1), variables(5).
72
73
74
754th Berkeley Distribution         08 Feb 2002                       SNMPGET(1)
Impressum