SysTutorials

Man Pages › Section 5

ntp_decode(5)

ntp_decode – ntpd Event Messages and Status Words

 

Introduction

This page lists the status words, event messages and error codes used for ntpd reporting and monitoring. Status words are used to display the current status of the running program. There is one system status word and a peer status word for each association. There is a clock status word for each association that supports a reference clock. There is a flash code for each association which shows errors found in the last packet received (pkt) and during protocol processing (peer). These are commonly viewed using the ntpq program.

Significant changes in program state are reported as events. There is one set of system events and a set of peer events for each association. In addition, there is a set of clock events for each association that supports a reference clock. Events are normally reported to the protostats monitoring file and optionally to the system log. In addition, if the trap facility is configured, events can be reported to a remote program that can page an administrator.

This page also includes a description of the error messages produced by the Autokey protocol. These messages are normally sent to the cryptostats monitoring file.

In the following tables the Code Field is the status or event code assigned and the Message Field a short string used for display and event reporting. The Description field contains a longer explanation of the status or event. Some messages include additional information useful for error diagnosis and performance assessment.

System Status Word

The system status word consists of four fields LI (0-1), Source (2-7), Count (8-11) and Code (12-15). It is reported in the first line of the rv display produced by the ntpq program.

 Leap  SourceCountCode

The Leap Field displays the system leap indicator bits coded as follows:

 Code  MessageDescription
 0  leap_nonenormal synchronized state
 1  leap_add_secinsert second after 23:59:59 of the current day
 2  leap_del_secdelete second 23:59:59 of the current day
 3  leap_alarmnever synchronized

The Source Field displays the current synchronization source coded as follows:.

 Code  MessageDescription
 0  sync_unspecnot yet synchronized
 1  sync_ppspulse-per-second signal (Cs, Ru, GPS, etc.)
 2  sync_lf_radioVLF/LF radio (WWVB, DCF77, etc.)
 3  sync_hf_radioMF/HF radio (WWV, etc.)
 4  sync_uhf_radioVHF/UHF radio/satellite (GPS, Galileo, etc.)
 5  sync_locallocal timecode (IRIG, LOCAL driver, etc.)
 6  sync_ntpNTP
 7  sync_otherother (IEEE 1588, openntp, crony, etc.)
 8  sync_wristwatcheyeball and wristwatch
 9  sync_telephonetelephone modem (ACTS, PTB, etc.)

The Count Field displays the number of events since the last time the code changed. Upon reaching 15, subsequent events with the same code are ignored.

The Event Field displays the most recent event message coded as follows:

 Code  MessageDescription
 00  unspecifiedunspecified
 01  freq_not_setfrequency file not available
 02  freq_setfrequency set from frequency file
 03  spike_detectspike detected
 04  freq_modeinitial frequency training mode
 05  clock_syncclock synchronized
 06  restartprogram restart
 07  panic_stopclock error more than 600 s
 08  no_system_peerno system peer
 09  leap_armedleap second armed from file or Autokey
 0a  leap_disarmedleap second disarmed
 0b  leap_eventleap event
 0c  clock_stepclock stepped
 0d  kernkernel information message
 0e  TAI…leapsecond values update from file
 0f  stale leapsecond valuesnew NIST leapseconds file needed
  10  clockhopspurious clock hop suppressed

Peer Status Word

The peer status word consists of four fields: Status (0-4), Select (5-7), Count (8-11) and Code (12-15). It is reported in the first line of the rv associd display produced by the ntpq program.

 Status  SelectCountCode

The Status Field displays the peer status code bits in hexadecimal; each bit is an independent flag. (Note this 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 meaning of each bit in the Status Field is listed in the following table:

 Code  MessageDescription
 08  bcstbroadcast association
 10  reachhost reachable
 20  authenbauthentication enabled
 40  authauthentication ok
 80  configpersistent association

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 display.) The values are coded as follows:

 Code  MessageTDescription
 0  sel_rejectdiscarded as not valid (TEST10-TEST13)
 1  sel_falsetickxdiscarded by intersection algorithm
 2  sel_excess46discarded 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.peeroPPS peer (when the prefer peer is valid)

The Count Field displays the number of events since the last time the code changed. Upon reaching 15, subsequent events with the same code are ignored.

The Event Field displays the most recent event message coded as follows:

 Code  MessageDescription
 01  mobilizeassociation mobilized
 02  demobilizeassociation demobilized
 03  unreachableserver unreachable
 04  reachableserver reachable
 05  restartassociation restart
 06  no_replyno server found (ntpdate mode)
 07  rate_exceededrate exceeded (kiss code RATE)
 08  access_deniedaccess denied (kiss code DENY)
 09  leap_armedleap armed from server LI code
 0a  sys_peerbecome system peer
 0b  clock_eventsee clock status word
 0c  bad_authauthentication failure
 0d  popcornpopcorn spike suppressor
 0e  interleave_modeentering interleave mode
 0f  interleave_errorinterleave error (recovered)
 10  TAI…leapsecond values update from server

Clock Status Word

The clock status word consists of four fields: Unused (0-7), Count (8-11) and Code (12-15). It is reported in the first line of the clockvar associd display produced by the ntpq program.

 Unused  CountCode

The Count Field displays the number of events since the last lockvar command, while the Event Field displays the most recent event message coded as follows:

 Code  MessageDescription
 00  clk_unspenominal
 01  clk_noreplyno reply to poll
 02  clk_badformatbad timecode format
 03  clk_faulthardware or software fault
 04  clk_bad_signalsignal loss
 05  clk_bad_datebad date format
 06  clk_bad_timebad time format

When the clock driver sets the code to a new value, a clock_alarm (11) peer event is reported.

Flash Status Word

The flash status word is displayed by the ntpq program rv command. It consists of a number of bits coded in hexadecimal as follows:

 Code  TagMessageDescription
 0001  TEST1pkt_dupduplicate packet
 0002  TEST2pkt_bogusbogus packet
 0004  TEST3pkt_unsyncprotocol unsynchronized
 0008  TEST4pkt_deniedaccess denied
 0010  TEST5pkt_authbad authentication
 0020  TEST6pkt_stratumbad synch or stratum
 0040  TEST7pkt_headerbad header
 0080  TEST8pkt_autokeybad autokey
 0100  TEST9pkt_cryptobad crypto
 0200  TEST10peer_stratumpeer bad synch or stratum
 0400  TEST11peer_distpeer distance exceeded
 0800  TEST12peer_looppeer synchronization loop
 1000  TEST13peer_unreachpeer unreachable

Kiss Codes

Kiss codes are used in kiss-o’-death (koD) packets, billboard displays and log messages. They consist of a string of four zero-padded ASCII charactes. In practice they are informal and tend to change with time and implementation. Some of these codes can appear in the reference identifier field in ntpq billboards. Following is the current list:

 Code  Description
 ACST  manycast server
 AUTH  authentication error
 AUTO  Autokey sequence error
 BCST  broadcast server
 CRYPT  Autokey protocol error
 DENY  access denied by server
 INIT  association initialized
 MCST  multicast server
 RATE  rate exceeded
 TIME  association timeout
 STEP  step time change

Crypto Messages

These messages are sent to the cryptostats file when an error is detected in the Autokey protocol.

 Code  MessageDescription
 01  bad_formatbad extension field format or length
 02  bad_timestampbad timestamp
 03  bad_filestampbad filestamp
 04  bad_public_keybad or missing public key
 05  bad_digestunsupported digest type
 06  bad_identityunsupported identity type
 07  bad_siglengthbad signature length
 08  bad signatureextension field signature not verified
 09  cert_not_verifiedcertificate signature not verified
 0a  cert_expiredhost certificate expired
 0b  bad_cookiebad or missing cookie
 0c  bad_leapsecondsbad or missing leapseconds values
 0d  cert_missingbad or missing certificate
 0e  bad_group_keybad or missing group key
 0f  proto_errorprotocol error

See Also

ntpq(8), ntp_mon(5) The official HTML documentation. This file was automatically generated from HTML source.