Chrony in kurz
Folgende Konfig reicht aus
hc44:~ # cat /etc/chrony.conf|grep -v ‘^#’
pool pool.ntp.org iburst
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
logdir /var/log/chrony
include /etc/chrony.d/*.conf
/etc/chrony.d/ ist leer
nun:
systemctl enable chronyd
systemctl start chronyd
danach sieht man im timedatectl automatisch folgendes :
Vorher:
hhc44:~ # timedatectl
Local time: Tue 2021-04-20 14:27:57 CEST
Universal time: Tue 2021-04-20 12:27:57 UTC
RTC time: Tue 2021-04-20 12:27:57
Time zone: Europe/Berlin (CEST, +0200)
Network time on: no
NTP synchronized: no
RTC in local TZ: no
Danach:
NTP synchronized: yes
Das hatte mich bei den anderen Systemen verwirrt, da man das lt. doku mittels
timedatectl set-ntp true auch erreichen kann, dann ist aber der
systemd-timesyncd involviert mit eigener Konfig.
Aber der ist inaktiv.
hhc44:~ # systemctl status systemd-timesyncd
- systemd-timesyncd.service – Network Time Synchronization
Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; disabled;>
Active: inactive (dead)
Docs: man:systemd-timesyncd.service(8)
Fazit: wenn man chronyd startet, ist alles gut ;-)
Ein paar Abfragen:
hhc44:~ # chronyc -a sources
210 Number of sources = 4
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
hhc44:~ # chronyc -a activity
200 OK
4 sources online
0 sources offline
0 sources doing burst (return to online)
0 sources doing burst (return to offline)
0 sources with unknown address
hhc44:~ # chronyc -a tracking
Reference ID : 81468424 (stratum2-3.NTP.TechFak.NET)
Stratum : 3
Ref time (UTC) : Tue Apr 20 12:33:34 2021
System time : 0.000102860 seconds fast of NTP time
Last offset : -0.000005700 seconds
RMS offset : 0.000900322 seconds
Frequency : 25.559 ppm slow
Residual freq : -0.002 ppm
Skew : 0.035 ppm
Root delay : 0.007883033 seconds
Root dispersion : 0.001170535 seconds
Update interval : 130.0 seconds
Leap status : Normal