How to find failed systemd units?

Questo articolo è stato scritto oltre 1 years, il contenuto potrebbe essere datato.

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 😀

Liked it? Take a second to support Mte90 on Patreon!
Become a patron at Patreon!

Leave a Reply

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