Logging
Finding Errors in the systemd Journal
We’ll dive deep into the systemd journal in a later chapter, but for now here are a few common invocations.
Search for errors in the entire system log
When you’re trying to get a general idea of what’s wrong on a system, look for errors accross all services:
journalctl -xe
This command will search the system log for error messages, and let you page through them (spacebar, arrow keys, Page Up / Page Down). Like other systemd commands, you can ‘quit’ the output pager with q
.
If you want to do the same thing, except:
- starting at the bottom of the log which contains the most recent entries, and
- live-updating the log for new entries,
you can use the -f
flag to follow the log:
journalctl -xef
Search for errors in specific services or programs (“Units”)
To narrow your search to a specific unit (foobar
) that’s misbehaving:
journalctl -xeu foobar
As with other journalctl
commands,...