On 10/01/2020 17.46, Andrei Borzenkov wrote:
10.01.2020 18:11, Carlos E. R. пишет:
Here you have poll interval in seconds:
host:~ # ntpq -np remote refid st t when poll reach delay offset jitter
==============================================================================
*xx.xx.x.xx 88.212.196.95 5 u 1 64 377 19.177 -0.042
0.331
I don't know how to get from there "your clock is 45 mS off".
Sorry? I said "here is poll interval" and poll interval *is* per server. If you have multiple servers each one can be polled with different interval.
Ok, but I'm not that interested in the poll interval.
I did not say "here is your offset from reality".
But that is my question.
And there is one line per server, so I don't know which is the one. I do know which one it is using as the upstream reference, yes, but ntp knows how much "off" is that one from "reality". I don't.
NTP does not know it. You misunderstand information that you get from NTP.
NTP knows, because I have seen it somewhere, what is the difference between the local clok and the "correct time", and the margin of error for that figure.
Here you have root dispersion (i.e. "precision") in milliseconds.:
host:~ # ntpq -c 'rv 0 rootdisp' rootdisp=128.295
Ok, that's better. It is 128 mS off, right?
No. It means that NTP cannot estimate correct time with better accuracy than 128ms. System may be having exactly correct time but NTP in this configuration has no way to reliably know it.
Ok, I understand.
On my 24*7 miniserver:
Isengard:~ # ntpstat ; ntpq -c 'rv 0 rootdisp' synchronised to NTP server (194.80.204.184) at stratum 2 time correct to within 34 ms polling server every 1024 s rootdisp=6.888 Isengard:~ # ntpstat ; ntpq -c 'rv 0 rootdisp' synchronised to NTP server (194.80.204.184) at stratum 2 time correct to within 35 ms polling server every 1024 s rootdisp=7.128 Isengard:~ #
My desktop:
Telcontar:~ # ntpstat ; ntpq -c 'rv 0 rootdisp' synchronised to NTP server (85.199.214.102) at stratum 2 time correct to within 26 ms polling server every 1024 s rootdisp=4.773 Telcontar:~ # ntpstat ; ntpq -c 'rv 0 rootdisp' synchronised to NTP server (85.199.214.102) at stratum 2 time correct to within 26 ms polling server every 1024 s rootdisp=4.788 Telcontar:~ #
Results do not match. But frankly, ntpstat yields a result far easier to read.
Well, so it is quite possible that there are multiple implementations of ntpstat and each implementation chose to use different variables. Which basically makes usefulness of it exactly nil.
It is also possible that ntpstat takes root dispersion from current synchronization source. My command gives "system variable", and I am not sure whether it is the same. You would need to check per-peer variables.
I am also not sure what you need this information for. You seem to misinterpret result anyway.
What I want to know is how correct is the local clock time, how big is the difference between the (estimated) difference between my local time and a GPS clock. If it says "time correct to within 26 ms" that is exactly what I want to know. So if I do: Isengard:~ # ntpstat ; ntpq -c 'rv 0 rootdisp' ; echo ; date --iso-8601=ns synchronised to NTP server (194.80.204.184) at stratum 2 time correct to within 33 ms polling server every 1024 s rootdisp=5.464 2020-01-10T19:38:30,476296732+01:00 Isengard:~ # I know that I can trust the seconds to be 0.479±0.033 Seconds. If it says "within one second" I know that there is some little problem, perhaps it is catching up. I know that "time correct to within 26 ms" should estimate my difference and my error and that of the chain of references clocks used till it gets to a GPS clock out there, and I hope the command does that correctly. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)