On Linux, I check system logs by journalctl. But it is soooo slow. How to make it faster.

By default without any options, the journalctl is indeed very slow. But usually, we are only interested in some logs and can use options to specify the logs that we are interested to check. This will make journalctl less slower.

Check the last 100 lines

journalctl -n 100

It will show the most recent 100 journal events.

Check since last boot

journalctl -b -0

Here, -0 is the last boot, -1 the boot before last, and so on.

For more usages of the command, check journalctl manual.

Similar Posts

Leave a Reply

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