An EPICS IOC that monitors and controls systemd services, exposing their status as Process Variables (PVs). Supports both local and remote (via SSH) service management.
This can be particularly useful for managing acquisition/control services on vendor provided systems, such as the Dectris camserver service for Pilatus3 detectors, or the xspd remote control service from X-Spectrum.
- Poll
systemctl statusparse its output, and publish relevant information as PVs - Start, stop, and restart services via CA/PVA
- Monitor over SSH for services running on remote hosts
- Phoebus operator screen included
# Monitor a local service
remote-svc-ctrl "XF:28ID1-CT{SVC-MyApp:1}" my-app.service
# Monitor a service on a remote host via SSH
remote-svc-ctrl "XF:28ID1-CT{SVC-MyApp:1}" my-app.service --host user@serverA Phoebus .bob screen is provided in op/service_ctrl.bob. Open it with the macro PREFIX set to your IOC's PV prefix.
- PV Reference — full list of exposed PVs and their behavior
- Polkit Configuration — allow non-root service control without a password
- SSH Key Setup — configure passwordless SSH for remote host management
The project uses uv for dependency management and task running. To set up the development environment, run:
uv sync # Install dependencies
uv run pytest # Unit tests
uv run pre-commit run --all-files # Linting and formatting- Python >= 3.11
- pythonSoftIOC >= 4.7.0
systemctlavailable on the target host- For non-root service control: appropriate polkit rules configured on the target host
- SSH key-based auth configured for remote hosts
