Re: [chrony-users] Understanding Chrony SOCK time sample "not valid age"

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


Ah!!!! Thank you!!!!

On Thu, Sep 2, 2021 at 9:04 AM Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
On Thu, Sep 02, 2021 at 07:36:15AM -0400, Chris McKenzie wrote:
> I checked again and to me (please correct me if I'm wrong) the Chrony SOCK
> support is to allow for an alternative reference clock to feed time samples
> into it. It's completely natural for the refclock to be different from the
> local system time. The refclock_sock.c struct describes the time message
> format, and timeval is the system time of the source, being fed into
> Chrony.

The timeval is a timestamp of the system clock, not the source.

If your source says it's 12:00:04 and the system clock where chronyd is
running says it's 12:00:00, the SOCK sample sent to chronyd needs to
have tv = 12:00:00 and offset = 4.0. If you set tv to 12:00:04,
chronyd is confused because that's in future from its point of view.

You cannot directly feed chronyd with SOCK samples from the remote
machine as it doesn't know what time it is there. That could work only
with the chronyc settime command, which gives chronyd just the
reference time and chronyd needs to compare it with the current time,
but it does that at some point later so it is not very accurate (good
enough for manual input).

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