All systemd states [closed]

systemd's state is composed of 3 subcomponents (LOAD, ACTIVE, SUB); what are the different values that these subcomponents can take? I know LOAD can be "loaded", ACTIVE can be "failed", and SUB can be "failed", but what are the others?


Solution 1:

what are the others?

The first source, systemd, init — systemd system and service manager lists:

  • active
  • inactive
  • activating
  • deactivating
  • failed

The second source, About System-State Targets lists (in addition):

  • not-found
  • dead

systemd, init — systemd system and service manager

Concepts

systemd provides a dependency system between various entities called "units" of 12 different types. Units encapsulate various objects that are relevant for system boot-up and maintenance. The majority of units are configured in unit configuration files, whose syntax and basic set of options is described in systemd.unit(5), however some are created automatically from other configuration, dynamically from system state or programmatically at runtime.

Units may be "active" (meaning started, bound, plugged in, ..., depending on the unit type, see below), or "inactive" (meaning stopped, unbound, unplugged, ...), as well as in the process of being activated or deactivated, i.e. between the two states (these states are called "activating", "deactivating"). A special "failed" state is available as well, which is very similar to "inactive" and is entered when the service failed in some way (process returned error code on exit, or crashed, or an operation timed out). If this state is entered, the cause will be logged, for later reference.

Note that the various unit types may have a number of additional substates, which are mapped to the five generalized unit states described here.

Source systemd, init — systemd system and service manager


About System-State Targets

Contains example output including the following values:

  • LOAD "loaded" or "not-found"

  • ACTIVE "active" or "inactive"

  • SUB "active" or "dead"

Source About System-State Targets