Re: [chrony-users] check_ntp_peer with Chrony |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
On Thu, Jan 18, 2018 at 11:34:34PM +0100, Daniele Palumbo wrote:
> What i would like to have, is a different way then `chronyc sources` output parsing (regexp?). Something more close to a protocol call/api approach.
> Therefore i think chronyc protocol to call chronyd directly -- dunno if this is really possible to ask only for some data.
FWIW, parsing the csv output (-c option) is pretty straight forward.
In bash you could get the address and reachability with something like
this:
chronyc -c sources | while IFS=, read t s addr stratum poll reach rest; do
echo $addr $reach
done
But I agree this is not ideal. The plan is to provide a library that
could be used by C applications and later maybe add some bindings
for other languages.
--
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.