[no subject]

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


Thanks and Regards,
Bhushan J.

-----Original Message-----
From: Bill Unruh [mailto:unruh@xxxxxxxxxxxxxx]=20
Sent: Thursday, May 12, 2016 6:55 PM
To: chrony-users@xxxxxxxxxxxxxxxxxxxx
Subject: RE: [chrony-users] Multiple interfaces is possible?


On Wed, 11 May 2016, Jahagirdar, Bhushan wrote:

> Hi Miroslav,
>
> Thanks for the reply.
> My second question about limiting samples is nothing to do with the bug.
> Question <1>
> Let me put the question in other way. chronyd accepts "n" number of=20
> samples before it actually updates the time. How can this "n" be=20
> configured? How does chronyd decides upon how many samples it needs to=20
> come to conclusion

Chrony does a least squares fit to the data to determine the offset and rat=
e.
Thus it needs at least 3 samples to do that. It tests whether the a linear =
fit is a reasonable approximation (by looking at the number of changes in s=
ign of the difference of the measured offsets from the fit line seem to be =
randomly
distributed) and if not, it reduces the number of samples (thowing out the =
old ones). Thus in the ideal case the number of samples used will grow to a=
 max of something like 64.This reduces the variance.

> that the source data is authentic and system time should be set?

3. But chrony does not step the clock. It slews it, rapidly if necessary.
makestep introduces the danger of back steps which can have very bad effect=
s on the filesystem.

> My assumption is makestep is one of the configuration that can make chron=
yd jump to the expected time. I have used "makestep 1000 -1" in the configu=
ration so that there should not be gradual change as system time could be s=
et to epoch. But still chronyd takes in many samples (approx 35) to set the=
 system time.
>
chrony for the PPS gets one sample for every 16PPS samples (poll of 4) thro=
wing out about 40% of the samples which are furthest from the median to sto=
p "popcorn" erors from causing trouble. Thus it will take about 48 PPS samp=
les to collect the 3 inputs needed. I do not know if you can reduce the pol=
l to less than 4 (16 sec)

> Question <2>
> With the workaround I am able to feed data from multiple sources. Please =
consider below logs for my question below:
> 1970-01-01T00:00:04Z chronyd version DEVELOPMENT starting (+CMDMON=20
> +NTP +REFCLOCK +RTC +PRIVDROP -SCFILTER -SECHASH +ASYNCDNS +IPV6=20
> -DEBUG) 1970-01-01T00:00:04Z commandkey directive is no longer=20
> supported 1970-01-01T00:00:04Z Could not open keyfile=20
> /etc/chrony/chrony.keys 1970-01-01T00:00:04Z Frequency 0.000 +/-=20
> 1000000.000 ppm read from /var/log/chrony/chrony.drift=20
> 1970-01-01T00:00:52Z Selected source SOC2 1970-01-01T00:00:52Z System=20
> clock wrong by 1609373625.736444 seconds, adjustment started=20
> 2020-12-31T00:14:38Z System clock was stepped by 1609373625.736444=20
> seconds 2020-12-31T00:14:54Z Can't synchronise: no majority
>
> What does this mean? "Can't synchronise: no majority".

chrony looks at the various sources to see if they agree about what the tim=
e is. With 2 sources, it is really hard to get a majority. 1 or 3 sources a=
re needed (3 to outvote one bad source)


>
> --
> Thanks and Regards,
> Bhushan J.
>
> -----Original Message-----
> From: Miroslav Lichvar [mailto:mlichvar@xxxxxxxxxx]
> Sent: Wednesday, May 11, 2016 2:14 PM
> To: chrony-users@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [chrony-users] Multiple interfaces is possible?
>
> On Wed, May 11, 2016 at 07:01:17AM +0000, Jahagirdar, Bhushan wrote:
>> Attached strace log and config file that I am using.
>> Chrony version I tried: 2.2.1
>
> Thanks. In the log chronyd is trying to read the SOCK sample from a wrong=
 file descriptor. That fails, select() returns that there are still data wa=
iting on the right descriptor, chronyd tries to read from the wrong descrip=
tor again, and this runs in an infinite loop.
>
> It looks like the problem is with the reallocation of the first SOCK refc=
lock instance. When the second SOCK instance is added, the pointer that the=
 scheduler is using for the first instance becomes invalid.
> This bug was apparently introduced in 2.0.
>
> I'm not sure what's the best way to fix it yet. As a workaround you can a=
dd two more refclocks before the real refclocks to prevent chronyd from rea=
llocating the third refclock instance. E.g.
>
> refclock SOCK /var/run/chrony/chrony.dummy1.sock
> refclock SOCK /var/run/chrony/chrony.dummy2.sock
> refclock SOCK /var/run/chrony/chrony.ttyS1.sock refclock SOCK=20
> /var/run/chrony/chrony.ttyS2.sock
>
>> --------------------------------
>>
>> Also, I would like to know how can the minimum sampling limit be set for=
 chronyd?
>> I am using makestep as below with the assumption that system is set to e=
poch.
>> makestep 1000 -1
>>
>> Still the number of samples being analyzed are many. How to reduce this?
>
> I'm not sure which samples do you want to limit. Is this related to the b=
ug described above which causes an infinite loop?
>
> --
> Miroslav Lichvar
>
> --
> 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.
>
>
> --
> 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.
>

--
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.


-- 
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/