Guillaume Filion wrote on 22-9-2007 15:18: > It seems that my local server is wrong by a few ms, and when I look at > ntpq it's fairly obvious that the selection algorighm selected a server > that is off by 8 ms. I added another statum 1 server (204.123.2.5) but > ntpd insists on choosing the one that is 8 ms off. > > Any idea what's going on? I'm wondering if there's something basic that > I don't understand in the algorithm. > > [EMAIL PROTECTED]:~$ ntpq -pn > remote refid st [...] delay offset jitter > ================================================================== > -132.214.200.120 18.26.4.105 2 [...] 20.217 -5.729 0.877 > +132.246.168.164 132.246.168.2 2 [...] 16.983 -5.172 0.058 > *208.184.49.9 .ACTS. 1 [...] 41.468 4.369 0.477 > +204.123.2.5 .GPS. 1 [...] 99.864 -4.133 0.098 > 127.127.1.0 .LOCL. 13 [...] 0.000 0.000 0.001 > 192.168.0.255 .BCST. 16 [...] 0.000 0.000 0.001 > 10.10.16.255 .BCST. 16 [...] 0.000 0.000 0.001
From your ntpq output I wouldn't say much is wrong. Ntpd selected one of two stratum 1 servers that are approx 4 ms off (not 8, although the sign is opposite). There isn't anything better available. Give it a few days time (or set your clock a minute off and reboot, if you don't want to wait). Some things to check: 1. Check your config for unintended "prefer" keywords. 2. Avoid multiple "prefer" keywords. It causes excessive hopping among the preferred servers. 3. Get rid of that 127.127.1.0 pseudo refclock. It's unneeded and causes weird things to happen in server selection and accuracy. I suppose the driver is buggy. (This is the most likely solution.) 4. Stratum has quite some weight in the selection. Make sure there are enough alternatives within a stratum. In other words, find more stratum 1 servers or stick to stratum 2. This selection algoritm is much more complex than you might think. Have a look at http://en.wikipedia.org/wiki/Marzullo%27s_algorithm. Not a very clear article, but it gives an idea of the complexity involved. Maybe you should try the "ntp questions" mailing list as well. Jan _______________________________________________ timekeepers mailing list [email protected] https://fortytwo.ch/mailman/cgi-bin/listinfo/timekeepers
