Check/view status of runit services.
svs checks the statuses of runit services, directly reading binary
data from supervise/status of each service (so it's not a wrapper
around sv). The output format is inspired by vsv. Unlike vsv,
the output is more compact and more informative about statuses (not
just run/down). Also, it has a quiet mode (e.g., suitable for
periodic checks with cron).
Without options, svs will pretty-print the status of all services from
$SVDIR or, if not set, /var/service. Indicate custom directory with
-d <dir>.
The status indicators are:
✔- running normally (sv:run, nopaused, nowant down)✘- fails (sv:down, butwant up)■- stopped (sv:down, nowant up)▽- finalizing (sv:finishscript running)⏸- paused (sv:runorfinish, butpaused)▼- stopping (sv:runorfinish, butwant down)?- cannot be checked (dangling symlink or no read permission)
The same indicators are used for corresponding logging services (if
present, otherwise -).
The A column indicates if the service autostarts on boot (+,
"enabled") or not (-, "disabled"), i.e. if down file is absent or
present in the service directory. For log services, no indicator is
shown if log is "enabled", and - is shown near the main indicator if
log is "disabled".
Similar to vsv, the time elapsed since the last state change is
highlighted differently for <1m, <5m, <1h ago.
With -q option, svs will perform quietly in script-friendly mode
and exit with the status code, in this order:
1- if no entries in service directory2- if at least one service fails3- if at least one service cannot be checked0- otherwise (each service is running, paused, stopping, finalizing or stopped)
Use xbps template: https://github.com/Galicarnax/void-packages/blob/custompack/srcpkgs/svs/template
Or, if you are happy with your package manager being unaware of svs: make + sudo make install.
