Module units

Module units 

Source
Expand description

§units module

All main systemd unit statistics. Counts of types of units, unit states and queued jobs. We also house service specific statistics and system unit states.

Re-exports§

pub use crate::unit_constants::is_unit_unhealthy;
pub use crate::unit_constants::SystemdUnitActiveState;
pub use crate::unit_constants::SystemdUnitLoadState;

Structs§

ListedUnit
ServiceStats
Per-service metrics from the org.freedesktop.systemd1.Service and Unit D-Bus interfaces. Ref: https://www.freedesktop.org/software/systemd/man/org.freedesktop.systemd1.html
SystemdUnitStats
Aggregated systemd unit statistics: counts by type, load state, active state, plus optional per-service and per-timer detailed metrics
UnitStates
Per-unit state tracking combining active state, load state, and computed health. Ref: https://www.freedesktop.org/software/systemd/man/org.freedesktop.systemd1.html

Enums§

MonitordUnitsError

Constants§

SERVICE_FIELD_NAMES
UNIT_FIELD_NAMES
UNIT_STATES_FIELD_NAMES

Functions§

parse_state
Parse state of a unit into our unit_states hash
parse_unit_state
Pull all units from dbus and count how system is setup and behaving
update_unit_stats
Async wrapper than can update uni stats when passed a locked struct