journalctl_如何使journalctl更快?

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

Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。

翻译自: https://www.systutorials.com/how-to-make-journalctl-faster/

journalctl

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值