Skip to main content

Module systemd

Module systemd 

Source

Structs§

ManagerProxy
Proxy object for org.freedesktop.systemd1.Manager. Partially taken from https://github.com/lucab/zbus_systemd/blob/main/src/systemd1/generated.rs
UnitFile
Represents a unit file from ListUnitFiles (includes disabled units not returned by ListUnits)
UnitId
Just enough info to fully identify a unit
UnitProxy
Proxy object for org.freedesktop.systemd1.Unit. Taken from https://github.com/lucab/zbus_systemd/blob/main/src/systemd1/generated.rs
UnitWithStatus

Enums§

LogDiagnostic
Diagnostic result explaining why logs might be missing
Scope
UnitScope

Functions§

check_unit_has_run
Check if a unit has ever been activated using systemctl show
diagnose_missing_logs
Diagnose why logs are missing for a unit
disable_service
enable_service
get_active_state
Returns the load state of a systemd unit
get_all_services
get_main_pid
Returns the PID of a systemd service
get_unit_file_location
get_unit_file_state
Returns the unit file state of a systemd unit. If the state is enabled, the unit loads on every boot
get_unit_files
Get unit files for all services, INCLUDING DISABLED ONES (ListUnits doesn’t include those) This is slower than get_all_services. Takes about 100ms (user) and 300ms (global) on 13th gen Intel i7
get_unit_path
Unit file path for a service
kill_service
parse_journalctl_error
Parse journalctl stderr to determine the specific error type
reload
restart_service
sleep_test
start_service
stop_service