How to find failed systemd units?

Sometimes the services units on your Linux systems fails but you see that very fast during the boot.

So you have no time to check what is the unit with issues and need to start digging in the logs of your system.

Usually the boot stuff require a specific daemon like bootlogd to track what is happening, but you need to install it and reboot. Quite uncomfortable but systemd can help us a lot.

With this command is possible to list all the various units that failed:

systemctl status your-service

So you can investigate later with:

systemctl list-units --state=failed

That’s it, quite simple and fast with no reboot required 😀

Leave a Reply

Your email address will not be published. Required fields are marked *

How to find failed systemd units?

time to read: <1 min
0