SNMPD(8)
NAME
snmpd - cmu's snmp agent for Linux
SYNOPSIS
snmpd [-V] [-p <port>] [-v] [-d] [-A] [-f] [-c <config-
file>] [-a <agentboots>]
DESCRIPTION
Snmpd should be run as a daemon in background. It is serv-
ing to your pleasure and answering snmp V1 and V2usec
requests.
Upon startup /etc/snmpd.conf is read (if it exists).
Successful set-requests of system.sysName, system.sysLoca-
tion and system.sysContact are stored in snmpd.conf(5) ,
if this files exists.
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 con-
figured V2usec requests.
OPTIONS
-V Print version to stdout and exit.
-v Be verbose upon startup.
-d Dump snmp-packets to stdout. Useful for debugging
only.
-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. A useable rule
for eg. eth0 would be:
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
A sample init.d/snmp startup script is included in the source.
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).
Note: IP-accounting works on ip-packet level, /proc/net/dev statistics
on device level, so these number may differ (and will when flushing
the accounting table).
-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
/usr/sbin/snmpd -f ; echo 'snmpd'
-c <<configfile>>
complete filename of the snmpd configuration file.
The default is /etc/snmpd.conf .
-a <<agentinfo>>
complete filename of the snmpd's agentinfo file. It
contains the numer of agentboots. The default is
/etc/snmpd.agentinfo . This file needs to be
writeable by the agent.
ENVORONMENT
MIBFILE - complete filename of mib.txt (this defaults to
/usr/lib/mib.txt and a /etc/mib.txt is also found).
FILES
/etc/snmpd.conf - configuration file of the agent
/etc/snmpd.agentinfo - storage file for agent reboot info
/usr/lib/mib.txt - MIB database
SEE ALSO
snmpd.conf(5) variables(5)
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).
In linux ~v2.1.68 the kernel support for statistics of
aliased interfaces was removed :-(
Setting routing entries does not work (the cmu-code hits
you hard).
Since linux ~2.1.68 aliased interfaces in routing destina-
tions show up only as the base device (/proc/net/route
bug); eg. eth0 instead of eth0:1.
If you run a redhat based installation, you may encounter
problems due to that fact.
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.