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] AGENT 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 takes the common options described
26       in the snmpcmd(1) manual page.  Note that snmpget REQUIRES an  argument
27       specifying  the  agent  to  query  and  at  least  one OID argument, as
28       described there.
29

EXAMPLES

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

SEE ALSO

73       snmpcmd(1), snmpwalk(1), variables(5).
74
75
76
77V5.9                              18 Jun 2007                       SNMPGET(1)
Impressum