2

I have a Raspberry Pi running a custom Yocto image and it's using systemd-journald for logging.

I'm wondering why there is a difference between:

root@raspberrypi4:~# journalctl -o verbose | grep -e '_MACHINE_ID\|_BOOT_ID' | sort -u
    _BOOT_ID=0c79b6b4fa044c999a1784e17a263edf
    _BOOT_ID=16ab74cb7f454a879de7775ea519a0a1
    _BOOT_ID=1a58eca1b2554b04b0e5177cea29f34a
    _BOOT_ID=6852eabfb84f48afac8ee998c37cb215
    _BOOT_ID=848ed99048ea46368ee6c68169fd9a8e
    _BOOT_ID=a88a79e9295e488e8b498ce1c0ef9adf
    _BOOT_ID=b0326c74a9954ac18214f6eef3c26248
    _BOOT_ID=b4e3da87873f46c59205a24f8e4ef515
    _BOOT_ID=c85ef8042a234969972bf88ebee06613
    _BOOT_ID=ebd0cebba15e41ec93a02973fac19dd1
    _BOOT_ID=f0fb1e181f9b4dc29b1dcf2e01d2aaf5
    _MACHINE_ID=d92197f49033417bb79b55d5b91e93e5
root@raspberrypi4:~# journalctl --list-boots
    -1 1a58eca1b2554b04b0e5177cea29f34a Mon 2020-08-17 20:56:36 UTC—Tue 2020-11-24 07:43:35 UTC
     0 16ab74cb7f454a879de7775ea519a0a1 Tue 2020-11-24 07:43:35 UTC—Tue 2020-11-24 10:12:29 UTC

I obviously have eleven different _BOOT_IDs in the journal but --list-boots only shows two. Why is that?

I'm running systemd 243 and Linux raspberrypi4 4.19.93

evading
  • 123
  • 6

1 Answers1

0

Plausibly causes of this are broken journal log files.

I fixed this issue on my PC (Debian) with the following steps:

  1. tried journalctl --verify it should point out that some journal files are damaged - this was my case
  2. run journalctl --disk-vacuum <arbitrary_size> to wipe out broken journal files from total size of log.

finally after that journalctl --list-boots shows proper number of previous and current boot. Hope it helps.

karol
  • 101
  • 1