systemd_journal_no_entries问题解决

问题:

#journalctl

Journal file /var/log/journal/410/[email protected]~ uses an unsupported feature, ignoring file.

-- No entries --

# systemctl --version

systemd 229

+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN

原因:

新版本journal日志采用lz4算法替代xz,若要用journal查看日志需要重新编译systemd且使能lz4。

If the output contains `-LZ4`, journal entries will not be available.

若在Ubuntu下,可直接apt install systemd安装最新编译版本即可。

参考:

https://github.com/systemd/systemd/issues/3875

https://github.com/coreos/coreos-overlay/pull/2593

https://github.com/kinvolk/rkt/commit/9310333214c6e8a575a66f170e05c8509ddca6ae

转载于:https://www.cnblogs.com/embedded-linux/p/10919995.html

你可能感兴趣的:(systemd_journal_no_entries问题解决)