linux-systemd-services

Retrieves a list of systemd service units on the Linux system. Runs systemctl -at service to return the load status, active status, and sub-status of all services as structured fields.

Command properties

ItemDescription
Command typeDriver query
Required permissionAdministrator
License usageLicensed command
Parallel executionNot supported
Distributed executionRuns on Data Node (mapper)

Syntax

linux-systemd-services

Output fields

FieldTypeDescription
servicestringService unit name
load_statusstringService load status. Takes values such as loaded, not-found, masked, etc.
active_statusstringService active status. Takes values such as active, inactive, failed, etc.
sub_statusstringService sub-status. Represents the detailed state of the active status, such as running, exited, dead, waiting, failed, etc.

Error codes

Parse errors
Error codeMessageDescription
95040no-read-permissionOccurs when a user without administrator privilege runs the command
Runtime errors

N/A

Description

The linux-systemd-services command runs systemctl -at service to collect the status of all systemd service units registered on the system. The -at service option displays all units of the service type regardless of whether they are loaded.

The command skips the first line (header) of the output and splits each line by whitespace until an empty line appears, extracting the service unit name, load status, active status, and sub-status.

Examples

  1. Retrieve all systemd services

    linux-systemd-services
    

    Retrieves the status of all systemd service units registered on the system.

  2. Retrieve only running services

    linux-systemd-services
    | search sub_status == "running"
    

    Filters and retrieves only currently running systemd services.

  3. Retrieve failed services

    linux-systemd-services
    | search active_status == "failed"
    

    Filters and retrieves services whose active status is failed.