You are not logged in.

#1 2018-05-22 11:46:02

K3N8
Member
From: The Netherlands
Registered: 2011-11-02
Posts: 62

[Solved] systemd-timesyncd

Hi,

I am trying to get the systemd ntpd variant working. I have enabled en started the systemd-timesyncd and systemd-timedated services. After the initial sync noting happens?! Shouldn't it be syncing once every so-and-so minutes?

Thanks.

Alexander

Last edited by K3N8 (2018-05-22 16:34:08)


Arch Linux x86_64 LTS

Offline

#2 2018-05-22 11:56:59

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] systemd-timesyncd

How are you determining that it isn't syncing?

The default config contains...

...
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048

so the max interval is about 34 minutes between syncs.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2018-05-22 12:10:59

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 653

Re: [Solved] systemd-timesyncd

OP, you may be seeing this bug https://bbs.archlinux.org/viewtopic.php?id=236598. That bug has been fixed in the systemd master branch but still exists in the current Arch systemd 238.76-1 package.

Offline

#4 2018-05-22 16:33:38

K3N8
Member
From: The Netherlands
Registered: 2011-11-02
Posts: 62

Re: [Solved] systemd-timesyncd

I have looked in the wrog place.

journalctl -r -u systemd-timesyncd

I should have looked at:

stat /var/lib/systemd/timesync/clock

Everything is ok.


Arch Linux x86_64 LTS

Offline

#5 2018-05-22 22:13:58

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 653

Re: [Solved] systemd-timesyncd

K3N8 wrote:

I have looked in the wrog place.

journalctl -r -u systemd-timesyncd

I should have looked at:

stat /var/lib/systemd/timesync/clock

That doesn't sound right. You are guaranteed to see a "Synchronized to time server xx.xx.xx.xx" message in the output of your journal seconds after boot if systemd-timesyncd is running correctly.

journalctl -b -u systemd-timesyncd | grep "Synchronized to time server"

Note that the /var/lib/systemd/timesync/clock file is first updated after boot at the same exact time as the above message is written. Also, that file can only be viewed/stat by root.

Offline

#6 2018-05-23 08:19:33

K3N8
Member
From: The Netherlands
Registered: 2011-11-02
Posts: 62

Re: [Solved] systemd-timesyncd

It only shows syncing on startup

journalctl -b -u systemd-timesyncd | grep "Synchronized to time server"

mei 18 19:53:25 boaz systemd-timesyncd[11149]: Synchronized to time server 5.39.184.5:123 (0.arch.pool.ntp.org).
mei 22 12:38:17 boaz systemd-timesyncd[18072]: Synchronized to time server 149.210.230.59:123 (0.arch.pool.ntp.org).
mei 22 13:33:15 boaz systemd-timesyncd[18560]: Synchronized to time server 213.109.127.82:123 (0.arch.pool.ntp.org).

cat /var/lib/systemd/timesync/clock

Bestand: /var/lib/systemd/timesync/clock
Grootte: 0            Blokken: 0            IO-blok: 4096   leeg normaal bestand
Apparaat: fd01h/64769d   Inode: 1446401      Koppelingen: 1
Toegang: (0644/-rw-r--r--)   UID: (62583/systemd-timesync)   GID: (62583/systemd-timesync)
Toegang:   2018-05-23 10:01:08.954430716 +0200
Gewijzigd: 2018-05-23 10:01:08.954430716 +0200
Veranderd: 2018-05-23 10:01:08.954430716 +0200

Last edited by K3N8 (2018-05-24 08:06:58)


Arch Linux x86_64 LTS

Offline

#7 2018-05-23 09:23:14

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,863
Website

Re: [Solved] systemd-timesyncd

'man systemd-timesyncd' suggests that the /var/lib/systemd/timesync/clock file should contain the timestamp of the last successful sync, but the file size (grootte) is 0 (empty), so I would second the opinion that there is a bug. Either that or the documentation is wrong.

man systemd-timesyncd wrote:
FILES
       /var/lib/systemd/timesync/clock
           This file contains the timestamp of the last successful
           synchronization.

Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB