File: snmpd.8

package info (click to toggle)
snmp 3.6-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,284 kB
  • ctags: 1,929
  • sloc: ansic: 18,710; sh: 585; makefile: 311
file content (170 lines) | stat: -rw-r--r-- 6,852 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
.\"/***********************************************************
.\" 	Copyright 1989 by Carnegie Mellon University
.\" 
.\"                       All Rights Reserved
.\" 
.\" Permission to use, copy, modify, and distribute this software and its 
.\" documentation for any purpose and without fee is hereby granted, 
.\" provided that the above copyright notice appear in all copies and that
.\" both that copyright notice and this permission notice appear in 
.\" supporting documentation, and that the name of CMU not be
.\" used in advertising or publicity pertaining to distribution of the
.\" software without specific, written prior permission.  
.\" 
.\" CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
.\" ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
.\" CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
.\" ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
.\" WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
.\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
.\" SOFTWARE.
.\" ******************************************************************/
.TH SNMPD 8 "Feb 1998"
.SH NAME
snmpd - cmu's snmp agent for Linux
.SH SYNOPSIS
snmpd [-V] [-p <port>] [-v] [-d] [-A] [-f] [-c <configfile>] [-a <agentboots>]
.SH DESCRIPTION
Snmpd should be run as a daemon in background. It is serving to your
pleasure and answering snmp V1 and V2usec requests.

Since v3.6 experimental support for SNMP over IPX is added. If
compiled in, the agent tries to listen to IPX additional to IP.  If
the IPX port cannot be opened or bound, a warning is written.

About SNMP at all:

SNMP is the Simple Network Management Protocol of the Internet. The
first version of this protocol (SNMPv1) is a full Internet standard
and defined in RFC 1155 and RFC 1157. The second version of SNMP
(SNMPv2) is defined in RFC 1901 - RFC 1908 and is currently a draft
Internet standard.

The protocol allows to retrieve and set variables, addressed as
objects in a Management Information Base (MIB). The well-known
standard MIB is called MIB-2 and defined in RFC 1213. It contains
variables related to the TCP/IP protocol suite. Many additional MIB
modules are defined (and sometimes implemented...) by IETF working
groups. These modules together with some vendor specific MIB modules
allow to monitor and operate equipments like Unix-Hosts, X-Terminals,
Printers, Routers, coffee machines, toasters and more.

Access to the MIB is implemented by an SNMP agent. It listens on a
well-known UDP port for SNMP requests send by a management station,
gets the requested information out of the operating system, and
returns a response. A management station can range from a simple
command-line tool as contained in this CMU port (e.g. snmpget or
snmpwalk) to a complex powerful graphical management station.

The security model of SNMPv2 is still under development and the
currently implemented SNMPv2 USEC model is likely to change in a
future version.

Back to the agent, named snmpd:
 
Upon startup /etc/snmpd.conf is read (if it exists).
.br
Successful set-requests of system.sysName, system.sysLocation and
system.sysContact are stored in
.B "snmpd.conf(5)",
if this files exists.
.br
With the default configuration the daemon answers all V1 requests with
the ``public'' community string, except for host.hrSWRun* requests,
for security reasons and the configured V2usec requests.
.SH OPTIONS
.TP
.B "-V"
Print version to stdout and exit. This reports compiled in support for
IPX too.
.TP
.B "-v"
Be verbose upon startup.  The agent writes information stdout about
protocols the agent listens to (possible is IP and IPX), and writes
about options configured in snmpd.conf.
.TP
.B "-d"
Dump snmp-packets to stdout. Useful for debugging only.
.TP
.B "-A"
This option is only effective on a linux system with a specific
ip-accounting rules set. With this option set, the agent tries to read
the interface-byte counter from /proc/net/ip_acct. Two forms of rules
are accepted. interface name based rules:
.nf
ipfwadm -A in -a -P all -S 0.0.0.0/0 -D 0.0.0.0/0 -W eth0
ipfwadm -A out -a -P all -S 0.0.0.0/0 -D 0.0.0.0/0 -W eth0
.ni
and interface address based rules:
.nf
ipfwadm -A in -a -P all -S 0.0.0.0/0 -D 10.10.10.10/32
ipfwadm -A out -a -P all -S 10.10.10.10/32 -D 0.0.0.0/0
.ni
The second form must be used for aliased interfaces, because name
based rules seem not to work.
.br
If you add the base interface to the interface address based rules
(eg. -W eth0), only external traffic is counted.
.br
A sample init.d/snmp startup script is included in the source.
.br
Note: If an matching entry is found in the accounting table, it replaces
the output from /proc/net/dev for this device (if listed there).
.br 
If more than one rule matches for a interfaces, the last one is used.
.br
Note: IP-accounting works on ip-packet level, /proc/net/dev statistics
on device level, so these numbers may differ (and will when flushing
the accounting table).
.TP
.B "-f"
Fork away and run in background. This option launches a snmpd demon
running in the background and lets the command return immedeately.
You would normally use this at bootime, eg. in /etc/rc.local as
.nf
       /usr/sbin/snmpd -f  ;  echo 'snmpd'
.fi
.TP
.BI "-c <configfile>"
complete filename of the snmpd configuration file. The default is
.B "/etc/snmpd.conf" .
.TP
.BI "-a <agentinfo>"
complete filename of the snmpd's agentinfo file. It contains the numer
of agentboots. The default is
.B "/etc/snmpd.agentinfo" .
This file needs to be writeable by the agent.
.SH ENVORONMENT
MIBFILE - complete filename of mib.txt (this defaults to /usr/lib/mib.txt
and a /etc/mib.txt is also found).
.SH FILES
/etc/snmpd.conf - configuration file of the agent
.br
/etc/snmpd.agentinfo - storage file for agent reboot info
.br
/usr/lib/mib.txt - MIB database
.SH "SEE ALSO"
snmpd.conf(5), variables(5)
.SH BUGS
ifInOctets and ifOutOctets are calculated for pre linux ~v2.0.32 and 
~v2.1.42 kernels by packet count * 308 bytes (please see -A option above
too).
.br
In linux ~v2.1.68 the kernel support for statistics of aliased
interfaces was removed :-(
.br
Setting routing entries does not work (the cmu-code hits you hard).
.br
Since linux ~2.1.68 aliased interfaces in routing destinations show up
only as the base device (/proc/net/route bug); eg. eth0 instead of
eth0:1.
.br
If you run a redhat based installation, you may encounter problems due
to that fact.
.SH AUTHOR
Changes and add-on's for the Linux port, the host resources
enhancement and ident enhancement are added by Erik Schoenfelder
(schoenfr@gaertner.de), the Linux MIB, many ideas, suggestions and
help by Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de).  Many helpful
patches and code from poeple on the net is incorporated. Thank's
folks.