size=BYTES Reduce disk usage below specified size --vacuum-files=INT Leave only the specified number of journal files --vacuum-time=TIME Remove journal files older than specified time --verify Verify journal file consistency --sync Synchronize unwritten journal messages to disk --flush Flush all ...
: 576, xstate_sizes[2]: 2565月 13 23:26:32 T520 kernel: x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.但这是没有必要的,我们可以使用 --since 和 --until 来指定显示某个时间段内的日志。比如下面命令显示从 2018年8月1日开始的所有日志 journa...
--vacuum-size=, --vacuum-time= 删除存档的日志文件,直到它们使用的磁盘空间低于指定的大小(用通常的“K”、“M”、“G”、“T”后缀指定)或所有 日志文件不包含早于指定时间跨度的数据(用通常的“s”指定,“分钟”、“小时”、“天”、“月”、“周”、“年”后 缀)。注意运行--vacuum-size= 对 --...
设置日志占用磁盘空间 [root@k8s-node1 ~]# journalctl --vacuum-size=500M Vacuuming done, freed 0B of archived journals on disk. 1. 2. 设置日志最长保留时间 month/years [root@k8s-node1 ~]# journalctl --vacuum-time=1month Vacuuming done, freed 0B of archived journals on disk. 1. 2. ...
[root@k8s-node1 ~]# journalctl --vacuum-size=500MVacuuming done, freed 0B of archived journals on disk. 设置日志最长保留时间 month/years [root@k8s-node1 ~]# journalctl --vacuum-time=1monthVacuuming done, freed 0B of archived journals on disk. ...
Journal服务的配置文件是/etc/systemd/journald.conf,在默认配置中,Journal日志保存在目录/run/log/journal内(tmpfs内存文件系统),系统重启将不会保留,可以手动将日志刷到(通过命令journalctl --flush)磁盘文件系统上(/var/log/journal内)。 Journal服务随系统启动而启动,默认会记录从开机到关机全过程的内核和应用程序...
sudo journalctl --vacuum-size=1G 另一种方式则是使用–vacuum-time选项。任何早于这一时间点的条目都将被删除。 例如,去年之后的条目才能保留: sudo journalctl --vacuum-time=1years 限定Journal扩展 大家可以配置自己的服务器以限定journal所能占用的最高容量。要实现这一点,我们需要编辑/etc/systemd/journald....
Commands:-h--helpShow thishelptext--version Show package version-N--fields Listallfield names currently used-F--field=FIELD Listallvalues that a specified field takes--disk-usage Show total disk usage ofalljournal files--vacuum-size=BYTES Reduce disk usage below specified size--vacuum-files=INT...
-h --help Show this help text --version Show package version -F --field=FIELD List all values that a specified field takes --new-id128 Generate a new 128-bit ID --disk-usage Show total disk usage of all journal files --vacuum-size=BYTES Reduce disk usage below specified size --vacu...
-n1000 to guarantee that the pager will not buffer logs of unbounded size. This may be overridden with an explicit -n with some other numeric value while -nall will disable this cap. Note that this option is only supported for the less(1) pager. ...