33

I am running a Debian unstable with systemd, at boot I have a few services which are marked as FAILED (and not OK), but the log is too fast for me to grab the name of the failed service.

I wonder if there is a way to get this boot log once the system is up and running (I am NOT speaking about the kernel log which are reachable with dmesg but the services). And, the service --status-all does not really help because it only list the services that are on/off but not the one that have failed at boot.

So, any hint is welcome !

1
  • 4
    Try journalctl, then searching for the names of the failed services. There are also options to that command to filter on service name from the start.
    – Tom Hunt
    Commented Oct 21, 2015 at 21:28

1 Answer 1

39

Try:

 systemctl --state=failed

man systemctl says:

--state=

The argument should be a comma-separated list of unit LOAD, SUB, or ACTIVE states. When listing units, show only those in specified states. Use --state=failed to show only failed units.

Run (as root):

systemctl status <service-name>

status [PATTERN...|PID...]]

Show terse runtime status information about one or more units, followed by most recent log data from the journal.

Also:

journalctl -u <service-name> -b
1
  • 1
    Yeah, that's what start says itself, but all of this is most of the times empty, so what else?
    – IceFire
    Commented Sep 5, 2023 at 14:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .