New ntp install from tarball

Gene Heskett gheskett at wdtv.com
Sat Dec 27 13:01:53 UTC 2014


On Saturday 27 December 2014 05:14:30 Tom H did opine
And Gene did reply:
> On Thu, Dec 25, 2014 at 4:43 PM, Gene Heskett <gheskett at wdtv.com> wrote:
> > On Thursday 25 December 2014 10:17:24 Tom H did opine
> > 
> >> What's this utility?
> > 
> > ~/bin/drift-checker, attached. I hope its not too big, 332 bytes...
> 
> Thanks. Definitely small enough. WHen you said "utility" I was
> expecting C code. But this is a useful script. I usually use "ntpq
> -np". It's quicker because name resolution is skipped and I find it
> nicer because the hostnames aren't truncated. I wish that ntpq had an
> "-l" or "-w" option to get the full fqdns.
>
That would be nice, but needs more space for the name, so is usually 
truncated.
 
> > My script is listing this machine as a server, but the ipv4 address
> > it shows is 37299% bogus.
> > 
> > From the lathe:
> > Thu Dec 25 20:56:30 UTC 2014
> > drift=172.971
> > 
> >      remote           refid      st t when poll reach   delay  
> >      offset  jitter
> > 
> > =====================================================================
> > =========
> > 
> >  router.coyote.d .INIT.          16 u    - 1024    0    0.000   
> >  0.000   0.000
> > 
> > +coyote.coyote.d 108.61.56.35     3 u  219 1024  377    0.119   
> > 0.449   0.678 *golem.canonical 131.188.3.220    2 u  124 1024  377 
> > 110.552   -0.619   2.490
> > 
> > From the mill:
> > Thu Dec 25 20:52:16 UTC 2014
> > drift=-61.925
> > 
> >      remote           refid      st t when poll reach   delay  
> >      offset  jitter
> > 
> > =====================================================================
> > =========
> > 
> >  router.coyote.d .INIT.          16 u    - 1024    0    0.000   
> >  0.000   0.000
> > 
> > *y.ns.gin.ntt.ne 200.98.196.212   2 u   46 1024  377   18.068  
> > -1.031   0.128 +coyote.coyote.d 108.61.56.35     3 u   31 1024  377 
> >   0.135   -1.566   0.031
> > 
> > (which has been carving Mahogany for me most of the day)
> > 
> > In neither case would I consider this machine, shown with the bogus
> > address, a stratum 3 server. So there is a strange odor in this
> > woodpile.
> > 
> > However the reported offset is good, and the drift seems fairly
> > stable.
> > 
> > coyote.coyote.den is at 192.168.xx.xx, not 108.61.56.35, so I haven't
> > the foggiest where that refid comes from, and I've not tripped over
> > that in the web page docs. What surprised me was the router being
> > considered a stratum 16 reference. Thats dd-wrt, and I may not have
> > it properly configured.
> 
> "refid" is the ip address of the box with which coyote syncd, not
> coyote's ip address.

Ahh, thanks.  The man page is, shall we say, sparse?
 
> From what I've noticed, an ".INIT." refid always has a "16" stratum
> and the value's adjusted at the next ntpq run. But I'd have to read
> the documentation to be certain...

It seems 100% repeatable here.  Perhaps an ntp.conf option not set 
correctly?  Particularly for this machine to do its broadcasting.  On the 
face of it, i would have assumed that rather than broadcasting it on .255, 
I'd have expected it to respond to the query from the client.  I see by 
/etc/services that tcp/udp on port 37 is for time servers, while ntp 
itself is both tcp/udp on port 123.

So I just set it to BC on 37 and 123, and the timeouts are now gone. But 
other data seems bogus.

Which one is correct is not detectable by perusing the web page docs.

Again, the docs on setting it up as a server are almost criminally 
concise.  I note that querying of this machine lags, doing a 2 second or 
so hang before report completion when its broadcasting on 255.

IMNSHO the pogo illustrations in the web docs aren't a substitute for 
testable facts.

And this is a bit unbelievable, I changed both of the shop boxes to use 
only this machine in the server list, and restarted ntp on them.  And now 
they both think this machine is a stratum 2 machine!

Then I changed the broadcast lines in ntp.conf to just list the other 2 
machines local ipv4 addresses, restarted everything, and now the other 2 
machines consider this box as a stratum 16 box, which is a lot closer to 
the truth than calling it a stratum 2 source since it is at best a stratum 
3.  Seems this protocol can be rather easily confused.

In any event if they keep good time over a reboot period, which may be 
months if I don't screw up a looping statement in LinuxCNC getting it into 
a scan loop it never completes, _and_ they are not whanging away on 
pool.ntp.org doing it, then I'm a happy camper.

Now, if I could manage to keep port addresses separated from net addresses 
in my 80 yo wet ram, I'd have it made. :(

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS



More information about the ubuntu-users mailing list