[systemd-devel] Journal message timestamps

Lennart Poettering lennart at poettering.net
Fri Sep 4 16:00:36 UTC 2020


On Fr, 28.08.20 10:54, Pekka Paalanen (ppaalanen at gmail.com) wrote:

> On Thu, 27 Aug 2020 11:33:04 +0100
> Mark Corbin <mark at dibsco.co.uk> wrote:
>
> > Hello
> >
> > I am working on time synchronisation issues at boot for systems without
> > an RTC (using balenaOS on a Raspberry Pi 3) and have some questions
> > about how journald assigns timestamps to log messages.
> >
> > When I boot my system and look at the journal I see an initial date/time
> > for kernel messages, e.g. '1 June 2020 10:00:00' followed by messages
> > with the 'correct' date/time once the system time has been set from
> > another source, e.g. build time, NTP, etc. This means that over several
> > reboots I have lots of sets of log messages from 1 June 2020 which
> > understandably confuses the 'journalctl --list-boots' command. I found
> > an issue that describes the problem here
> > https://github.com/systemd/systemd/issues/662 and had assumed that there
> > wasn't anything I could do about this.
>
> ...
>
> > Any general details about how journald applies timestamps would also be
> > greatly appreciated.
>
> Hi,
>
> I'm not sure if this is relevant to you, but I have encountered a
> different issue that causes journald to lose track of boots and
> therefore the message ordering becomes useless: boot_id not
> changing on reboot. More info at
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=963977

Umpf, that's a bad kernel bug. It suggests the boot_id is picked
before the random pool is fully initialized.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list