[systemd-devel] [PATCH v3] journalctl: Improve boot ID lookup
lennart at poettering.net
Mon May 18 15:37:59 PDT 2015
On Fri, 01.05.15 15:15, Jan Janssen (medhefgo at web.de) wrote:
> This method should greatly improve offset based lookup, by simply jumping
> from one boot to the next boot. It starts at the journal head to get the
> a boot ID, makes a _BOOT_ID match and then comes from the opposite
> journal direction (tail) to get to the end that boot. After flushing the matches
> and advancing the journal from that exact position, we arrive at the start
> of next boot. Rinse and repeat.
> This is faster than the old method of aggregating the full boot listing just
> so we can jump to a specific boot, which can be a real pain on big journals
> just for a mere "-b -1" case.
> As an additional benefit --list-boots should improve slightly too, because
> it does less seeking.
> Note that there can be a change in boot order with this lookup method
> because it will use the order of boots in the journal, not the realtime stamp
> stored in them. That's arguably better, though.
> Another deficiency is that it will get confused with boots interleaving in the
> journal, therefore, it will refuse operation in --merge, --file and
> --directory mode.
I have now applied this. Afterwards I added a couple of (mostly
unrelated) clean-ups to journalctl.
Would be nice if you could verify that things still work as intended!
Lennart Poettering, Red Hat
More information about the systemd-devel