This page explains the service features included with SiLK.
On systems that support it, systemd is an option for managing SiLK services as of SiLK 3.23. The implementation of the various SiLK services as a systemd service is intended to provide an easy transition for those migrating from the System V init (init.d) service implementations.
The following SiLK tools have associated systemd services:
The examples below describe configuring and running the rwflowpack service. The configuration of other SiLK services is similar.
Before running a SiLK service (rwflowpack) for the first time, you must customize its associated configuration file (rwflowpack.conf) with relevant parameters for your intended use. If you are upgrading from a previous version of SiLK, your configuration files will have persisted during the upgrade. When installing from an RPM, the configuration files are typically found in /etc (e.g., /etc/rwflowpack.conf).
Notes:
Once the configuration file is customized with your settings, starting any SiLK service is the same as starting any other systemd service:
# systemctl start rwflowpack.service
Checking the service status and stopping the service are also typical:
# systemctl status rwflowpack.service
and:
# systemctl stop rwflowpack.service
With systemd functionality comes the ability to start multiple instances of a SiLK service with a unique configuration per instance. Running SiLK daemons as instantiated services is available in SiLK-3.24.0 and later.
To start a service as an instantiated service, you must create a unique configuration file in the configuration file directory (typically /etc). The configuration file should be named rwflowpack.foo.conf where foo is the name you want to give your instantiated service.
After doing that, you may start the instantiated service by passing your service name. For example
# systemctl start rwflowpack@foo.service
starts an instantiated rwflowpack using the configuration file rwflowpack.foo.conf.
For systems that do not support systemd, the System V init scripts are still available. When installing via an RPM, the init.d files are only available under /usr/share/silk/etc and they are not installed under /etc/init.d.
Running a SiLK service using System V init is very similar to using systemd. The configuration file must be configured prior to first use with the parameters you want the service to use. The configuration file is expected to be installed in /etc, for example /etc/rwflowpack.conf.
A SiLK installation typically places the files under $prefix/share/silk/etc and requires the administrator to move the files into their correct locations:
Once you have customized the configuration file, you may start the SiLK service using the following command:
# service rwflowpack start
You can stop the service or check its status using:
# service rwflowpack stop
and
# service rwflowpack status
SiLK services also have one additional command, force-reload. This command is functionally identical to restart.
One can mimic the instantiated services of systemd by creating a configuration file /etc/rwflowpack-foo.conf and either copying or linking /etc/init.d/rwflowpack to /etc/init.d/rwflowpack-foo.
# ln /etc/init.d/rwflowpack /etc/init.d/rwflowpack-foo
Running
# service rwflowpack-foo start
uses the configuration settings in /etc/rwflowpack-foo.conf. This approach should only be used on systems which do not support systemd, and it is not forward-compatible with systemd.