[ntp:questions] Significance of "space" in the ntpq -p display

Dave Hart davehart at gmail.com
Thu Mar 12 19:49:47 UTC 2009

On Mar 11, 6:28 pm, "David J Taylor" <david-tay... at blueyonder.neither-
this-bit.nor-this.co.uk> wrote:
> Folks,
> I'm seeing an ntpq -p display like:
> *  server-A  377
>    server-B  377
>    server-C  377
> i.e. server B and C have a space rather than any other character.  Those
> servers are fine, but they are both actually syncing from server A.  Space
> appears to be defined as:
> "The peer is discarded as unreachable, synchronized to this server (synch
> loop) or outrageous synchronization distance."
> Should:  "synchronized to this server's source" also be in that list?

It appears so.  The relevant code is peer_unfit() in ntp_proto.c,
which in 4.2.4p6 has

	 * A loop error occurs if the remote peer is synchronized to the
	 * local peer of if the remote peer is synchronized to the same
	 * server as the local peer, but only if the remote peer is not
	 * the orphan parent.
	if (peer->stratum > 1 && peer->refid != htonl(LOOPBACKADR) &&
	    ((!peer->dstadr || peer->refid == peer->dstadr->addr_refid) ||
	    peer->refid == sys_refid))
		rval |= TEST12;		/* synch loop */

The peer->refid == sys_refid test is what is presumably firing in your
case.  If you look at the association for one of the two showing "
" (reject) using ntpq -c "rv assocID" you should see 0x800 set in the
flash= value.  TEST12 == 0x800.

It looks like you've found a documentation omission.

Dave Hart

More information about the questions mailing list