我的许多日记日志文件始终以波浪号结尾命名,例如 -
/var/log/journal/dc104498c02e4392903c4b68c856a662 $ ls -ltrh
total 768M
-rw-r-----+ 1 root systemd-journal 8.0M Jun 11 11:59 [email protected]~
-rw-r-----+ 1 root systemd-journal 8.0M Jun 11 12:08 [email protected]~
-rw-r-----+ 1 root systemd-journal 8.0M Jun 11 12:10 [email protected]~
-rw-r-----+ 1 root systemd-journal 8.0M Jun 11 12:16 [email protected]~
-rw-r-----+ 1 root systemd-journal 16M Jun 12 11:19 [email protected]~
...
它们的大小也恰好是 8M 的倍数。
什么可能导致这种情况?
我怀疑这些文件可能不完整,但它们似乎总是正确结束 -
journalctl --file [email protected]~ | tail
Jun 11 12:16:30 z390 audit: BPF prog-id=0 op=UNLOAD
Jun 11 12:16:30 z390 kernel: audit: type=1334 audit(1654974990.059:192): prog-id=0 op=UNLOAD
Jun 11 12:16:30 z390 audit: BPF prog-id=0 op=UNLOAD
Jun 11 12:16:30 z390 systemd[1]: Using hardware watchdog 'iTCO_wdt', version 0, device /dev/watchdog0
Jun 11 12:16:30 z390 systemd[1]: Watchdog running with a timeout of 10min.
Jun 11 12:16:30 z390 kernel: watchdog: watchdog0: watchdog did not stop!
Jun 11 12:16:30 z390 systemd-shutdown[1]: Using hardware watchdog 'iTCO_wdt', version 0, device /dev/watchdog0
Jun 11 12:16:30 z390 systemd-shutdown[1]: Watchdog running with a timeout of 10min.
Jun 11 12:16:30 z390 systemd-shutdown[1]: Syncing filesystems and block devices.
Jun 11 12:16:30 z390 systemd-journald[569]: Journal stopped
答案1
我有一些带有 ~ 的用户文件。
-rw-r-----+ 1 根 systemd-journal 25165824 Jan 29 13:01[电子邮件受保护]〜
-rw-r-----+ 1 根 systemd-journal 8388608 Jan 29 13:07[电子邮件受保护]〜
-rw-r-----+ 1 根 systemd-journal 8388608 Jan 29 13:20[电子邮件受保护]〜
-rw-r-----+ 1 根 systemd-journal 67108864 2 月 19 日 20:27[电子邮件受保护]〜
我在想,当计算机死机并通过按住电源按钮超过 5 秒进行硬电源重新启动时,可能会导致这些问题。