Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / net-snmp / man / snmpget.1.def
1 .\" /***********************************************************
2 .\"     Copyright 1988, 1989 by Carnegie Mellon University
3 .\" 
4 .\"                       All Rights Reserved
5 .\" 
6 .\" Permission to use, copy, modify, and distribute this software and its 
7 .\" documentation for any purpose and without fee is hereby granted, 
8 .\" provided that the above copyright notice appear in all copies and that
9 .\" both that copyright notice and this permission notice appear in 
10 .\" supporting documentation, and that the name of CMU not be
11 .\" used in advertising or publicity pertaining to distribution of the
12 .\" software without specific, written prior permission.  
13 .\" 
14 .\" CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15 .\" ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16 .\" CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17 .\" ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18 .\" WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19 .\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20 .\" SOFTWARE.
21 .\" ******************************************************************/
22 .TH SNMPGET 1 "08 Feb 2002" VVERSIONINFO "Net-SNMP"
23 .UC 4
24 .SH NAME
25 snmpget - communicates with a network entity using SNMP GET Requests.
26 .SH SYNOPSIS
27 .B snmpget
28 [COMMON OPTIONS] [-Cf] OID [OID]...
29 .SH DESCRIPTION
30 .B snmpget
31 is an SNMP application that uses the SNMP GET request to query for
32 information on a network entity.  One or more object identifiers
33 (OIDs) may be given as arguments on the command line.  Each variable
34 name is given in the format specified in
35 .IR variables(5) .
36 .PP
37 For example:
38 .PP
39 snmpget -c public zeus system.sysDescr.0
40 .PP
41 will retrieve the variable system.sysDescr.0:
42 .PP
43 system.sysDescr.0 = "SunOS zeus.net.cmu.edu 4.1.3_U1 1 sun4m"
44 .PP
45 If the network entity has an error processing the request packet, an
46 error packet will be returned and a message will be shown, helping to
47 pinpoint in what way the request was malformed.  If there were other
48 variables in the request, the request will be resent without the bad
49 variable.
50 .SH "OPTIONS"
51 .TP 8
52 .B -Cf
53 If
54 .B -Cf
55 is
56 .I not
57 specified, some applications
58 .RB ( snmpdelta ", " snmpget ", " snmpgetnext " and " snmpstatus )
59 will try to fix errors returned by the agent that you were talking to
60 and resend the request.  The only time this is really useful is if you
61 specified a OID that didn't exist in your request and you're using
62 SNMPv1 which requires "all or nothing" kinds of requests. Here is an
63 example (note that system.sysUpTime is an incomplete OID as it needs
64 the .0 index appended to it):
65 .PP
66 .nf
67 snmpget -v1 -Cf -c public localhost system.sysUpTime system.sysContact.0
68 .BR
69 Error in packet
70 Reason: (noSuchName) There is no such variable name in this MIB.
71 This name doesn't exist: system.sysUpTime
72
73 snmpget -v1 -c public localhost system.sysUpTime system.sysContact.0
74 Error in packet
75 Reason: (noSuchName) There is no such variable name in this MIB.
76 This name doesn't exist: system.sysUpTime
77
78 system.sysContact.0 = STRING: root@localhost
79 .fi
80 .IP "" 8
81 With the
82 .B
83 -Cf
84 specified the application will not try to fix the PDU for you.
85 .PP
86 In addition to this option,
87 .B snmpget
88 takes the common options described in the 
89 .I snmpcmd(1)
90 manual page.
91 .SH "SEE ALSO"
92 snmpcmd(1), variables(5).