[systemd-devel] Journal message timestamps

Pekka Paalanen ppaalanen at gmail.com
Fri Aug 28 07:54:59 UTC 2020


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

The messages still show up with the right wall-clock time (once
the clock is set), they are just ordered badly: it is as if the
wall-clock time would be jumping forward and backward days, weeks or
months randomly.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200828/baef8809/attachment.sig>


More information about the systemd-devel mailing list