[ntp:questions] ntpd step recovery time

David Woolley david at ex.djwhome.demon.invalid
Mon Apr 23 07:42:59 UTC 2012


Nickolay Orekhov wrote:

> 
> The following sequence of actions performed:
> 
> 1. The server becomes synchronized
> 2. Someone wants to measure how much time it will take for ntpd to make a
> STEP. Using "date" command he changes system time significantly.
> 3. According to "tinker stepout 60" we assume that after 60 seconds of
> spike_detect STEP will be performed.

You need to accumulate at least two minimum delay samples.  The first 
sample enters spike mode and the second one will trigger the step if 
large offset is still present.  When ntpd is operating, smoothly, 
samples are only made every 1024 seconds, although, if I looked more 
closely, I might find that the poll interval is brought down on entering 
spike state.

> 
> But in reality step will be performed about 5 minutes to perform. Why it
> takes so long?

If I remember correctly, ntpd dumps the contents of the 1 of 8 filter 
and waits for the reachability to become acceptable again.

> Can we guarantee maximum stepout time somehow?

You should remove the system administrator privileges of the person who 
used the date command on an ntpd controlled machine, instead.  ntpd is 
not specified to handle such behaviour.

A bigger question is why do you want such a fast response to an event 
that should never happen on a properly configure system, and if it 
happens should be treated with the greatest caution to ensure that 
really has happened?



More information about the questions mailing list