Re: [ntp:questions] ntp pool servers disappear - more data

2021-06-24 Thread William Unruh
On 2021-06-24, Jim Pennino  wrote:
> Jim Pennino  wrote:
>> I was checking the stability of a new USB GPS refclock on a server which
>> is configured to use the GPS, servers from the ntp pool, and another server
>> of mine that has a PPS GPS receiver.
>> 
>> I noticed that almost all the pool servers had disappeared.
>> 
>> I then checked other machines that use my "good" server and the ntp
>> pool; most all of the pool servers had also disappeared on those
>> machines.
>> 
>> This is a mix of PC linux, rasberry pi linux, rasberry pi buster, and
>> Windows 10 machines with Meinberg, all with the latest ntp from their 
>> distros.
>> 
>> Long story short: I realized I had had a network outage and tested the
>> theory that was the cause. It was.
>> 
>> It seems that any server in ntp.conf that is specified as a name, as
>> the pool servers are, will after a sufficiently long DNS outage just
>> disappear and not come back after the outage without restarting ntp.
>> 
>> It would seem to me that ntp should only need to do a DNS lookup on
>> startup and from then on continue to use the address found.
>> 
>> But that is not how ntp works.
>> 
>> Anyway, the bottom line is that if the pool is your only source of time
>> and if there is a DNS failure for a sufficiently long time, you will
>> lilely not have any source of time afterwards.
>> 
>> As for the USB GPS I was testing, it is called a VK-162 G-Mouse
>> available from Amazon for $14, uses the Windows 10 native driver so it
>> works with Meinberg ntp, and keeps the time within single digit
>> milliseconds without any other servers.
>  
> Further testing shows the following:
>
> I took a machine and ran watch -p -n 10 ntpq -pn to monitor ntp status.
>
> I then pulled the network connection from the machine.
>
> After about 7 minutes the pool servers started to disappear.
>
> If the machine was reconnected to the network within about 15 minutes,
> the pool servers would reappear.
>
> If the machine was off the network for more than about 15 minutes, the
> pool servers do NOT reappear until ntp is restarted.
>

I suspect it is the number of times that ntpd tries to contact the
server and fails rather than the time that is important. You could try
putting the server offline and then online again (I use chrony so do not
remember if ntpd has that option).
>

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] ntp pool servers disappear

2021-06-24 Thread Danny Mayer

On 6/23/21 10:26 AM, Jim Pennino wrote:

It seems that any server in ntp.conf that is specified as a name, as
the pool servers are, will after a sufficiently long DNS outage just
disappear and not come back after the outage without restarting ntp.

It would seem to me that ntp should only need to do a DNS lookup on
startup and from then on continue to use the address found.

But that is not how ntp works.


No, you shouldn't assume that once you have an IP address you can decide 
to use it forever. The owner of any server has the right to change the 
DNS entry used to point to a different server. We have had no end of 
problems with clients bombarding an IP address with packets long after 
it has stopped serving time.


If you have a DNS issue then you should address that. ntpd should pick 
up new addresses if one is available. If it doesn't do that please file 
a bug report.


Danny


___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] ntp pool servers disappear

2021-06-24 Thread Martin Burnicki

Jim Pennino wrote:

Anyway, the bottom line is that if the pool is your only source of time
and if there is a DNS failure for a sufficiently long time, you will
lilely not have any source of time afterwards.


That's what the 'pool' configuration keyword is for. If one of the pool 
servers that were detected at startup becomes unreachable, ntpd tries to 
detect a new server of the pool. See:


http://doc.ntp.org/current-stable/confopt.html#pool

and:

http://doc.ntp.org/current-stable/discover.html#pool

Martin



OpenPGP_signature
Description: OpenPGP digital signature
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] ntp pool servers disappear

2021-06-24 Thread Jim Pennino
William Unruh  wrote:
> On 2021-06-23, Jim Pennino  wrote:
>> William Unruh  wrote:
>>> On 2021-06-23, Jim Pennino  wrote:
>>> ...

 As for the USB GPS I was testing, it is called a VK-162 G-Mouse
 available from Amazon for $14, uses the Windows 10 native driver so it
 works with Meinberg ntp, and keeps the time within single digit
 milliseconds without any other servers.
>>> 
>>> Looks like a nice cheap receiver-- no PPS I assume so that accuracy,
>>> after correction for the NMEA delay is probably in the 10s of ms, not
>>> their claimed microsecond. But certainly for most people ms is more than
>>> enough accuracy.
>>> 
>>
>> Correct, no PPS.
>>
>> From short term (day or so) testing looking at peerstats data:
>>
>> Samples: 3914
>> Avg offset: -0.00190137
>> Std dev:0.00921412
> 
> The problem is that that does not test the accuracy, just jitter. Ie,
> the time could be off by a century, but it is repeatable, so ntp says
> that the offset and standard deviation is small. 
> You need to compare with another time source that is known to be more
> accurate than yours. Typically nmea signals are delivered late and the
> length of the signal is long delaying things still more, expecially if
> you choose an nmea sentence which reports lots of information, not just
> the time. 

I didn't bother with the full story as I wanted to be brief unless
someone had specific questions.

A bit more detail:

For testing purposes, ntp was configured to use my machine that has a
real PPS GPS and about a half dozen public servers, most of them stratum 1.

I also enabled all the statistics files.

Initial, i.e. an hour or so, testing was with standard linux utilities,
i.e. ntpq, ntpstat, ntptime, for a sanity check and a tweek of the fudge
value, which came out to 0.027.

After several days I ran a pile of sed/awk scripts to look at the
statistics files and came to the conclusion that the absolute time error
was always less than about 5 ms and typically around 1 ms, which for $14 I
condider good enough.

FYI I have tested a several other generic USB GPS pucks and found the
jitter to be over an order of magnitude greater than this device with
fudge times in the order of 0.500 and time errors in the several 10s
of ms.

>>
>> ntpq typically shows offset and jitter at about 1 and the satellites in
>> view are usually 14 or more with the puck in a window sill.
> 
> And that means that the processor in the gps receiver has to work harder
> and delays the report of the NMEA even longer. Now of course you may not
> care -- 100ms may be perfectly acceptable (It is far more accurate than
> a wrist watch for example) and then my comments are entirely irrelevant.
> If you want higher accuracy however, then they start to become relevant. 
> Hook it up to the network and use some of the low stratum sources to get
> the time. That should be accurate probably to better than a ms. That
> will allow you to calibrate your gps delay and tell ntp to subtract the
> persistant offset from the gps signal, and improve your accuracy. 
> 
> Again that is only important if you have some reason to care. Again, if
> accuracy to the nearest second is good enough, ignore this.

See above.

I am assuming that the fudge time of 0.027 versus the typical generic GPS
puck time of 0.500 means this thing is processing things much faster.

FYI all this is done on a USB 2.0 interface.

>>
>> That is from a linux PC where there are more tools for testing things.
>>
>> The reason I bought it is that it is advertised to work with the Windows
>> native USB driver, which produces a virtual com port, which makes it
>> usable with Meinberg ntp without any other drivers or software.
>>
>> I have yet to do any Windows testing other than to verify it does work,
>> but I see no reason why Windows would be much different.
> 
> Probably not. But again, testing it against some good network ntp
> sources should give you an idea of how well it is doing, if that is
> important. 
> Of course we all like our stuff to be better than others. My system,
> using pps from a gps is probably goot to a few microseconds. Do I need a
> few microsecond accuracy. No. Even ms accuracy would be way more than  I
> need. But I like seeing how far I can push stuff. My only defence is
> "its a hobby".

>From my analysis of my real PPS GPS system, the absolue time on that
machine is typically accurate to about a microsecond with a standard
deviation of about 0.8 us.

The time accuracy I actually need for stuff I do is in the order of
about 50 ms, but like you, I too like seeing how far I can push stuff,
especially for $14.

 

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] ntp pool servers disappear

2021-06-24 Thread Jim Pennino
William Unruh  wrote:



> Certainly if it used the usb channel at its full speed, that should be
> fine. I always thought that gps ran at serial port speeds, but clearly
> that is not true. 

Well, stty -F /dev/ACM0, which is where this puck shows up as opposed to
the generic /dev/USB0, says speed 9600 baud.

I know of no way absent some sort of USB break out board and an
oscilloscope to determine if that is actually true.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] ntp pool servers disappear

2021-06-24 Thread Jim Pennino
William Unruh  wrote:
> On 2021-06-23, Jim Pennino  wrote:
> ...
>>
>> As for the USB GPS I was testing, it is called a VK-162 G-Mouse
>> available from Amazon for $14, uses the Windows 10 native driver so it
>> works with Meinberg ntp, and keeps the time within single digit
>> milliseconds without any other servers.
> 
> Looks like a nice cheap receiver-- no PPS I assume so that accuracy,
> after correction for the NMEA delay is probably in the 10s of ms, not
> their claimed microsecond. But certainly for most people ms is more than
> enough accuracy.
> 

Correct, no PPS.

>From short term (day or so) testing looking at peerstats data:

Samples: 3914
Avg offset: -0.00190137
Std dev:0.00921412

ntpq typically shows offset and jitter at about 1 and the satellites in
view are usually 14 or more with the puck in a window sill.

That is from a linux PC where there are more tools for testing things.

The reason I bought it is that it is advertised to work with the Windows
native USB driver, which produces a virtual com port, which makes it
usable with Meinberg ntp without any other drivers or software.

I have yet to do any Windows testing other than to verify it does work,
but I see no reason why Windows would be much different.


___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


[ntp:questions] ntp pool servers disappear

2021-06-24 Thread Jim Pennino
I was checking the stability of a new USB GPS refclock on a server which
is configured to use the GPS, servers from the ntp pool, and another server
of mine that has a PPS GPS receiver.

I noticed that almost all the pool servers had disappeared.

I then checked other machines that use my "good" server and the ntp
pool; most all of the pool servers had also disappeared on those
machines.

This is a mix of PC linux, rasberry pi linux, rasberry pi buster, and
Windows 10 machines with Meinberg, all with the latest ntp from their distros.

Long story short: I realized I had had a network outage and tested the
theory that was the cause. It was.

It seems that any server in ntp.conf that is specified as a name, as
the pool servers are, will after a sufficiently long DNS outage just
disappear and not come back after the outage without restarting ntp.

It would seem to me that ntp should only need to do a DNS lookup on
startup and from then on continue to use the address found.

But that is not how ntp works.

Anyway, the bottom line is that if the pool is your only source of time
and if there is a DNS failure for a sufficiently long time, you will
lilely not have any source of time afterwards.

As for the USB GPS I was testing, it is called a VK-162 G-Mouse
available from Amazon for $14, uses the Windows 10 native driver so it
works with Meinberg ntp, and keeps the time within single digit
milliseconds without any other servers.


___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions