Re: [chrony-users] Dealing with SNTP sources

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


Am 2011-05-04 20:04, schrieb Bill Unruh:
> On Wed, 4 May 2011, Harald Krammer wrote:
> 
>> Hello,
>> I have a question about dealing with SNTP sources.
>>
>> when I interact with two SNTP servers (also named as NTP server),
> 
> An sntp server must, AFAIK be a stratum 0 server.
> 

Really? My opinion is, that the stratum behavior is equal. SNTP means  a
usage of simple algorithm. e.g. only hard time set after a query
Some  SNTP implementation are extremely inaccurate.  In my area NTP is
also used over GPRS connections ( round trip delay till 100 ms - 2 s).
Accuracy does not play a major role in some applications.


>> then it's hard to find a solution to prevent the case of 'no majority'.
>> The most (S)NTP devices solved this problem with selecting of one
>> primary time source and one backup time source . More cannot be
>> adjusted.
>>
>> I did it with following setting:
>> server <server-1-ip> iburst minpoll 6 maxpoll 8 prefered
>> server <server-2-ip> iburst minpoll 6 maxpoll 8 minstratum 8
>>
>> The option 'prefered' didn't help, but lowering of stratum was
>> a solution to prevent the case of 'no majority'.
>>
>> With following settings:
>> server <server-1-ip> iburst minpoll 6 maxpoll 8 prefered
>> server <server-2-ip> iburst minpoll 6 maxpoll 8
>>
>> I got 'Can't synchronise: no majority' and here is my traces:
> 
> Recall that 2 servers is a worst case situation. If they disagree, noone
> can
> say which is correct. You need three at least.
> 
> 
>>
>> sources.c:324:(SRC_SetSelectable)[04-14:40:35] 10.126.9.246
>> sources.c:302:(SRC_AccumulateSample)[04-14:40:35] ip=[10.126.9.246] t=Wed
>> 05/04/11 14:40:35.145764 ofs=-0.003653 del=0.000741 disp=0.000629 str=2
>> sourcestats.c:574:(SST_GetSelectionData)[04-14:40:35] n=4 off=0.000498
>> del=0.000897 dis=0.001328 var=0.000000 pdist=0.001318 avoff=-0.000005
>> avok=1 selok=1
>> sourcestats.c:574:(SST_GetSelectionData)[04-14:40:35] n=4 off=-0.003653
>> del=0.000741 dis=0.000632 var=0.000000 pdist=0.001000 avoff=-0.004032
>> avok=1 selok=1
>> sources.c:624:(SRC_SelectSource)[04-14:40:35] Can't synchronise: no
>> majority
>>
>> 210 Number of sources = 2
>> MS Name/IP address   Stratum Poll LastRx Last sample
>> =================================================================
>> ^x 10.126.9.245       2    6     33    +20ns[-1669us] +/-  398us
>> ^x 10.126.9.246       2    6     33  -4332us[-4332us] +/-  857us
> 
> The intervals do not overlap. It cannot figure out which is best. Trying to
> force something is silly, since you cannot figure out what the right one to
> force is. Use three servers.
> 
> 
>>
>> After a while is again synchronized
>> 210 Number of sources = 2
>> MS Name/IP address Stratum Poll LastRx Last sample
>> ===============================================================
>> ^* 10.126.9.245      2    6     50   -111us[ -278us] +/-  378us
>> ^+ 10.126.9.246      2    6     49   +737us[ +737us] +/-  521us
> 
> Now they overlap (just barely) .
> 
>>
>> After 2..3 min again: Can't synchronise: no majority
>> 210 Number of sources = 2
>> MS Name/IP address  Stratum Poll LastRx Last sample
>> ================================================================
>> ^x 10.126.9.245       2    6      4   -403us[ -403us] +/-  529us
>> ^x 10.126.9.246       2    6      2  +2207us[+2207us] +/-  353us
> 
> And now they do not. Get a third source so you and it can figure out
> which is the bad source.
> 
> 
>>
>> and so on
>>
>> =======================================================================
>>   Date (UTC) Time     IP Address   St   Freq ppm   Skew ppm     Offset
>> =======================================================================
>> 2011-05-04 14:40:28 0.0.0.0          0     19.521     42.166  0.000e+00
>> 2011-05-04 14:40:33 10.126.9.246     3     19.521     42.166 -2.127e-03
>> 2011-05-04 14:40:34 10.126.9.245     3     19.521     42.166  4.087e-03
>> 2011-05-04 14:40:35 0.0.0.0          0     19.521     42.166  0.000e+00
>> 2011-05-04 14:41:39 10.126.9.245     3     -0.505     50.104 -1.669e-03
>> 2011-05-04 14:41:40 0.0.0.0          0     -0.505     50.104  0.000e+00
>> 2011-05-04 14:42:43 10.126.9.245     3     -9.630     15.559 -8.059e-04
>> 2011-05-04 14:42:45 0.0.0.0          0     -9.630     15.559  0.000e+00
>> 2011-05-04 14:43:49 10.126.9.245     3    -11.892      9.416 -3.936e-04
>> 2011-05-04 14:44:53 10.126.9.245     3    -12.749      5.457 -1.671e-04
>> 2011-05-04 14:45:57 0.0.0.0          0    -12.749      5.457  0.000e+00
>> 2011-05-04 14:49:11 10.126.9.246     3    -12.434      8.937  5.796e-03
>> 2011-05-04 14:50:16 10.126.9.246     3    -11.686     15.050  6.131e-04
>> 2011-05-04 14:51:19 10.126.9.245     3     -1.017     27.162  1.354e-04
>> 2011-05-04 14:52:20 0.0.0.0          0     -1.017     27.162  0.000e+00
>> 2011-05-04 14:52:25 10.126.9.245     3     -1.017     27.162  2.711e-04
>>
>>
>> The solution 'minstratum 8' is fine for me. The behavior
>> without setting of minstratum was unclear for me.
>> Is it explainable?
> 
>>

Thank you for your explanation.

Nice greetings,
Harald




-- 

Harald Krammer

Mobil +43.(0) 664. 130 59 58
Mail: Harald.Krammer (at) hkr.at

---
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/