Paolo
Paolo

Reputation: 2249

Can NTPD be stricter in correcting time?

NTP is doing it's best in syncing my local time with the various NTP servers. If my computer (which has no hardware clock) doesn't have Internet access for a long period of time, the time starts to drift. NTPD slowly corrects it when it's back online, but it can take a long time if the offset is big. I understand the point of this method, but I don't want it to be careful. I want it to be strict in changing the date and time, even if it means huge leaping in time.

Is it possible to make NTPD stricter and less careful?

Upvotes: 3

Views: 233

Answers (2)

Adrian Frühwirth
Adrian Frühwirth

Reputation: 45576

NTPd actually can compensate for the drift by learning the error rate of your local oscillator. Quoting this:

The driftfile entry specifies which file is used to store the system clock's frequency offset. ntpd uses this to automatically compensate for the clock's natural drift, allowing it to maintain a reasonably correct setting even if it is cut off from all external time sources for a period of time.

If you would like to set the time almost immediately manually you can use the -g option to ignore the 1000s safety check (usually, ntpd will not sync if/once the delta is beyong this threshold):

ntpd -qg

Upvotes: 1

dfc
dfc

Reputation: 830

Check out chrony. Chrony is designed to handle intermittent network connections, where as the ntp reference implementation is not.

http://chrony.tuxfamily.org/

Upvotes: 3

Related Questions