Re: [chrony-users] Force immediate verification of NTP server status |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: chrony-users@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-users] Force immediate verification of NTP server status
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Thu, 24 Aug 2023 07:15:49 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692854152; 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=OEdidOR5wWjYTVM8MZJ6F5d0Yyx7rnwgs48gNSQ27Lg=; b=eILQ5OA9iFw+buFJwnqsadItkY6M1zX6KxYFv9QJBNoZbKDjvYgefvFDLM551xW5bmSYNe EZ6hWyBkcRL9yqxFzTcrycMBJHoMxydnx5JwciFS0C9j5MbtljwVqNxxDCqRmVXNYDa5+2 mcJGBrPzE29B9NWDmN+olD5KebxAQwo=
On Wed, Aug 23, 2023 at 04:32:04PM -0700, Thangalin wrote:
> It seems chrony takes non-deterministic time of approximately 1 second to
> determine that the NTP server is offline.
>
> Can we force chronyd to refresh its state immediately, such that upon
> returning from the request (or command) the State is guaranteed Selectable
> for a valid connection and Nonselectable when severed?
Selectable and Nonselectable are only loosly related to reachability.
chronyc commands cannot be blocking due to the server side of the
protocol being stateless.
If you expect responses to all requests (e.g. in local network),
I think the best thing can do is to poll ntpdata and wait for
"Transmitted messages" to increase by 2 while "Received valid
messages" stays the same. Increase by 1 is not sufficient as you could
be polling in the middle of the NTP exchange.
> Do we need to call something similar to the following:
>
> chronyc -m 'burst 3/3' 'makestep 0.1 3'
makestep shouldn't make a difference for you. burst still has an
initial delay of at least 0.2 seconds and it doesn't block, but it
should shorten the time needed send two requests.
--
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.