3

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?

Paolo
  • 2,161
  • 5
  • 25
  • 32

2 Answers2

3

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

http://chrony.tuxfamily.org/

dfc
  • 792
  • 5
  • 16
  • OP asked specifically about `ntpd`, but since `chrony` is the default NTP package for e.g. RHEL7 this is the correct answer nowadays given it is possible to switch implementation. – Adrian Frühwirth Nov 01 '18 at 09:29
1

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
Adrian Frühwirth
  • 42,970
  • 10
  • 60
  • 71