Skip to content

Commit 15e0fe8

Browse files
Adds systemd readme file
1 parent 3643518 commit 15e0fe8

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

README.systemd.md

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
nprobe is controlled using utility `systemctl` on operating systems
2+
and distributions that use the `systemd` service manager.
3+
4+
Upon successful package installation, the nprobe service is
5+
automatically started on the loopback interface. The service uses a
6+
configuration file that is located at `/etc/nprobe/nprobe.conf` and
7+
that is populated with some defaults during installation. The
8+
configuration file can be edited and extended with any configuration
9+
option supported by nprobe. A service restart is required after
10+
configuration file modifications.
11+
12+
The nprobe service is always started on boot by default. The service
13+
must be disabled to prevent this behavior.
14+
15+
## The nprobe service configuration file
16+
17+
The configuration file is located at `/etc/nprobe/nprobe.conf`.
18+
19+
## Controlling nprobe
20+
21+
To start, stop and restart the nprobe service type:
22+
23+
```
24+
# systemctl start nprobe
25+
# systemctl stop nprobe
26+
# systemctl restart nprobe
27+
```
28+
29+
To prevent nprobe from starting on boot type:
30+
31+
```
32+
# systemctl disable nprobe
33+
```
34+
35+
To start nprobe on boot, assuming it has previously been disabled,
36+
type:
37+
38+
```
39+
# systemctl enable nprobe
40+
```
41+
42+
To check the status of the service, including its output and PID, type:
43+
44+
```
45+
# systemctl status nprobe
46+
```
47+
48+
## Instantiated nprobe services
49+
50+
There are circumstances under which multiple instances of the nprobe
51+
service may run on the same host. To manage a particular `<instance>`
52+
of the service, append an `@<instance>` to the `nprobe` service name.
53+
54+
Typically, `<instance>` corresponds to an interface name (e.g., `eno1`)
55+
or to `none` when nprobe is used in collector mode. This convention
56+
allows an easy identification of the purpose of each
57+
service. Nonetheless, any string is acceptable as value for `<instance>`.
58+
59+
The `<instance>` uniquely identifies a service and its corresponding
60+
configuration file that is located under
61+
`/etc/nprobe/nprobe-<instance>.conf`.
62+
63+
For example, to start two nprobe services, one on interface `eno1` and
64+
another to collect netflow, one can add two configuration files:
65+
66+
```
67+
/etc/nprobe/nprobe-eno1.conf
68+
/etc/nprobe/nprobe-none.conf
69+
```
70+
71+
And then start the services with:
72+
73+
```
74+
# systemctl start nprobe@eno1
75+
# systemctl start nprobe@none
76+
```
77+
78+
Optionally, one may want to start the services on boot with:
79+
80+
```
81+
# systemctl enable nprobe@eno1
82+
# systemctl enable nprobe@none
83+
```
84+
85+
The status of the services above can be controlled with:
86+
87+
```
88+
# systemctl status nprobe@eno1
89+
# systemctl status nprobe@none
90+
```

0 commit comments

Comments
 (0)