I've done ntpq
, then ran associations
and received the following:
ind assid status conf reach auth condition last_event cnt
===========================================================
1 12097 c811 yes none yes reject mobilize 1
From the documentation from man ntp-decode
(Peer Status), I've learned that the first digit indicates Status
, the second Select
, the third Count
, and the fourth Code
.
I've tried to find the Select Status
section of this manual and found the following:
The Select Field displays the current selection status. (The T Field in the following table gives the corresponding tally codes used in the ntpq peers dis-
play.) The values are coded as follows:
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
| Code | Message | T | Description |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
| 0 | sel_reject | | discarded as not valid (TEST10-TEST13) |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
| 1 | sel_falsetick | x | discarded by intersection algorithm |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
| 2 | sel_excess | . | discarded by table overflow (not used) |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
| 3 | sel_outlyer | - | discarded by the cluster algorithm |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
| 4 | sel_candidate | + | included by the combine algorithm |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
| 5 | sel_backup | # | backup (more than tos maxclock sources) |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
| 6 | sel_sys.peer | * | system peer |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
| 7 | sel_pps.peer | o | PPS peer (when the prefer peer is valid) |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
So, what does the 8
digit for Select Status
mean?
The explanation of peer status codes in the docs says that the status field "is 5 bits wide, and combines with the the 3-bit-wide Select Field to create the first full byte of the peer status word." The select field is 3 bits, so it can only have the values 0-7. The 8 in the 2nd digit is the least-significant bit in the status field, not the most-significant bit in the select field.
So
c8
means "persistent association", "authentication enabled", and "broadcast association" (bits 0, 1, and 4, counting big-endian). You can getntpq
to interpret these fields for you by using thereadvar
command. Here's an example from my laptop, which is configured to use[0-3].ubuntu.pool.ntp.org
inpool
mode:Note the "conf" (permanently-configured association) and "bcast" (broadcast association), which are short interpretations of the status field. (Apparently broadcast can mean more than just broadcast when it has a refid of POOL.)