journalctl --verify
返回以下内容,但我不知道如何修复它。我认为这些错误可能会导致我的 Linux 经常崩溃。如果有人能用通俗易懂的语言解释我如何修复这些错误,请告诉我,我不是最有经验的 Linux 用户,抱歉!
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@7958ba53b52f476bbb0181d7aa31b4a8-0000000000005f11-0005b6b16963ddc9.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@3a879b45ee0d40f28e9de821dfc83a01-000000000002d0d2-0005b91a831ce03e.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@c9eb907d55864799b9c237f317840e83-0000000000025d8f-0005bb17ae301322.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@7958ba53b52f476bbb0181d7aa31b4a8-0000000000006efb-0005b6b2d5cf8451.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@2be0bd7baaa9496c8c44a16e4a842995-00000000000d08f8-0005b9b751153286.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
3f82ef8: Invalid entry item (13/19 offset: 000000
3f82ef8: Invalid object contents: Bad message
File corruption detected at /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~:3f82ef8 (of 67108864 bytes, 99%).
FAIL: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~ (Bad message)
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@3a879b45ee0d40f28e9de821dfc83a01-00000000000c2835-0005b9aecd7a2b63.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@35b89873de2d46dca7aea6968c063f41-00000000000008ab-0005baae9d60aea4.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@ebc22b8fecf3454083fac4456729ecf3-00000000000a2f0f-0005b96c14b92654.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@04bb837d6e7745d29b1272519fe8b0fe-000000000000086d-0005b8dfc382dc9d.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@074b853470b340ed951b78b9deb8dc71-000000000002a9f5-0005bb17e526fdcd.journal
7659ff0: Unused data (entry_offset==0)
7659ff0: Invalid hash (00000000 vs. 581648e3c96b4e3a
7659ff0: Invalid object contents: Bad message
File corruption detected at /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~:7659ff0 (of 125829120 bytes, 98%).
FAIL: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~ (Bad message)
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@3a879b45ee0d40f28e9de821dfc83a01-0000000000000001-0005b8f3d2d4cd15.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@3a879b45ee0d40f28e9de821dfc83a01-00000000000c14ec-0005b9a40d37cff7.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@7958ba53b52f476bbb0181d7aa31b4a8-0000000000011724-0005b7ad4c94c785.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@c9eb907d55864799b9c237f317840e83-0000000000000001-0005bb159f481fe8.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@286cc890bd5149b1b15340f84aadaec0-000000000000089b-0005b8b7c85ccb47.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@2be0bd7baaa9496c8c44a16e4a842995-00000000000c2836-0005b9aecd7ab217.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@1dbba780c9744ca58543eee0a9a3456e-0000000000000959-0005b83d48dd78ff.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@2ede8f2bd7aa4cfd8dd778b0deb4e8d3-0000000000000001-0005ba33956f862f.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@42e260fe32174af6af1f378dcabb2097-0000000000078fe0-0005b8973aca3e00.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@7958ba53b52f476bbb0181d7aa31b4a8-000000000003898d-0005b81507b484a6.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@3a879b45ee0d40f28e9de821dfc83a01-00000000000b30e2-0005b97aded6a11d.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@3a879b45ee0d40f28e9de821dfc83a01-00000000000a2061-0005b969ca753312.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@b4e3775e8f554a6c8527c3bb2739bd1b-000000000000dfdb-0005b720f9f2d290.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@6e73a3a505274fc39b372343f22a0d1a-000000000000bbd8-0005bafa834570d6.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@5f8a71e177af44a4a05a4d4203750a5d-00000000000b310b-0005b97b106ef507.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@b4e3775e8f554a6c8527c3bb2739bd1b-0000000000005f13-0005b6b16a1add0c.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@7958ba53b52f476bbb0181d7aa31b4a8-00000000000103e6-0005b79a70fda85d.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@d5ece2d6e0d94390be6d80935b87fa4e-000000000000091c-0005bae6dc965040.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@b4e3775e8f554a6c8527c3bb2739bd1b-000000000000a1da-0005b6d01f73be5c.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@42e260fe32174af6af1f378dcabb2097-0000000000000001-0005b83d457efb98.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@9c9c5c41e9134898961b8fe4ea85bc58-0000000000000001-0005b8dfc00d70a0.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@27e24dfcedc547b2856b50ef59c53f24-000000000002d9eb-0005b91a8a9124ef.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@b4e3775e8f554a6c8527c3bb2739bd1b-00000000000008bc-0005b69ec4fffabf.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@631c5f278b2a4d4b8a2a11a41bc301c8-000000000007c086-0005b95f94efab9e.journal
7ffff58: Unused data (entry_offset==0)
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@3a879b45ee0d40f28e9de821dfc83a01-000000000004d014-0005b9408290e7e4.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@2be0bd7baaa9496c8c44a16e4a842995-00000000000c1504-0005b9a418d98034.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@7b9b29e73cfd4999b38b777b598549d7-0000000000000001-0005bae6da4939a0.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@7958ba53b52f476bbb0181d7aa31b4a8-000000000000b1d7-0005b6e56680883b.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@8e0b6f7a6dd34d6ea7dcd63742b004a5-0000000000000001-0005bb158d8d59f7.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@add63a63335d45e182ff51be690ab615-0000000000000869-0005ba3396e184f3.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@7958ba53b52f476bbb0181d7aa31b4a8-0000000000008057-0005b6b8c6745395.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@42e260fe32174af6af1f378dcabb2097-000000000002c4f1-0005b8786c16d598.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@b4e3775e8f554a6c8527c3bb2739bd1b-000000000001173a-0005b7ad4ca64b69.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@b4e3775e8f554a6c8527c3bb2739bd1b-00000000000103e9-0005b79a79c4e3ee.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@4ab51d32cc444292b77b69b1bfc0c7b3-0000000000000001-0005b8d2c57de350.journal
3589018: Invalid object
File corruption detected at /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~:3589018 (of 58720256 bytes, 95%).
FAIL: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~ (Bad message)
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@074b853470b340ed951b78b9deb8dc71-00000000000008b6-0005bb15a460e8b2.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@1dbba780c9744ca58543eee0a9a3456e-00000000000798b2-0005b8974140716c.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@1dbba780c9744ca58543eee0a9a3456e-0000000000052f26-0005b88d37d3001b.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@3a879b45ee0d40f28e9de821dfc83a01-00000000000d08f7-0005b9b75105a38a.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@b4e3775e8f554a6c8527c3bb2739bd1b-0000000000038c18-0005b815096ac834.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@b4e3775e8f554a6c8527c3bb2739bd1b-0000000000006efc-0005b6b2d5e0b6e0.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@42e260fe32174af6af1f378dcabb2097-0000000000052d8a-0005b88d3668df3a.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@42e260fe32174af6af1f378dcabb2097-00000000000113f7-0005b84ee41bb762.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@7958ba53b52f476bbb0181d7aa31b4a8-000000000000dfd8-0005b720f9d03d2d.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@8b5a94f2c20b4adf87b9f8d59c113e67-0000000000000001-0005baae9afe82b1.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@b4e3775e8f554a6c8527c3bb2739bd1b-000000000000b1de-0005b6e566ca13af.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@b4e3775e8f554a6c8527c3bb2739bd1b-0000000000012817-0005b812859fbcc1.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@3a879b45ee0d40f28e9de821dfc83a01-000000000007bb0f-0005b95f906b038f.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@1dbba780c9744ca58543eee0a9a3456e-000000000002c4f9-0005b8786c3d5cd4.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@7958ba53b52f476bbb0181d7aa31b4a8-000000000000a1c3-0005b6d01f68b242.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@1dbba780c9744ca58543eee0a9a3456e-0000000000011404-0005b84ee43c0609.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@631c5f278b2a4d4b8a2a11a41bc301c8-000000000004d02b-0005b94083690e54.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@27e24dfcedc547b2856b50ef59c53f24-000000000000085e-0005b8f3d4ba1f62.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/system@8c6e06d92c5447f29783538231792c64-0000000000000001-0005baef88dcce97.journal
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/[email protected]~
PASS: /var/log/journal/64f10889235b4d03ad83a8db73043969/user-1000@b4e3775e8f554a6c8527c3bb2739bd1b-000000000000807b-0005b6b8c6852d86.journal
答案1
2014 年,一位 Red Hat 工程师建议日志文件损坏通常可以被忽略,因为“journalctl 在读取[文件]时会自动挽救一切可以挽救的东西”。
但是,如果它导致其他服务出现问题,则应该解决它。例如,在我的情况下,rsyslog
停止了更新/var/log/messages
和其他三个日志。通过重新创建损坏的文件解决了这个问题/var/log/journal
(见下文)。
就你的情况而言,这是一个先有鸡还是先有蛋的问题。可能是 Ubuntu 崩溃导致了日志文件损坏。不过,修复日志文件的唯一危害可能是在访问旧日志条目时需要付出一些额外的努力。
首先您应该备份您的/var/log/journal
目录。
那么你可以尝试这个:
sudo journalctl --rotate
sudo journalctl --vacuum-time=1s
如果这不起作用那么您可以简单地删除文件,然后:
sudo systemctl restart systemd-journald
并且应该自动创建一个新的日志文件。
要访问较旧的日记帐分录:
journalctl [OPTIONS] --directory /your/backup/path/journal