mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
Replace the systemd unit files that needed to be modified for a specific interface with template files. The template files allows one to instansiate a service for any interface (by running systemctl start pping@<interface>.service), and multiple interfaces can be monitored at once. Each instance maintains a separtate "log" of data at /sys/var/log/pping/<interface>/pping.<interface>.json which is rotated one per minute (see the [email protected] file) and placed in daily subfolders. Signed-off-by: Simon Sundberg <[email protected]>
32 lines
1.0 KiB
Desktop File
32 lines
1.0 KiB
Desktop File
[Unit]
|
|
Description=ePPing - Passive monitoring of network RTTs on %i
|
|
After=network.service
|
|
Wants=rotate-pping@%i.timer
|
|
|
|
# Uncomment below if running with LibreQoS
|
|
# After=lqosd.service
|
|
|
|
[Service]
|
|
# Ensure folder for saving output to exists
|
|
ExecStartPre=/usr/bin/mkdir -p /var/log/pping/%i
|
|
|
|
# Rotate any old output first to ensure ePPing can start writing to its intended file
|
|
ExecStartPre=/opt/bpf-examples/pping/scripts/rotate-pping-output.sh /var/log/pping/%i/pping.%i.json
|
|
|
|
WorkingDirectory=/opt/bpf-examples/pping
|
|
ExecStart=/opt/bpf-examples/pping/pping -i %i -l -r 10 -a 10 -F json -w /var/log/pping/%i/pping.%i.json
|
|
|
|
# On systemctl reload, send a SIGHUP to ePPing which causes it to reopen its output file
|
|
ExecReload=kill -HUP $MAINPID
|
|
|
|
Restart=on-failure
|
|
RestartSec=60
|
|
|
|
# Set to whatever maximum memory footprint you can tolerate
|
|
# Note, hard-kills the ePPing process without allowing it to clean up. Consider
|
|
# running /scripts/cleanup-tc-progs after.
|
|
MemoryMax=4G
|
|
|
|
[Install]
|
|
WantedBy=default.target
|