[ntp:questions] Query about NTP accuracy

Per Hedeland per at hedeland.org
Sun May 24 21:44:07 UTC 2009


In article <iMSdnaI5tuW71YTXnZ2dnUVZ8sidnZ2d at giganews.com> Terje
Mathisen <"terje.mathisen at tmsw.no"> writes:
>Jan Ceuleers wrote:
>> Terje Mathisen wrote:
>>> This is why you want ntpd to do the initial step, after first doing 
>>> the full vote collection from all configured servers, not ntpdate 
>>> which picks the first server to respond!
>> 
>> If that is so, then the ntpdate manpage is wrong:

The man page is correct.

>ntpdate is deprecated, so it doesn't really matter.

Well, lots of people still use it - and the incorrect assertion above
has repeatedly been used as one of the arguments for deprecating it...

>> In other words, before ntpd was capable of being a good ntpdate 
>> replacement, best practice was to use a script to extract server lines 
>> from ntpd.conf and pass all of those on the ntpdate command line.
>
>This only happened late in ntpdate's life, originally it did behave the 
>way I described.

I don't know exactly when ntpdate was born, but I don't think it was all
that late in its life when this was written:

                                                          A number of sam-
   ples  are  obtained from each of the servers specified and the standard
   NTP clock filter and selection algorithms are  applied  to  select  the
   best of these.

Excerpt from the xntpd-1.3 ntpdate man page (yes there were man pages
back in those days), anno 1989. And there's even proof if you manage to
compile it, see below.

> However, it still wouldn't matter because that 
>particular DB server was hardcoded to query just one (and in this case 
>broken) server. :-(

So it was just a broken setup, not any fault of ntpdate.

--Per Hedeland
per at hedeland.org

$ ./ntpdate -d pool.ntp.org no.pool.ntp.org se.pool.ntp.org
./ntpdate: ntpdate version 1.0
transmit(91.194.67.9)
receive(91.194.67.9)
transmit(91.194.67.9)
receive(91.194.67.9)
transmit(91.194.67.9)
transmit(139.112.1.20)
receive(139.112.1.20)
transmit(139.112.1.20)
receive(139.112.1.20)
transmit(139.112.1.20)
receive(91.194.67.9)
transmit(91.194.67.9)
receive(139.112.1.20)
transmit(139.112.1.20)
receive(139.112.1.20)
transmit(139.112.1.20)
receive(91.194.67.9)
transmit(91.194.67.9)
transmit(193.11.185.39)
receive(193.11.185.39)
transmit(193.11.185.39)
receive(193.11.185.39)
transmit(193.11.185.39)
receive(193.11.185.39)
transmit(193.11.185.39)
receive(193.11.185.39)
transmit(193.11.185.39)
server 91.194.67.9, port 123
stratum 2, precision -20, leap 01, trust 000
refid [195.66.241.10], distance 0.0014, dispersion 0.0279
transmitted 4, in filter 4
reference time:      cdc439b6.5f7950d7  Sun, May 24 2009 23:25:10.372
originate timestamp: cdc43d08.fdb5298f  Sun, May 24 2009 23:39:20.991
transmit timestamp:  cdc43d08.ec3b9000  Sun, May 24 2009 23:39:20.922
filter delay:  0.1259   0.1243   0.1238   0.1228  
               0.0000   0.0000   0.0000   0.0000  
filter offset: 0.02148  0.02077  0.02041  0.01960 
               0.00000  0.00000  0.00000  0.00000 
estdelay 0.1228, estdisp 0.0009
estoffset 0.0195950

server 139.112.1.20, port 123
stratum 2, precision -20, leap 00, trust 000
refid [139.112.7.52], distance 0.0046, dispersion 0.0383
transmitted 4, in filter 4
reference time:      cdc43a1c.75feb365  Sun, May 24 2009 23:26:52.460
originate timestamp: cdc43d08.f56a02cb  Sun, May 24 2009 23:39:20.958
transmit timestamp:  cdc43d08.f0f79000  Sun, May 24 2009 23:39:20.941
filter delay:  0.0634   0.0634   0.0628   0.0630  
               0.0000   0.0000   0.0000   0.0000  
filter offset: -0.00119 -0.00138 -0.00159 -0.00133
               0.00000  0.00000  0.00000  0.00000 
estdelay 0.0628, estdisp 0.0002
estoffset -0.0015898

server 193.11.185.39, port 123
stratum 2, precision -20, leap 00, trust 000
refid [192.36.144.22], distance 0.0107, dispersion 0.0384
transmitted 4, in filter 4
reference time:      cdc4376a.7220dbc7  Sun, May 24 2009 23:15:22.445
originate timestamp: cdc43d09.2978f3d0  Sun, May 24 2009 23:39:21.162
transmit timestamp:  cdc43d09.24e19000  Sun, May 24 2009 23:39:21.144
filter delay:  0.0640   0.0644   0.0640   0.0639  
               0.0000   0.0000   0.0000   0.0000  
filter offset: -0.00129 -0.00149 -0.00156 -0.00127
               0.00000  0.00000  0.00000  0.00000 
estdelay 0.0639, estdisp 0.0001
estoffset -0.0012691

./ntpdate: adjust time server 139.112.1.20 offset -0.0015898




More information about the questions mailing list