Using systemd-timesyncd for NTP

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Using systemd-timesyncd for NTP

Postby xerxes2 » Nov 8th, '23, 20:46

So there was some chatter on Bugzilla about NTP and I didn't even know what I was using myself. I found out after some digging that I was using Chrony. Probably installed by default in Mageia as I can not remember I did it myself. But just for testing I switched to systemd-timesyncd and it was easy, but made a wiki page anyway.

https://wiki.mageia.org/en/Systemd-timesyncd

The problem is that Chrony got a feature "rtcsync" that tells the kernel to update the RTC (if kernel got support enabled). But I can't find any info about systemd-timesyncd having the same feature?
xerxes2
 
Posts: 62
Joined: Jul 18th, '18, 15:53
Location: Sweden

Re: Using systemd-timesyncd for NTP

Postby doktor5000 » Nov 12th, '23, 17:33

xerxes2 wrote:The problem is that Chrony got a feature "rtcsync" that tells the kernel to update the RTC (if kernel got support enabled). But I can't find any info about systemd-timesyncd having the same feature?

That's because that is being done by systemd-timedated: https://www.freedesktop.org/software/sy ... rvice.html
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18013
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Using systemd-timesyncd for NTP

Postby xerxes2 » Nov 19th, '23, 20:54

doktor5000 wrote:
xerxes2 wrote:The problem is that Chrony got a feature "rtcsync" that tells the kernel to update the RTC (if kernel got support enabled). But I can't find any info about systemd-timesyncd having the same feature?

That's because that is being done by systemd-timedated: https://www.freedesktop.org/software/sy ... rvice.html

I see, didn't find that info before. But I uninstalled Chrony and rebooted with timesyncd enabled and haven't rebooted for more than a week and the clocks seems to follow each other.

[xerxes2@ninja ~]$ uptime
19:43:53 up 7 days, 23:29, 1 user, load average: 0,42, 0,52, 0,45
[xerxes2@ninja ~]$ timedatectl status
Local time: sön 2023-11-19 19:43:57 CET
Universal time: sön 2023-11-19 18:43:57 UTC
RTC time: sön 2023-11-19 18:43:57
Time zone: Europe/Stockholm (CET, +0100)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no

And using the adjtimex tool for checking if the setting for telling the kernel/system if NTP is working gives:

[xerxes2@ninja ~]$ adjtimex -p|grep status
status: 24577


24577 decimal is 110000000000001 binary. And the adjtimex manpage says that the sixth bit is the one that says if NTP is working or not. And it looks like 0 means that it does work.

For Linux kernels 2.0 through 2.6, the value is a sum of these:
1 PLL updates enabled
2 PPS freq discipline enabled
4 PPS time discipline enabled
8 frequency-lock mode enabled
16 inserting leap second
32 deleting leap second
64 clock unsynchronized
128 holding frequency
256 PPS signal present
512 PPS signal jitter exceeded
1024 PPS signal wander exceeded
2048 PPS signal calibration error
4096 clock hardware fault


Guessing here the manpage isn't updated in some time haha. So my final conclusion, for now, must be that timesyncd and timedated are updating the setting for telling the system that NTP is working properly.
xerxes2
 
Posts: 62
Joined: Jul 18th, '18, 15:53
Location: Sweden

Re: Using systemd-timesyncd for NTP

Postby doktor5000 » Nov 19th, '23, 23:22

xerxes2 wrote:So my final conclusion, for now, must be that timesyncd and timedated are updating the setting for telling the system that NTP is working properly.

Well, you could also say that you don't need either timesyncd or timedated for NTP to work properly.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18013
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Using systemd-timesyncd for NTP

Postby laidlaws » May 24th, '24, 01:16

I am quarrelling with Win 11. I probably need to set Mageia to UTC. There is a setting for this in setup, but when I call it from MCC, that setting is not there. Is there a command I can run in a terminal?

BTW, the error messages during bootup are still there and seem to be permanent. Will they disappear one day?

Please start a new topic for this
Germ
laidlaws
 
Posts: 279
Joined: May 24th, '11, 04:58

Re: Using systemd-timesyncd for NTP

Postby Germ » May 24th, '24, 01:43

Topic is locked.
Germ
Starting in 1999: Mandrake > Mandriva > Mageia
Linux User #274693
User avatar
Germ
 
Posts: 704
Joined: Mar 30th, '11, 13:16
Location: Chelsea, Oklahoma USA


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest