Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resynchronize with chrony?

Tags:

I am looking for an equivalent of 'ntpdate IPaddress' command in the chrony suite to force chronyd to synchronize time right now.

like image 892
Nfernandez Avatar asked Apr 09 '18 10:04

Nfernandez


People also ask

How do I reset my chrony?

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.

Is chrony better than NTP?

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.

How do I find chrony sync in Linux?

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.


2 Answers

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

like image 152
Richard Green Avatar answered Sep 20 '22 02:09

Richard Green


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.

like image 27
Robert Newton Avatar answered Sep 21 '22 02:09

Robert Newton