journalctl
On Linux, I check system logs by journalctl
. But it is soooo slow. How to make it faster.
在Linux上 ,我通过journalctl
检查系统日志。 但这太慢了。 如何使其更快 。
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.
默认情况下,没有任何选项, journalctl
确实非常慢。 但是通常,我们只对某些日志感兴趣,并且可以使用选项来指定我们要检查的日志。 这将使journalctl
变慢。
Check the last 100 lines
检查最后100行
journalctl -n 100
It will show the most recent 100 journal events.
它将显示最近的100个日记事件。
Check since last boot
自上次启动以来检查
journalctl -b -0
Here, -0 is the last boot, -1 the boot before last, and so on.
在这里,-0是最后一次引导,-1是最后一次引导,依此类推。
For more usages of the command, check journalctl manual.
有关此命令的更多用法,请查看journalctl manual 。
翻译自: https://www.systutorials.com/how-to-make-journalctl-faster/
journalctl