Re: [chrony-users] Understanding Chrony SOCK time sample "not valid age" |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: chrony-users@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-users] Understanding Chrony SOCK time sample "not valid age"
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Thu, 2 Sep 2021 15:03:46 +0200
- Authentication-results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mlichvar@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630587838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eiB0llhvJeILBfsbGAVVk1fTQrt3Xyt5xao5cM6DEyY=; b=Ryomjsn3f1QqKUQ38qO0Mltc26jB4tLAkOB5WDa/9KQGXotXJmKJxZ0N0+85zlnU9XUPpG nW5MV0q8AizcE0M5XWs9W7UhxVSPB7ZgdZGffXGm8V6/5DDrFO6Vcj3vQnPvofdTuX2vei 9KPIg45o5akSjpsbY8xLsbPMEO3zYPU=
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.