I am looking for an equivalent of 'ntpdate IPaddress' command in the chrony suite to force chronyd to synchronize time right now.
In order to change the NTP servers used by Chrony a configuration file must be edited, followed by a restart of the Chrony service. Save the file and exit. Restart the chrony service for the changes to take effect: sudo systemctl restart chronyd.
Things chronyd can do better than ntpd are: chronyd can work well when external time references are only intermittently accessible, whereas ntpd needs regular polling of time reference to work well. chronyd can perform well even when the network is congested for longer periods of time.
To check if chrony is synchronized, use the tracking, sources, and sourcestats commands. Run the chronyc tracking command to check chrony tracking. Alternatively you could run chronyc to display a chronyc> prompt, and then run the tracking command from the chronyc> prompt.
Try
sudo chronyc -a makestep
This will update your system clock quickly (might break some running applications), using the time sources defined in /etc/chronyd.conf
.
-a is needed to avoid
501 Not authorised error
The chrony equivalent to the ntpdate SERVER-ADDRESS
command is:
chronyd -q 'server SERVER-ADDRESS iburst'
Note that chronyd
must not be already running, just as ntpd
must not be running when setting the date with ntpdate
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With