Hi Miroslav,

Thanks a lot!

Yes, my program was feeding samples with zero offset. I corrected this and now 
behavior is as expected.

I have another query. Currently, my program sends samples to the SOCK every 5 
seconds. With this setup, chronyd selects this source after approximately 2 
minutes. When I increase the frequency to every second, chronyd selects the 
source in about 40 seconds. Are there any additional configuration options to 
further reduce this time? I understand that various factors, such as the 
precision of the samples, influence this process, so I am looking for any 
configuration parameters that could expedite the selection.

My current configuration is:
logchange 0.5
noclientlog
rtcsync
makestep 1.0 3
refclock SOCK /var/run/chrony.cellular.sock precision 1 prefer poll 3 refid MODM

(I tried reducing the poll to 1 but this does not seem to make any difference)

Thanks,
Amol


________________________________
From: Miroslav Lichvar <mlich...@redhat.com>
Sent: Tuesday, July 30, 2024 5:46 PM
To: chrony-users@chrony.tuxfamily.org <chrony-users@chrony.tuxfamily.org>
Subject: Re: [chrony-users] Using cellular network clock as refclock in chrony

On Tue, Jul 30, 2024 at 12:05:29PM +0000, Amol Lad wrote:
> Currently, my system time is about 30 seconds ahead of the time received from 
> the cellular provider, and it appears that chronyd is not updating the system 
> time with the time received on the SOCK. I'm unsure what I'm doing wrong. Any 
> suggestions would be greatly appreciated.

>From the debug log it looks like your program is feeding chronyd
samples with zero offset. The sample time is supposed to be the system
clock when the sample is made and the offset is supposed to be the
difference between the reference clock and system clock.

--
Miroslav Lichvar


--
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.

________________________________
The information in this email communication (inclusive of attachments) is 
confidential to 4RF Limited and the intended recipient(s). If you are not the 
intended recipient(s), please note that any use, disclosure, distribution or 
copying of this information or any part thereof is strictly prohibited and that 
the author accepts no liability for the consequences of any action taken on the 
basis of the information provided. If you have received this email in error, 
please notify the sender immediately by return email and then delete all 
instances of this email from your system. 4RF Limited will not accept 
responsibility for any consequences associated with the use of this email 
(including, but not limited to, damages sustained as a result of any viruses 
and/or any action or lack of action taken in reliance on it).

Reply via email to