How to obtain the current value of _BOOT_ID in systemd-journald?
I can do something ugly such like:
journalctl -o verbose --since '2016-05-17' | egrep '^[ ]+_BOOT_ID' | tail -n 1| cut -d"=" -f2
Is there a more clever way of do that?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
This version contains some dashes. The formatting of the boot ID output by
journalctl contains no dashes.
The random(4) man page mentions it:
The files in the directory /proc/sys/kernel/random (present since 2.3.16) provide additional information about the /dev/random device:
uuid and boot_id
These read-only files contain random strings like 6fd5a44b-35f4-4ad4-a9b9-6b9be13e1fe9. The former is generated afresh for each read, the latter was generated once.