[ntp:questions] Re: ntpd, boot time, and hot plugging

Per Hedeland per at hedeland.org
Sun Feb 6 10:35:36 UTC 2005

In article <vaKdnSNBMfU2upnfRVn-uQ at comcast.com> "Richard B. Gilbert"
<rgilbert88 at comcast.net> writes:
>I think maybe what people are looking for, that ntpdate seems to do and 
>ntpd does not, is:
>1.  Get the time accurate to within  X seconds quickly.
>2.  Set that time quickly.  The presumption here is that we are in a 
>state where it's OK to step the clock; e.g. we are booting and nothing 
>has started yet that will be upset by a change in time.  Slewing the 
>clock to correct an offset of, say, 127 milliseconds, to within, say, 5 
>milliseconds,  will take about 250 seconds and that is unacceptable when 
>we need to be within 5 milliseconds of the correct time as quickly as 


>The user may wish to specify the required accuracy, knowing that there 
>is a trade off with elapsed time to achieve that accuracy.  How good 
>"good enough" must be will vary.   Someone recording the time workers 
>started work and the time they stopped may be satisfied with plus/minus 
>one minute but it's 8:00AM local time and he needs it right now!  
>Someone else might really need plus/minus ten microseconds and be 
>willing and able to wait two or three hours to get it.

This I think is way beyond "what people are looking for" in this
particular area - and I'm not sure it's very meaningful either: It makes
no sense to set the time with great accuracy and then just leave it,
since the clock will quickly drift away. Achieving and *maintaining*
great accuracy, by calculating and taking the drift into account, is
precisely what ntpd already does in its normal mode of operation, of

The goal, whether achieved with a separate program or a special startup
mode of ntpd, is to "quickly" (5 seconds sounds like a reasonable upper
bound) set the clock "well enough" that ntpd in normal operation can
from that point on maintain it without steps. I'm intentionally using
"goal" rather than "requirement", because with a big clock drift and
lack of previous knowledge of it (i.e. drift file), the goal may not be
possible to achieve. In "normal circumstances" it should be no problem
at all though, and ntpdate does it easily.

--Per Hedeland
per at hedeland.org

More information about the questions mailing list