Skip to main content

Module varlink_system

Module varlink_system 

Source
Expand description

systemd version and overall system state via the io.systemd.Manager varlink API on PID 1’s socket. Available from systemd v258+.

Describe returns both values in a single call, so each collector asks for the one it needs rather than streaming the whole io.systemd.Metrics list (which also carries Version/SystemState, but costs ~40x the wall time because it enumerates every unit).

PID 1 serves varlink requests one at a time, so a call issued while the units collector is streaming io.systemd.Metrics.List waits for that whole stream to finish. Both collectors therefore share one Describe per cycle (see shared_describe) instead of occupying PID 1 twice.

Re-exports§

pub use crate::varlink::manager::MANAGER_SOCKET_PATH;

Functions§

get_system_state
get_version
shared_describe
Prepare the shared Describe for one collection cycle.
update_system_stats
Async wrapper that can update the system state when passed a locked struct.
update_version
Async wrapper that can update the systemd version when passed a locked struct.

Type Aliases§

SharedDescribe
One Manager.Describe call, awaited by every collector that needs it.