[systemd-devel] [PATCH v2] journalctl: Add support for showing messages from a previous boot

Lennart Poettering lennart at poettering.net
Tue Jun 4 11:14:00 PDT 2013


On Tue, 04.06.13 19:43, Jan Janssen (medhefgo at web.de) wrote:

> >Hmm, looking for startup messages plus an extra check for the boot ID of
> >the oldest entry in all journals should give you a full list.
>
> Any journal file could contain messages from more than one boot. And
> if you have a (user) journal file with two or more boot IDs from boots
> that are not in the list obtained by message ID, you'd miss some boot
> IDs. Or I just don't grok your approach.

Yeah, we'd miss journal entries which have boot ID that we have no
startup message for, and that is not the the boot id of the oldest entry
we know. But I am not really convinced that this would really be a
problem.

But if we consider this a problem, I am still not convinced that we
should do an O(n) algorithm whith n being the numer of all entries in
the db... There must be a better way.

The unique boot ids are actually strictly in-order in the individual
journal files. The order is only lost when we interleave multiple
journal files. I wonder if we can salvage this somehow, though. 

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list