You are not logged in.
Pages: 1
Hello,
is there, perhaps, a signal which can be sent to timesyncd, so that it would synchronise the time with ntp server? Or is there any other mechanism to force synchronisation at a given time?
Thanks!
Offline
Why do you want to do that? This seems like an XY Problem
systemd-timesyncd isn't a one-off synchronisation, but keeps polling the NTP server and self-adjusts its polling up and down once synchronised.
Offline
Thanks for the reply!
Yes, perhaps, it is indeed rather a silly matter.
My original problem is that I am trying to estimate a time shift in my quartz watches and for this I need a source of the UTC time. The most reliable way seemed to me to use the laptop synced time. Thus, I measure the shift right after synchronisation (the occurrence of synchronisation I see in log file).
I just don't understand what triggers the synchronisation with ntp server; is it a timed scheduled procedure (like cron), or something triggers it (like updated network).
It is really a silly matter, and sorry for wasting your time.
Offline
Why do you want to do that? This seems like an XY Problem
systemd-timesyncd isn't a one-off synchronisation, but keeps polling the NTP server and self-adjusts its polling up and down once synchronised.
It doesn't in my system. Mine synchronizes once per bootup, or when I restart systemd-networkd manually. I would like to know how to get it to resynchronize automatically after time intervals.
Here is a current output. The occasions when it resynchronized are when I manually restarted systemd-networkd:
systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2015-09-21 06:58:24 CDT; 4 days ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 315 (systemd-timesyn)
Status: "Synchronized to time server 205.133.32.18:123 (2.us.pool.ntp.org)."
CGroup: /system.slice/systemd-timesyncd.service
└─315 /usr/lib/systemd/systemd-timesyncd
Sep 22 07:22:20 tim-arch-ssd systemd-timesyncd[315]: Network configuration changed, trying to establish connection.
Sep 22 07:22:20 tim-arch-ssd systemd-timesyncd[315]: Synchronized to time server 205.133.32.18:123 (2.us.pool.ntp.org).
Sep 23 08:43:48 tim-arch-ssd systemd-timesyncd[315]: Network configuration changed, trying to establish connection.
Sep 23 08:43:48 tim-arch-ssd systemd-timesyncd[315]: Synchronized to time server 205.133.32.18:123 (2.us.pool.ntp.org).
Sep 24 06:41:14 tim-arch-ssd systemd-timesyncd[315]: Network configuration changed, trying to establish connection.
Sep 24 06:41:15 tim-arch-ssd systemd-timesyncd[315]: Synchronized to time server 205.133.32.18:123 (2.us.pool.ntp.org).
Sep 25 06:49:11 tim-arch-ssd systemd-timesyncd[315]: Network configuration changed, trying to establish connection.
Sep 25 06:49:11 tim-arch-ssd systemd-timesyncd[315]: Synchronized to time server 205.133.32.18:123 (2.us.pool.ntp.org).
Sep 25 14:42:17 tim-arch-ssd systemd-timesyncd[315]: Network configuration changed, trying to establish connection.
Sep 25 14:42:17 tim-arch-ssd systemd-timesyncd[315]: Synchronized to time server 205.133.32.18:123 (2.us.pool.ntp.org).
Tim
Last edited by ratcheer (2015-09-25 20:02:13)
Offline
mine synchronises every 34ish minutes (2048s). It doesn't log informational messages after the initial sync, but you can check the last time it synchronised by checking the access/modify/change dates returned by
stat /var/lib/systemd/clock
Offline
So it does. Thanks, ukhippo!
Tim
Offline
Pages: 1