OpenNTPD – How Often Does OpenNTPD Update the Time?
ntpntpdopenntpd
Neither the openntpd nor the ntpd.conf manpage have this information.
Best Answer
Time updating happens on a continuous basis. The daemon keeps track of how the time-rate of the hardware clock drifts from the time reported by the upstream sources. It polls the upstream sources based on an algorithm and can change. The actual poll-rate is a power-of-two in seconds. You can query this information through the ntpq command.
Different time daemons have different defaults for what it'll allow the maximum poll time to be. I've seen it go as long as a couple of days between polls of upstream servers, and others where it never goes past about 20 minutes. The minpoll and maxpoll values on your server lines in the ntpd.conf file itself will provide, if set, the exact power-of-two for that upstream server.
Upstream polling is used to determine how to modify the drift rate. It is very important for the NTP daemon to not hard-set time, instead it just increases the length of a second by a tiny amount for a while until the local time converges with the time reported by the upstream time servers.
Above a certain difference between local time and pool time, ntp will "slew" the update, i.e. perform little changes all the time. This is so that your system behaviour doesn't completely jump out of the blocks.
Here is an extract from the man page:
-x Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually. Note: Since the slew rate of
typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s. Thus, an adjustment as
much as 600 s will take almost 14 days to complete. This option can be used with the -g and -q options. Note: The kernel time discipline
is disabled with this option.
With your current time difference it will take you a long time to catch up. I suggest you do a manual change to smaller difference and then observe whether this is working.
Best Answer
Time updating happens on a continuous basis. The daemon keeps track of how the time-rate of the hardware clock drifts from the time reported by the upstream sources. It polls the upstream sources based on an algorithm and can change. The actual poll-rate is a power-of-two in seconds. You can query this information through the
ntpq
command.Different time daemons have different defaults for what it'll allow the maximum poll time to be. I've seen it go as long as a couple of days between polls of upstream servers, and others where it never goes past about 20 minutes. The
minpoll
andmaxpoll
values on yourserver
lines in the ntpd.conf file itself will provide, if set, the exact power-of-two for that upstream server.Upstream polling is used to determine how to modify the drift rate. It is very important for the NTP daemon to not hard-set time, instead it just increases the length of a second by a tiny amount for a while until the local time converges with the time reported by the upstream time servers.