Home Explore Blog CI



man-pages

3rd chunk of `systemctl.man`
624a5a1546195120091c2c402aee7e175a971ab7055eb56b0000000100000faf
 left  Sun 2017-02-26 11:56:36 EST  6h ago     snapd.refresh.timer          snapd.refresh.service

           NEXT shows the next time the timer will run.

           LEFT shows how long till the next time the timer runs.

           LAST shows the last time the timer ran.

           PASSED shows how long has passed since the timer last ran.

           UNIT shows the name of the timer

           ACTIVATES shows the name the service the timer activates when it runs.

           Also see --all and --state=.

       is-active PATTERN...
           Check whether any of the specified units are active (i.e. running). Returns an exit code 0 if at least one is active, or non-zero otherwise. Unless --quiet is specified, this will also print the current unit state
           to standard output.

       is-failed PATTERN...
           Check whether any of the specified units are in a "failed" state. Returns an exit code 0 if at least one has failed, non-zero otherwise. Unless --quiet is specified, this will also print the current unit state to
           standard output.

       status [PATTERN...|PID...]]
           Show runtime status information about the whole system or about one or more units followed by most recent log data from the journal. If no positional arguments are specified, and no unit filter is given with
           --type=, --state=, or --failed, shows the status of the whole system. If combined with --all, follows that with the status of all units. If positional arguments are specified, each positional argument is treated
           as either a unit name to show, or a glob pattern to show units whose names match that pattern, or a PID to show the unit containing that PID. When --type=, --state=, or --failed are used, units are additionally
           filtered by the TYPE and ACTIVE state.

           This function is intended to generate human-readable output. If you are looking for computer-parsable output, use show instead. By default, this function only shows 10 lines of output and ellipsizes lines to fit
           in the terminal window. This can be changed with --lines and --full, see above. In addition, journalctl --unit=NAME or journalctl --user-unit=NAME use a similar filter for messages and might be more convenient.

           Note that this operation only displays runtime status, i.e. information about the current invocation of the unit (if it is running) or the most recent invocation (if it is not running anymore, and has not been
           released from memory). Information about earlier invocations, invocations from previous system boots, or prior invocations that have already been released from memory may be retrieved via journalctl --unit=.

           systemd implicitly loads units as necessary, so just running the status will attempt to load a file. The command is thus not useful for determining if something was already loaded or not. The units may possibly
           also be quickly unloaded after the operation is completed if there's no reason to keep it in memory thereafter.

           Example 1. Example output from systemctl status

               $ systemctl status bluetooth
               ● bluetooth.service - Bluetooth service
                  Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; preset: enabled)
                  Active: active (running) since Wed 2017-01-04 13:54:04 EST; 1 weeks 0 days ago
                    Docs: man:bluetoothd(8)
                Main PID: 930 (bluetoothd)
                  Status: "Running"
                   Tasks: 1
                  Memory: 648.0K
                     CPU: 435ms
                  CGroup: /system.slice/bluetooth.service
                          └─930 /usr/lib/bluetooth/bluetoothd

               Jan 12 10:46:45 example.com bluetoothd[8900]: Not enough free handles to register service
               Jan 12 10:46:45 example.com bluetoothd[8900]: Current Time Service could not be registered
               Jan 12 10:46:45 example.com

Title: systemctl Unit Status Commands: is-active, is-failed, and status
Summary
This section describes the `is-active` and `is-failed` commands, used to check the running status or failure state of systemd units, returning exit codes based on the result. It also details the `status` command, which provides runtime status information, including recent log data, for the whole system or specified units, allowing for human-readable output and filtering by type, state, or PID.