Re: [chrony-users] ntpq-like queries using chronyc

[ Thread Index | Date Index | More Archives ]

Sorry I did a terrible work in explaining myself..
I have an ntp server that is not a chronyd daemon and is not known to my locally running chronyd,
I can query external-ntp.localnet for a list of its known peers with:
$ ntpq -n -cpeers external-ntp.localnet

If I try to do the same thing with chronyc
$ chronyc -h external-ntp.localnet sources -a -v
I get a 'Could not open connection to daemon'.

The manpage suggests that chronyc is only able to talk to chronyd, is it true?
googling I found out this:
$ chronyd -Q 'server iburst'
that can print the time offset between local clock and a remote ntp source that is not necessarily (well... obviously) a chronyd server.
can I accomplish something else with the -Q option? the chronyd manpage suggest that I can't, but is there some hackish way to query a non-chronyd ntp external server in the way I described above? or should I rely on some different tool?

On Thu, Jun 9, 2022 at 2:54 PM andrei tudor corduneanu <x7uplime@xxxxxxxxx> wrote:
ok, I see that
$ chronyc sources -a -v
displays information about time sources for the locally running chronyd.
The ntp server I'm trying to reach is not a chronyd daemon and is not local. (sorry.. I should've mention this)
The out: "Could not open connection to daemon"

On Thu, Jun 9, 2022 at 2:26 PM chengyechun <chengyechun1@xxxxxxxxxx> wrote:

Do you want to enumerate all time sources, chronyc sources -a -v may work, and will indicate which time sources are which types


发件人: andrei tudor corduneanu [mailto:x7uplime@xxxxxxxxx]
发送时间: 202269 21:20
收件人: chrony-users@xxxxxxxxxxxxxxxxxxxx
主题: [chrony-users] ntpq-like queries using chronyc


I was looking for a way to get the list of peers known to an ntp server and some of their stats, the ntpq command I'd like to replicate is:

$ ntpq -n -cpeers ntp-srv.local

Is there any way to do that with chronyd/chronyc ?

Can chronyc make all the possible queries of ntpq?

Mail converted by MHonArc 2.6.19+