The time of opensuse is always about 2 and half mins late. “hardware clock set to UTC” is checked.
It seems the chronyd is running ok. Some info are provided. Thanks!
❯ sudo systemctl status chronyd
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2021-01-03 17:39:29 CET; 5min ago
Docs: man:chronyd(8)
man:chrony.conf(5)
Process: 9257 ExecStartPost=/usr/lib/chrony/helper update-daemon (code=exited, status=0/SUCCESS)
Process: 9250 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 9252 (chronyd)
Tasks: 1
CGroup: /system.slice/chronyd.service
└─9252 /usr/sbin/chronyd
Jan 03 17:39:29 opensuse_a240 systemd[1]: Starting NTP client/server...
Jan 03 17:39:29 opensuse_a240 chronyd[9252]: chronyd version 3.2 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP -SCFILTER +SECHASH -SIGND +ASY>
Jan 03 17:39:29 opensuse_a240 chronyd[9252]: Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/drift
Jan 03 17:39:29 opensuse_a240 systemd[1]: Started NTP client/server.
date give same results for root.
❯ date
Sun Jan 3 17:47:13 CET 2021
❯ sudo date
Sun Jan 3 17:47:15 CET 2021
Here is hwclock
hwclock from util-linux 2.33.1
System Time: 1609692737.211708
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1609691084 seconds after 1969
Last calibration done at 1609691084 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2021/01/03 16:52:18
Hw clock time : 2021/01/03 16:52:18 = 1609692738 seconds since 1969
Time since last adjustment is 1654 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2021-01-03 17:52:17.202251+01:00
❯ sudo cat /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
pool tick.fh-augsburg.de iburst
pool pool.ntp.org iburst
# pool pool.ntp.org iburst
# ! pool pool.ntp.org iburst
server 0.europe.pool.ntp.org
server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org
# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift
# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3
# Enable kernel synchronization of the real-time clock (RTC).
rtcsync
# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *
# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2
# Allow NTP client access from local network.
#allow 192.168.0.0/16
# Serve time even if not synchronized to a time source.
#local stratum 10
# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys
# Get TAI-UTC offset and leap seconds from the system tz database.
#leapsectz right/UTC
# Specify directory for log files.
logdir /var/log/chrony
# Select which information is logged.
#log measurements statistics tracking
# Also include any directives found in configuration files in /etc/chrony.d
include /etc/chrony.d/*.conf
As far as I know, it is working here. However, I normally use computer time as my standard, so I guess that doesn’t test anything. It does seem to match other web sites.
# systemctl status ntpd
Unit ntpd.service could not be found.
nwr2:croot 2# systemctl status chronyd
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor pre>
Active: active (running) since Thu 2020-12-31 17:27:22 CST; 2 days ago
Docs: man:chronyd(8)
man:chrony.conf(5)
Process: 2174 ExecStartPost=/usr/lib/chrony/helper update-daemon (code=exited>
Process: 2161 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUC>
Main PID: 2167 (chronyd)
Tasks: 1
CGroup: /system.slice/chronyd.service
└─2167 /usr/sbin/chronyd
Dec 31 17:27:21 nwr2 systemd[1]: Starting NTP client/server...
Dec 31 17:27:21 nwr2 chronyd[2167]: chronyd version 3.2 starting (+CMDMON +NTP >
Dec 31 17:27:21 nwr2 chronyd[2167]: Frequency -2.954 +/- 0.125 ppm read from /v>
Dec 31 17:27:22 nwr2 systemd[1]: Started NTP client/server.
Dec 31 17:27:28 nwr2 chronyd[2167]: Selected source 159.203.158.197
Dec 31 17:27:30 nwr2 chronyd[2167]: Selected source 162.159.200.123
I am not seeing corresponding “Selected source” lines in your output.
Some more output:
% cat /etc/chrony.d/pool.conf
pool 2.opensuse.pool.ntp.org iburst
Take a look in ‘/var/log/chrony’ – Chrony may have written something there but, don’t be surprised if there’s nothing there.
The chrony.conf(5) man page is a little bit ominous:
When using a pool of NTP servers (one name is used for multiple servers which might change over time), it is better to specify them with the pool directive instead of multiple server directives.
What’s the output of “chronyc activity” ?
[HR][/HR]Be aware that, things such as Network Manager have the ability to set the Chrony daemon online when the network connection is activated –
‘/etc/NetworkManager/dispatcher.d/20-chrony’
You need to setup with “offline” in ‘/etc/chrony.conf’ – take a look at the chrony.conf(5) man page section “NTP client with infrequent connection to NTP servers
” …
[HR][/HR]I’m wondering if, in ‘/etc/chrony.conf’ , the “pool” and “server” directives are mutually exclusive – undocumented feature …
Take a look in ‘/var/log/chrony’ – Chrony may have written something there but, don’t be surprised if there’s nothing there.
Indeed it is empty.
I made a few changes to chrony.conf file as suggested, allowing the local network, making the severs offline, comment the “pool XXX”, and comment the “/etc/chrony.d/*.conf”
server 0.europe.pool.ntp.org offline
server 1.europe.pool.ntp.org offline
server 2.europe.pool.ntp.org offline
# Allow NTP client access from local network.
allow 192.168.0.0/16
# Also include any directives found in configuration files in /etc/chrony.d
# include /etc/chrony.d/*.conf
# chronyc -m tracking sources
Reference ID : 00000000 ()
Stratum : 0
Ref time (UTC) : Thu Jan 01 00:00:00 1970
System time : 0.000000000 seconds fast of NTP time
Last offset : +0.000000000 seconds
RMS offset : 0.000000000 seconds
Frequency : 0.000 ppm slow
Residual freq : +0.000 ppm
Skew : 0.000 ppm
Root delay : 1.000000000 seconds
Root dispersion : 1.000000000 seconds
Update interval : 0.0 seconds
Leap status : Not synchronised
210 Number of sources = 3
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? 78.156.103.10 0 6 0 - +0ns +0ns] +/- 0ns
^? svn.mediainvent.at 0 6 0 - +0ns +0ns] +/- 0ns
^? main11.ip-connect.net.ua 0 6 0 - +0ns +0ns] +/- 0ns
# chronyc activity
200 OK
0 sources online
3 sources offline
0 sources doing burst (return to online)
0 sources doing burst (return to offline)
0 sources with unknown address
Still could not select an sever
# systemctl status chronyd
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2021-01-04 17:18:23 CET; 10min ago
Docs: man:chronyd(8)
man:chrony.conf(5)
Process: 10768 ExecStartPost=/usr/lib/chrony/helper update-daemon (code=exited, status=0/SUCCESS)
Process: 10762 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 10764 (chronyd)
Tasks: 1
CGroup: /system.slice/chronyd.service
└─10764 /usr/sbin/chronyd
Jan 04 17:18:23 opensuse_a240 systemd[1]: Starting NTP client/server...
Jan 04 17:18:23 opensuse_a240 chronyd[10764]: chronyd version 3.2 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDRO>
Jan 04 17:18:23 opensuse_a240 chronyd[10764]: Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/drift
Jan 04 17:18:23 opensuse_a240 systemd[1]: Started NTP client/server.
Yes,
If you are on an “enterprise” network where you log into the Domain,
You should add the NTP server provided by the Domain and **remove all other NTP servers.
**
You might also remind your network IT that their own NTP server is likely 2.5 minutes off.