[systemd-devel] Antw: [EXT] Journal message timestamps

Tomasz Torcz tomek at pipebreaker.pl
Fri Aug 28 08:11:27 UTC 2020


On Fri, Aug 28, 2020 at 10:48:18AM +0300, Mantas Mikulėnas wrote:
> On Fri, Aug 28, 2020, 10:06 Ulrich Windl <Ulrich.Windl at rz.uni-regensburg.de>
> wrote:
> 
> > >>> Mark Corbin <mark at dibsco.co.uk> schrieb am 27.08.2020 um 12:33 in
> > Nachricht
> > <c2edc2b5-0c6a-2d34-42ff-569c2626294a at dibsco.co.uk>:
> > > 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.
> > >
> >
> > One idea would be to have a "timestamp file" (much like a low-resolution
> > software RTC) that is updated periodically when it's known that the system
> > time
> > is correct. Then after boot you would get a good guess, and time wouldn't
> > jump
> > backwards, too.
> >
> 
> I believe systemd already does that, although I keep forgetting the details
> – not sure if it's part of core or if it's part of systemd-timesyncd.

  timesyncd:

  Files
  /var/lib/systemd/timesync/clock
  The modification time of this file indicates the timestamp of the last
  successful synchronization (or at least the systemd build date, in
  case synchronization was not possible).

On boot, time is stepped to the timestamp of above file.


-- 
Tomasz Torcz                        To co nierealne – tutaj jest normalne.
tomek at pipebreaker.pl              Ziomale na życie mają tu patenty specjalne.



More information about the systemd-devel mailing list