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