On 2016-04-03 19:32, Frank Wayne wrote:
I'm trying to understand what the fields in the protostats file are
and there are a couple of items for which the documentation (the
"Event Messages and Status Words" page) is unhelpful. Below is the
example event given on the "Monitoring Commands and Options" page of
the documentation, for the sake of discussion.

49213 525.624 128.4.1.1 963a 8a message

963a is the "status word". I assume this is the "peer status word",
the same as in peerstats, and not the "system status word", which
doesn't seem to show up in any stats files as far as I can tell. Can
anyone confirm that this can always be decoded as a "peer status
word" (status:select:count:code)?

It's a peer status word unless the address is 0.0.0.0, when it's a
system status word, or the event nibble is 0xb clock event, when the
message is a clock event message.
You will only see these messages in the log if you have enabled high
logging levels e.g. "logconfig =allall" in ntp.conf, or in protostats,
and usually only at startup.
If you see them at other times, it is likely to be a serious network
or refclock problem, or other exceptional event, such as a leap second.

8a is the "event message code" and is not described anywhere as far
as I can tell. The least significant nybble always seems to be the
same as the least significant nybble of the imprecisely-named "status
word", as does the most significant bit, but I don't have enough
samples to make any conclusions. Does anyone know what this is?

All peer event message codes are ored with 0x80 and all crypto event
message codes are ored with 0x100 to distinguish them from system and
clock events. See the source:
    egrep 'EVNT_|_EVENT' **/include/ntp{,_crypto}.h.

Most of the peer messages have event message codes:
   81 mobilize
    83 unreachable
   84 reachable
   8a sys_peer

Selected sample startup log and protostats entries stripping 81 and 84:

...ntpd[3360]: 0.0.0.0 c01e 0e TAI 36 leap 201507010000 expire 201612280000
...ntpd[3360]: 0.0.0.0 c016 06 restart
...ntpd[3360]: 0.0.0.0 c012 02 freq_set ntpd 1.010 PPM
...ntpd[3360]: GPS_NMEA(4) 802b 8b clock_event clk_no_reply
...ntpd[3360]: 216.228.192.69 903a 8a sys_peer
...ntpd[3360]: 0.0.0.0 c61c 0c clock_step +3.424864 s
...ntpd[3360]: 0.0.0.0 c614 04 freq_mode
...ntpd[3360]: 0.0.0.0 c618 08 no_sys_peer
...ntpd[3360]: GPS_NMEA(4) 904a 8a sys_peer

57470 1547.977 0.0.0.0 c01e 0e TAI 36 leap 201507010000 expire 201612280000
57470 1548.008 0.0.0.0 c016 06 restart
57470 1548.008 0.0.0.0 c012 02 freq_set ntpd 1.010 PPM
57470 1548.008 GPS_NMEA(4) 802b 8b clock_event clk_no_reply
57470 1555.832 216.228.192.69 903a 8a sys_peer
57470 1555.832 0.0.0.0 c61c 0c clock_step +3.424864 s
57470 1562.008 0.0.0.0 c614 04 freq_mode
57470 1562.008 0.0.0.0 c618 08 no_sys_peer
57470 1567.207 GPS_NMEA(4) 904a 8a sys_peer

--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
_______________________________________________
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Reply via email to