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
Selected subset of metrics collected from systemd OrgFreedesktopSystemd1Service
SystemdUnitActiveStateIter
An iterator over the variants of SystemdUnitActiveState
SystemdUnitLoadStateIter
An iterator over the variants of SystemdUnitLoadState
SystemdUnitStats
Struct with all the unit count statistics
UnitStates
Collection of a Unit active and load state: https://www.freedesktop.org/software/systemd/man/org.freedesktop.systemd1.html

Enums§

SystemdUnitActiveState
Possible systemd unit active states enumerated
SystemdUnitLoadState
Possible systemd unit load states enumerated

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