Re: [chrony-users] Chrony not taking SOCKET data from Application

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


Hi Miroslav,

My Implementation is as below:
- We have external RTC, which is used to sync system time on initialization based on 1PPS from external RTC
- And on receiving GNSS 3D fix, the GPS UTC time is sent to chrony over Unix Domain Socket.
- And we sync RTC for every 10 seconds on GNSS 1PPS (so that RTC is close to the UTC time in seconds)

So Reading from RTC on initialization may have a worst case drift of 10ms. And writing to RTC on GNSS 1PPS may have a drift of another 10ms. Assuming the another drift of 5ms on writing and reading from RTC, a total of approximately 30ms should be the offset detected by chrony right. But I see more than 30ms.

> If you see the offset again after chronyd restart, it means there is
> something else touching the clock. Maybe chronyd is started with the
> -s option to set the clock from RTC?
Yes if I restart chrony, I still see offset. Chrony is not started with RTC. Chrony starts syncing when it starts receiving the GPS UTC time on Unix Domain Socket.

Can you please support on debugging what can be the issue.

Thanks & Regards
Sarveshwar.K

On Wed, May 3, 2023 at 12:46 PM Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
On Wed, May 03, 2023 at 12:25:53PM +0530, sarveshwar k wrote:
> Hi Miroslav,
>
> > The measurement appears before you sent anything to the SOCK socket?
> Yes, before I sent anything to the SOCK.

I don't see that in the logs. The first SOCK sample in refclocks.log is
at "2023-01-01 04:27:32.008264". The first clock update in tracking.log is
"2023-01-01 04:27:35" with an offset of 53 milliseconds. That is the
initial offset you would see in the "chronyc sources" output before
the third sample is received and the clock is updated.

If you see the offset again after chronyd restart, it means there is
something else touching the clock. Maybe chronyd is started with the
-s option to set the clock from RTC?

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



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