[ntp:questions] Re: ntp.drift

Richard B. Gilbert rgilbert88 at comcast.net
Fri Jan 28 04:06:28 UTC 2005


Walter HILL wrote:

> Martin Burnicki wrote:
>
>> Walter HILL wrote:
>>
>>> Hi,
>>>
>>> I have a Sun Blade 100 workstation running Linux 2.4.27 and have
>>> compiled and installed ntpd
>>>
>>> The computer has been running for several weeks yet the ntp.drift file
>>> still contains 0.000. Yes ntp.conf contains
>>>
>>> driftfile /var/lib/ntp/ntp.drift
>>>
>>> The computer was losing about 2s / hour prior.
>>>
>>> Is there another parameter required in ntp.conf?
>>
>>
>>
>> No.
>>
>> There are 2 things you could check:
>>
>> 1.) Has the NTP daemon synchronized to some time source other than 
>> "local
>> clock", i.e. is there a '*' in the first column of the output ot the
>> command "ntpq -p"? If in doubt, please post that output here.
>
>
>      remote           refid      st t when poll reach   delay   offset 
>  jitter
> ============================================================================== 
>
> +nimda.mailworx. 198.30.92.2      2 u  223 1024   77  296.561  1336.97 
> 505.919
>  caenis          192.43.244.18    2 u   22   64  377    1.724  827.625 
> 963.550
> *cerberus        128.250.36.3     2 u   26   64  377    0.729  896.530 
> 901.532
>  LOCAL(0)        LOCAL(0)        10 l   20   64  377    0.000    0.000 
>   0.002
>
> caenis and cerberus are on the local subnet.
>
Something is very wrong here!!  Your offset and jitter numbers two 
orders of magnitude too large.  I expect offsets and jitter to be less 
than twenty milliseconds; usually a lot less!  A round trip delay of 
296.561 milliseconds seems excessive unless you are using tin cans and 
string!

I'd suggested configuring several more servers and selecting a set of at 
least four servers with low round trip delays and low jitter.

I'm not sure what the problem with your drift file might be but you 
should not have to create a drift file or seed it with a value!  I would 
suggest deleting the existing file.  ntpd should create a new file with 
a drift value in it.  The ntpd daemon should create a temporary file 
with a new value, delete the existing file and rename the temporary file 
each hour.  Make sure that ntpd has write access to /var/lib/ntp.

On some flavors of Unix ntpd runs, not as root, but as user "ntp".  It 
is so with Red Hat.  If Gentoo is the same, make sure that /var/lib/ntp 
is owned by ntp with permissions rwxr-xr-x.  If the existing file is not 
owned by ntp, either delete it or chown ntp /var/lib/ntp/drift; chgrp 
ntp /var/lib/ntp/drift!

HTH



More information about the questions mailing list