[ntp:questions] understanding assocID and ntpq>readvar

Miroslav Lichvar mlichvar at redhat.com
Tue Jul 24 14:21:14 UTC 2018

On 2018-07-24, valizadeh.hs at gmail.com <valizadeh.hs at gmail.com> wrote:
> My questions:
> 1-how assocIDs are assinged to ntp peers?

They are assigned randomly and they cannot be predicted AFAIK.

> 2- is there any way to use Peers IP address instead? to use in "ntpq readvar"

Not addresses, but indexes. E.g. ntpq -c as -c 'rv &1' to get the
variables of the first association.

> 3- why ((ntpq -c "rv 23023 status")) don't work?

I guess it's because associd and status are not variables returned as
data in mode 6 packets, but they have their own special fields in the
packets. I'm not sure if it's possible to get them from ntpq separately
from the real variables.

Miroslav Lichvar

More information about the questions mailing list