systemdutil

package
v0.54.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapActiveStateForPosture

func MapActiveStateForPosture(active string) string

MapActiveStateForPosture maps a service's reported state to running|stopped|unknown.

It has to understand two vocabularies, because two collectors write to the same field. systemd says "active" and "inactive"; the sysvinit and Upstart collector says "running" outright. Understanding only systemd's words meant a sysvinit entry mapped to "unknown", so a service the machine had plainly reported as running was dropped as unreadable.

The services collector may join substate as "active/running".

func SystemctlIsActiveState

func SystemctlIsActiveState(ctx context.Context, unit string) string

SystemctlIsActiveState runs systemctl is-active (bounded). Returns running, stopped, or unknown.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL