added files
[bcm963xx.git] / userapps / opensource / net-snmp / man / snmpd.8.def
1 .TH SNMPD 8 "7 Feb 2002" VVERSIONINFO "Net-SNMP"
2 .UC 4
3 .SH NAME
4 snmpd - daemon to respond to SNMP request packets.
5 .SH SYNOPSIS
6 .B snmpd
7 [OPTIONS] [LISTENING ADDRESSES]
8 .SH DESCRIPTION
9 .B snmpd
10 is an SNMP agent which binds to a port and awaits requests from
11 SNMP management software.  Upon receiving a request, it processes the
12 request(s), collects the requested information and/or performs the
13 requested operation(s) and returns the information to the sender.
14 .SH OPTIONS
15 .TP 8
16 .B -a
17 Log the source addresses of incoming requests.
18 .TP
19 .B -A
20 Append to the log file rather than truncating it.
21 .TP
22 .B "-c" \fIFILE
23 Read 
24 .I FILE
25 as a configuration file.
26 .TP
27 .B -C
28 Do not read any configuration files except the one optionally specified by the 
29 .B -c 
30 option.
31 .TP
32 .B -d
33 Dump (in hexadecimal) the sent and received SNMP packets.
34 .TP
35 .B -D\fI[TOKEN[,...]]
36 Turn on debugging output for the given
37 .IR "TOKEN" "(s)."
38 Without any tokens specified, it defaults to printing all the tokens
39 (which is equivalent to the keyword "ALL").
40 You might want to try
41 .IR ALL
42 for extremely verbose output.  Note: You can not put a space between
43 the -D flag and the listed TOKENs.
44 .TP
45 .B -f
46 Do not fork() from the calling shell.
47 .TP
48 .B -g \fIGID
49 Change to the numerical group ID
50 .I GID
51 after opening listening sockets.
52 .TP
53 .B -h, --help
54 Display a brief usage message and then exit.
55 .TP
56 .B -H
57 Display a list of configuration file directives understood by the
58 agent and then exit.
59 .TP
60 .B -I \fI[-]INITLIST
61 This option specifies which modules you do (or do not) want to be
62 initialized when the agent starts up.  If the comma-separated
63 .I INITLIST
64 is preceded
65 with a '-', it is the list of modules that you do
66 .I not
67 want to be started.  Otherwise,
68 .I INITLIST
69 is the list of modules to be started.
70
71 To get a list of compiled modules, run the agent with the arguments
72 .I "-Dmib_init -H"
73 (assumes you have debugging support compiled in).
74 .TP
75 .BR -l "" " " "[\fIFILE" "" "]"
76 Log all output from the agent (including stdout and stderr) to 
77 .IR FILE .
78 If no filename is given, log to a default file set at compile time
79 (normally /var/log/snmpd.log).
80 .TP
81 .B -L
82 Do not open a log file; print all messages to stderr instead.
83 .TP
84 .B -P \fIFILE
85 Save the process ID of the daemon in
86 .IR FILE "."
87 .TP 
88 .B -q
89 Print simpler output for easier automated parsing.
90 .TP
91 .B -r
92 Do not require root access to run the daemon.  Specifically, do not exit
93 if files only accessible to root (such as /dev/kmem etc.) cannot be
94 opened.
95 .TP
96 .B -s
97 Use syslog for logging.
98 .TP
99 .BR -S " d|0-7"
100 Specifies the syslog facility to use when logging to syslog.  'd' means
101 .B LOG_DAEMON
102 and 0 through 7 mean 
103 .BR LOG_LOCAL0 " through " LOG_LOCAL7 ".  " LOG_DAEMON " is the default."
104 .TP
105 .B -u \fIUID
106 Change to the user ID
107 .I UID
108 (which can be given in numerical or textual form) after opening
109 listening sockets.
110 .TP
111 .B -v, --version
112 Print version information for the agent and then exit.
113 .TP
114 .B -V
115 Symbolically dump SNMP transactions.
116 .TP
117 .B -x \fIADDRESS
118 Listens for AgentX connections on the specified address
119 rather than the default '/var/agentx/master'.
120 The address can either be a Unix domain socket path,
121 or the address of a network interface.  The format is the same as the
122 format of listening addresses described below.
123 .TP
124 .B -X
125 Run as an AgentX subagent rather than as an SNMP master agent.
126
127 .SH LISTENING ADDRESSES
128 By default,
129 .B snmpd
130 listens for incoming SNMP requests only on UDP port 161.  However, it
131 is possible to modify this behaviour by specifying one or more
132 listening addresses as arguments to
133 .BR snmpd .
134 A listening address takes the form:
135 .IP
136 [<transport-specifier>:]<transport-address>
137 .PP
138 At its simplest, a listening address may consist only of a port
139 number, in which case
140 .B snmpd
141 listens on that UDP port on all IPv4 interfaces.  Otherwise, the
142 <transport-address> part of the specification is parsed according to
143 the following table:
144 .RS 4
145 .TP 28
146 .BR "<transport-specifier>"
147 .BR "<transport-address> format"
148 .IP "udp" 28
149 hostname[:port]
150 .I or
151 IPv4-address[:port]
152 .IP "tcp" 28
153 hostname[:port]
154 .I or
155 IPv4-address[:port]
156 .IP "unix" 28
157 pathname
158 .IP "ipx" 28
159 [network]:node[/port]
160 .TP 28 
161 .IR "" "aal5pvc " or " pvc"
162 [interface.][VPI.]VCI
163 .TP 28
164 .IR "" "udp6 " or " udpv6 " or " udpipv6"
165 hostname[:port]
166 .I or
167 IPv6-address[:port]
168 .TP 28
169 .IR "" "tcp6 " or " tcpv6 " or " tcpipv6"
170 hostname[:port]
171 .I or
172 IPv6-address[:port]
173 .RE
174 .PP
175 Note that <transport-specifier> strings are case-insensitive so that,
176 for example, "tcp" and "TCP" are equivalent.  Here are some examples,
177 along with their interpretation:
178 .TP 24
179 .IR "127.0.0.1:161"
180 listen on UDP port 161, but only on the loopback interface.  This
181 prevents
182 .B snmpd
183 being queried remotely (which is a bit pointless).  The ":161" is
184 redundant here since that is the default SNMP port in any case.
185 .TP 24
186 .IR "TCP:1161"
187 listen on TCP port 1161 on all IPv4 interfaces.
188 .TP 24
189 .IR "ipx:/40000"
190 listen on IPX port 40000 on all IPX interfaces.
191 .TP 24
192 .IR "unix:/tmp/local-agent"
193 listen on the Unix domain socket 
194 .IR /tmp/local-agent .
195 .TP 24
196 .IR "/tmp/local-agent"
197 identical to the previous specification, since the Unix domain is the
198 default transport iff the first character of the <transport-address>
199 is a '/'.
200 .TP 24
201 .IR "PVC:161"
202 listen on the AAL5 permanent virtual circuit with VPI=0 and VCI=161
203 (decimal) on the first ATM adapter in the machine.
204 .TP 24
205 .IR "udp6:10161"
206 listen on port 10161 on all IPv6 interfaces.
207 .PP
208 Note that not all the transport domains listed above will always be
209 available; for instance, hosts with no IPv6 support will not be able
210 to use udp6 transport addresses, and attempts to do so will result in
211 the error "Error opening specified endpoint".  Likewise, since AAL5
212 PVC support is only currently available on Linux, it will fail with
213 the same error on other platforms.
214
215 .RE
216 .SH CONFIGURATION FILES
217 .PP
218 .B snmpd
219 checks for the existence of and parses the following files:
220 .TP 6
221 .B SYSCONFDIR/snmp/snmp.conf
222 Common configuration for the agent and applications. See
223 .I snmp.conf(5)
224 for details.
225 .TP
226 .B SYSCONFDIR/snmp/snmpd.conf
227 .TP
228 .B SYSCONFDIR/snmp/snmpd.local.conf
229 Agent-specific configuration.  See
230 .I snmpd.conf(5)
231 for details.  These files are optional and may be used to configure
232 access control, trap generation, subagent protocols and much else
233 besides.
234 .IP
235 In addition to these two configuration files in SYSCONFDIR/snmp, the
236 agent will read any files with the names
237 .I snmpd.conf
238 and
239 .I snmpd.local.conf
240 in a colon separated path specified in the
241 SNMPCONFPATH environment variable.
242 .TP
243 .B DATADIR/snmp/mibs/
244 The agent will also load all files in this directory as MIBs.  It will
245 not, however, load any file that begins with a '.' or descend into
246 subdirectories.
247 .SH SEE ALSO
248 (in recommended reading order)
249 .PP
250 snmp.conf(5),
251 snmpd.conf(5)
252 .\" Local Variables:
253 .\"  mode: nroff
254 .\" End: