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.

Structs§

ListedUnit
Representation of the returned Tuple from list_units - Better typing etc.
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
SystemdUnitActiveStateIter
An iterator over the variants of SystemdUnitActiveState
SystemdUnitLoadStateIter
An iterator over the variants of SystemdUnitLoadState
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
SystemdUnitActiveState
Systemd unit active states representing the unit’s runtime lifecycle. Ref: https://www.freedesktop.org/software/systemd/man/org.freedesktop.systemd1.html
SystemdUnitLoadState
Systemd unit load states indicating whether the unit file was successfully read. Ref: https://www.freedesktop.org/software/systemd/man/org.freedesktop.systemd1.html

Constants§

SERVICE_FIELD_NAMES
UNIT_FIELD_NAMES
UNIT_STATES_FIELD_NAMES

Functions§

is_unit_unhealthy
Check if we’re a loaded unit and if so evaluate if we’re acitive or not If we’re not Only potentially mark unhealthy for LOADED units that are not active
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