Blame README.systemd

Packit fcad23
README.systemd
Packit fcad23
--------------
Packit fcad23
Net-SNMP provides two daemons, which support systemd system manager. 
Packit fcad23
See http://www.freedesktop.org/wiki/Software/systemd to learn how
Packit fcad23
systemd works. Both socket activation and notification is supported by these
Packit fcad23
daemons.
Packit fcad23
Packit fcad23
To enable systemd support, the sources must be compiled with
Packit fcad23
--with-systemd configure option.
Packit fcad23
Packit fcad23
snmpd - The SNMP agent
Packit fcad23
----------------------
Packit fcad23
Socket activation od snmpd daemon is implemented, but it's discouraged.
Packit fcad23
The reason is simple - snmpd not only listens and processes SNMP requests
Packit fcad23
from network, but also gathers system statistics counters, sends traps and
Packit fcad23
communicates with subagents. It even opens few netlink sockets.
Packit fcad23
Packit fcad23
In other words, snmpd should run from system start to properly work.
Packit fcad23
This can be done in two ways:
Packit fcad23
1) either as snmpd service unit with 'Type=notification' and without a socket
Packit fcad23
   unit
Packit fcad23
2) or as snmpd service unit with 'Type=simple', appropriate socket socket unit
Packit fcad23
   and the snmpd service enabled. This way systemd creates the snmpd listening
Packit fcad23
   socket early during boot and passes the sockets to snmpd slightly later
Packit fcad23
   (but still during machine boot). This way systemd can paralelize start of
Packit fcad23
   services, which depend on snmpd. Admins must adjust the socket file manually,
Packit fcad23
   depending if the snmpd support AgentX, IPv6, SMUX etc.
Packit fcad23
Packit fcad23
snmpd should be started with '-f' command line parameter to disable forking -
Packit fcad23
systemd does that for us automatically.
Packit fcad23
Packit fcad23
Packit fcad23
snmptrapd - The trap processing daemon
Packit fcad23
--------------------------------------
Packit fcad23
snmptrapd supports full socket activation and also notification (if needed).
Packit fcad23
Both 'Type=simple' (with appropriate socket unit) and 'Type=notify' services
Packit fcad23
will work. Again, '-f' parameter should be provided on snmptrapd command line.
Packit fcad23
Packit fcad23
If integration with SNMP agent using AgentX protocol is enabled, snmptrapd should
Packit fcad23
start during boot and not after first SNMP trap arrives. Same rules as for snmpd
Packit fcad23
applies then.