xref: /freebsd/contrib/ntp/ntpq/ntpq-opts.def (revision 5a5c2279813012882e59aa7bb51d50c5baba3b1e)
1/* -*- Mode: Text -*- */
2
3autogen definitions options;
4
5#include copyright.def
6#include homerc.def
7#include autogen-version.def
8
9prog-name      = "ntpq";
10prog-title     = "query Network Time Protocol servers";
11argument       = '[ host ...]';
12
13flag = {
14    name      = ipv4;
15    flags-cant = ipv6;
16    value     = 4;
17    descrip   = "Force IPv4 name resolution";
18    doc = <<-  _EndOfDoc_
19	Force resolution of following host names on the command line
20	to the IPv4 namespace.
21	_EndOfDoc_;
22};
23
24flag = {
25    name      = ipv6;
26    flags-cant = ipv4;
27    value     = 6;
28    descrip   = "Force IPv6 name resolution";
29    doc = <<-  _EndOfDoc_
30	Force resolution of following host names on the command line
31	to the IPv6 namespace.
32	_EndOfDoc_;
33};
34
35flag = {
36    name      = command;
37    value     = c;
38    arg-type  = string;
39    descrip   = "run a command and exit";
40    max       = NOLIMIT;
41    arg-name  = cmd;
42    call-proc = ntpq_custom_opt_handler;
43    doc = <<-  _EndOfDoc_
44	The following argument is interpreted as an interactive format command
45	and is added to the list of commands to be executed on the specified
46	host(s).
47	_EndOfDoc_;
48};
49
50#include debug-opt.def
51
52flag = {
53    name      = interactive;
54    value     = i;
55    flags-cant = command, peers;
56    descrip   = "Force ntpq to operate in interactive mode";
57    doc = <<-  _EndOfDoc_
58	Force @code{ntpq} to operate in interactive mode.
59	Prompts will be written to the standard output and
60	commands read from the standard input.
61	_EndOfDoc_;
62};
63
64flag = {
65    name      = numeric;
66    value     = n;
67    descrip   = "numeric host addresses";
68    doc = <<-  _EndOfDoc_
69	Output all host addresses in dotted-quad numeric format rather than
70	converting to the canonical host names.
71	_EndOfDoc_;
72};
73
74flag = {
75    name      = old-rv;
76    descrip   = "Always output status line with readvar";
77    doc = <<-  _EndOfDoc_
78	By default, @code{ntpq} now suppresses the @code{associd=...}
79	line that precedes the output of @code{readvar}
80	(alias @code{rv}) when a single variable is requested, such as
81	@code{ntpq -c "rv 0 offset"}.
82	This option causes @code{ntpq} to include both lines of output
83	for a single-variable @code{readvar}.
84	Using an environment variable to
85	preset this option in a script will enable both older and
86	newer @code{ntpq} to behave identically in this regard.
87	_EndOfDoc_;
88};
89
90flag = {
91    name      = peers;
92    value     = p;
93    descrip   = "Print a list of the peers";
94    flags-cant = interactive;
95    call-proc = ntpq_custom_opt_handler;
96    doc = <<-  _EndOfDoc_
97	Print a list of the peers known to the server as well as a summary
98	of their state. This is equivalent to the 'peers' interactive command.
99	_EndOfDoc_;
100};
101
102flag = {
103    name      = refid;
104    value     = r;
105    descrip   = "Set default display type for S2+ refids";
106    arg-type  = keyword;
107    keyword   = hash, ipv4;
108    arg-default = ipv4;
109    doc = <<-  _EndOfDoc_
110	Set the default display format for S2+ refids.
111	_EndOfDoc_;
112};
113
114flag = {
115    name      = unconnected;
116    value     = u;
117    descrip   = "Use unconnected UDP to communicate with ntpd (default on Windows)";
118    doc = <<-  _EndOfDoc_
119	Open an unconnected UDP association to ntpd (the default
120	on Windows).
121	_EndOfDoc_;
122};
123
124flag = {
125    name      = wide;
126    value     = w;
127    descrip   = "Display the full 'remote' value";
128    doc = <<-  _EndOfDoc_
129	Display the full value of the 'remote' value.  If this requires
130	more than 15 characters, display the full value, emit a newline,
131	and continue the data display properly indented on the next line.
132	_EndOfDoc_;
133};
134
135doc-section	= {
136  ds-type	= 'DESCRIPTION';
137  ds-format	= 'mdoc';
138  ds-text	= <<-  _END_PROG_MDOC_DESCRIP
139.Pp
140The
141.Nm
142utility program is used to query NTP servers to monitor NTP operations
143and performance, requesting
144information about current state and/or changes in that state.
145The program may be run either in interactive mode or controlled using
146command line arguments.
147Requests to read and write arbitrary
148variables can be assembled, with raw and pretty-printed output
149options being available.
150The
151.Nm
152utility can also obtain and print a
153list of peers in a common format by sending multiple queries to the
154server.
155.Pp
156If one or more request options is included on the command line
157when
158.Nm
159is executed, each of the requests will be sent
160to the NTP servers running on each of the hosts given as command
161line arguments, or on localhost by default.
162If no request options
163are given,
164.Nm
165will attempt to read commands from the
166standard input and execute these on the NTP server running on the
167first host given on the command line, again defaulting to localhost
168when no other host is specified.
169The
170.Nm
171utility will prompt for
172commands if the standard input is a terminal device.
173.Pp
174.Nm
175uses NTP mode 6 packets to communicate with the
176NTP server, and hence can be used to query any compatible server on
177the network which permits it.
178Note that since NTP is a UDP protocol
179this communication will be somewhat unreliable, especially over
180large distances in terms of network topology.
181The
182.Nm
183utility makes
184one attempt to retransmit requests, and will time requests out if
185the remote host is not heard from within a suitable timeout
186time.
187.Pp
188Note that in contexts where a host name is expected, a
189.Fl 4
190qualifier preceding the host name forces resolution to the IPv4
191namespace, while a
192.Fl 6
193qualifier forces resolution to the IPv6 namespace.
194For examples and usage, see the
195.Dq NTP Debugging Techniques
196page.
197.Pp
198Specifying a
199command line option other than
200.Fl i
201or
202.Fl n
203will
204cause the specified query (queries) to be sent to the indicated
205host(s) immediately.
206Otherwise,
207.Nm
208will attempt to read
209interactive format commands from the standard input.
210
211.Ss "Internal Commands"
212.Pp
213Interactive format commands consist of a keyword followed by zero
214to four arguments.
215Only enough characters of the full keyword to
216uniquely identify the command need be typed.
217.Pp
218A
219number of interactive format commands are executed entirely within
220the
221.Nm
222utility itself and do not result in NTP
223requests being sent to a server.
224These are described following.
225.Bl -tag -width "help [command]" -compact -offset indent
226.It Ic ? Op Ar command
227.It Ic help Op Ar command
228A
229.Ql \&?
230by itself will print a list of all the commands
231known to
232.Nm .
233A
234.Ql \&?
235followed by a command name will print function and usage
236information about the command.
237.It Ic addvars Ar name Ns Oo \&= Ns Ar value Oc Ns Op ,...
238.It Ic rmvars Ar name Ns Op ,...
239.It Ic clearvars
240.It Ic showvars
241The arguments to this command consist of a list of
242items of the form
243.Ar name Ns Op \&= Ns Ar value ,
244where the
245.No \&= Ns Ar value
246is ignored, and can be omitted,
247in requests to the server to read variables.
248The
249.Nm
250utility maintains an internal list in which data to be included in
251messages can be assembled, and displayed or set using the
252.Ic readlist
253and
254.Ic writelist
255commands described below.
256The
257.Ic addvars
258command allows variables and their optional values to be added to
259the list.
260If more than one variable is to be added, the list should
261be comma-separated and not contain white space.
262The
263.Ic rmvars
264command can be used to remove individual variables from the list,
265while the
266.Ic clearvars
267command removes all variables from the
268list.
269The
270.Ic showvars
271command displays the current list of optional variables.
272.It Ic authenticate Op Cm yes Ns | Ns Cm no
273Normally
274.Nm
275does not authenticate requests unless
276they are write requests.
277The command
278.Ic authenticate Cm yes
279causes
280.Nm
281to send authentication with all requests it
282makes.
283Authenticated requests causes some servers to handle
284requests slightly differently.
285The command
286.Ic authenticate
287causes
288.Nm
289to display whether or not
290it is currently authenticating requests.
291.It Ic cooked
292Causes output from query commands to be "cooked", so that
293variables which are recognized by
294.Nm
295will have their
296values reformatted for human consumption.
297Variables which
298.Nm
299could not decode completely are
300marked with a trailing
301.Ql \&? .
302.It Ic debug Op Cm more Ns | Ns Cm less Ns | Ns Cm off
303With no argument, displays the current debug level.
304Otherwise, the debugging level is changed as indicated.
305.It Ic delay Op Ar milliseconds
306Specify a time interval to be added to timestamps included in
307requests which require authentication.
308This is used to enable
309(unreliable) server reconfiguration over long delay network paths
310or between machines whose clocks are unsynchronized.
311Actually the
312server does not now require timestamps in authenticated requests,
313so this command may be obsolete.
314Without any arguments, displays the current delay.
315.It Ic drefid Op Cm hash Ns | Ns Cm ipv4
316Display refids as IPv4 or hash.
317Without any arguments, displays whether refids are shown as IPv4
318addresses or hashes.
319.It Ic exit
320Exit
321.Nm .
322.It Ic host Op Ar name
323Set the host to which future queries will be sent.
324The
325.Ar name
326may be either a host name or a numeric address.
327Without any arguments, displays the current host.
328.It Ic hostnames Op Cm yes Ns | Ns Cm no
329If
330.Cm yes
331is specified, host names are printed in
332information displays.
333If
334.Cm no
335is specified, numeric
336addresses are printed instead.
337The default is
338.Cm yes ,
339unless
340modified using the command line
341.Fl n
342switch.
343Without any arguments, displays whether host names or numeric addresses
344are shown.
345.It Ic keyid Op Ar keyid
346This command allows the specification of a key number to be
347used to authenticate configuration requests.
348This must correspond
349to the
350.Cm controlkey
351key number the server has been configured to use for this
352purpose.
353Without any arguments, displays the current
354.Ar keyid .
355.It Ic keytype Op Ar digest
356Specify the digest algorithm to use for authenticating requests, with default
357.Cm MD5 .
358If
359.Nm
360was built with OpenSSL support, and OpenSSL is installed,
361.Ar digest
362can be any message digest algorithm supported by OpenSSL.
363If no argument is given, the current
364.Ic keytype Ar digest
365algorithm used is displayed.
366.It Ic ntpversion Op Cm 1 Ns | Ns Cm 2 Ns | Ns Cm 3 Ns | Ns Cm 4
367Sets the NTP version number which
368.Nm
369claims in
370packets.
371Defaults to 3, and note that mode 6 control messages (and
372modes, for that matter) didn't exist in NTP version 1.
373There appear
374to be no servers left which demand version 1.
375With no argument, displays the current NTP version that will be used
376when communicating with servers.
377.It Ic passwd
378This command prompts you to type in a password (which will not
379be echoed) which will be used to authenticate configuration
380requests.
381The password must correspond to the key configured for
382use by the NTP server for this purpose if such requests are to be
383successful.
384.It Ic poll Oo Ar n Oc Op Cm verbose
385Poll an NTP server in client mode
386.Ar n
387times.
388Poll not implemented yet.
389.It Ic quit
390Exit
391.Nm .
392.It Ic raw
393Causes all output from query commands is printed as received
394from the remote server.
395The only formating/interpretation done on
396the data is to transform nonascii data into a printable (but barely
397understandable) form.
398.It Ic timeout Op Ar milliseconds
399Specify a timeout period for responses to server queries.
400The
401default is about 5000 milliseconds.
402Without any arguments, displays the current timeout period.
403Note that since
404.Nm
405retries each query once after a timeout, the total waiting time for
406a timeout will be twice the timeout value set.
407.It Ic version
408Display the version of the
409.Nm
410program.
411.El
412
413.Ss "Control Message Commands"
414Association ids are used to identify system, peer and clock variables.
415System variables are assigned an association id of zero and system name
416space, while each association is assigned a nonzero association id and
417peer namespace.
418Most control commands send a single message to the server and expect a
419single response message.
420The exceptions are the
421.Ic peers
422command, which sends a series of messages,
423and the
424.Ic mreadlist
425and
426.Ic mreadvar
427commands, which iterate over a range of associations.
428.Bl -tag -width "something" -compact -offset indent
429.It Ic apeers
430Display a list of peers in the form:
431.Dl [tally]remote refid assid st t when pool reach delay offset jitter
432where the output is just like the
433.Ic peers
434command except that the
435.Cm refid
436is displayed in hex format and the association number is also displayed.
437.It Ic associations
438Display a list of mobilized associations in the form:
439.Dl ind assid status conf reach auth condition last_event cnt
440.Bl -column -offset indent ".Sy Variable" "see the select field of the peer status word"
441.It Sy Variable Ta Sy Description
442.It Cm ind Ta index on this list
443.It Cm assid Ta association id
444.It Cm status Ta peer status word
445.It Cm conf Ta Cm yes : No persistent, Cm no : No ephemeral
446.It Cm reach Ta Cm yes : No reachable, Cm no : No unreachable
447.It Cm auth Ta Cm ok , Cm yes , Cm bad No and Cm none
448.It Cm condition Ta selection status \&(see the Cm select No field of the peer status word\&)
449.It Cm last_event Ta event report \&(see the Cm event No field of the peer status word\&)
450.It Cm cnt Ta event count \&(see the Cm count No field of the peer status word\&)
451.El
452.It Ic authinfo
453Display the authentication statistics counters:
454time since reset, stored keys, free keys, key lookups, keys not found,
455uncached keys, expired keys, encryptions, decryptions.
456.It Ic clocklist Op Ar associd
457.It Ic cl Op Ar associd
458Display all clock variables in the variable list for those associations
459supporting a reference clock.
460.It Ic clockvar Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
461.It Ic cv Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
462Display a list of clock variables for those associations supporting a
463reference clock.
464.It Ic :config Ar "configuration command line"
465Send the remainder of the command line, including whitespace, to the
466server as a run-time configuration command in the same format as a line
467in the configuration file.
468This command is experimental until further notice and clarification.
469Authentication is of course required.
470.It Ic config-from-file Ar filename
471Send each line of
472.Ar filename
473to the server as run-time configuration commands in the same format as
474lines in the configuration file.
475This command is experimental until further notice and clarification.
476Authentication is required.
477.It Ic ifstats
478Display status and statistics counters for each local network interface address:
479interface number, interface name and address or broadcast, drop, flag,
480ttl, mc, received, sent, send failed, peers, uptime.
481Authentication is required.
482.It Ic iostats
483Display network and reference clock I/O statistics:
484time since reset, receive buffers, free receive buffers, used receive buffers,
485low water refills, dropped packets, ignored packets, received packets,
486packets sent, packet send failures, input wakeups, useful input wakeups.
487.It Ic kerninfo
488Display kernel loop and PPS statistics:
489associd, status, pll offset, pll frequency, maximum error,
490estimated error, kernel status, pll time constant, precision,
491frequency tolerance, pps frequency, pps stability, pps jitter,
492calibration interval, calibration cycles, jitter exceeded,
493stability exceeded, calibration errors.
494As with other ntpq output, times are in milliseconds; very small values
495may be shown as exponentials.
496The precision value displayed is in milliseconds as well, unlike the
497precision system variable.
498.It Ic lassociations
499Perform the same function as the associations command, except display
500mobilized and unmobilized associations, including all clients.
501.It Ic lopeers Op Fl 4 Ns | Ns Fl 6
502Display a list of all peers and clients showing
503.Cm dstadr
504(associated with the given IP version).
505.It Ic lpassociations
506Display the last obtained list of associations, including all clients.
507.It Ic lpeers Op Fl 4 Ns | Ns Fl 6
508Display a list of all peers and clients (associated with the given IP version).
509.It Ic monstats
510Display monitor facility status, statistics, and limits:
511enabled, addresses, peak addresses, maximum addresses,
512reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
513.It Ic mreadlist Ar associdlo Ar associdhi
514.It Ic mrl Ar associdlo Ar associdhi
515Perform the same function as the
516.Ic readlist
517command for a range of association ids.
518.It Ic mreadvar Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
519This range may be determined from the list displayed by any
520command showing associations.
521.It Ic mrv Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
522Perform the same function as the
523.Ic readvar
524command for a range of association ids.
525This range may be determined from the list displayed by any
526command showing associations.
527.It Xo Ic mrulist Oo Cm limited | Cm kod | Cm mincount Ns \&= Ns Ar count |
528.Cm laddr Ns \&= Ns Ar localaddr | Cm sort Ns \&= Ns Oo \&- Oc Ns Ar sortorder |
529.Cm resany Ns \&= Ns Ar hexmask | Cm resall Ns \&= Ns Ar hexmask Oc
530.Xc
531Display traffic counts of the most recently seen source addresses
532collected and maintained by the monitor facility.
533With the exception of
534.Cm sort Ns \&= Ns Oo \&- Oc Ns Ar sortorder ,
535the options filter the list returned by
536.Xr ntpd 8 .
537The
538.Cm limited
539and
540.Cm kod
541options return only entries representing client addresses from which the
542last packet received triggered either discarding or a KoD response.
543The
544.Cm mincount Ns = Ns Ar count
545option filters entries representing less than
546.Ar count
547packets.
548The
549.Cm laddr Ns = Ns Ar localaddr
550option filters entries for packets received on any local address other than
551.Ar localaddr .
552.Cm resany Ns = Ns Ar hexmask
553and
554.Cm resall Ns = Ns Ar hexmask
555filter entries containing none or less than all, respectively, of the bits in
556.Ar hexmask ,
557which must begin with
558.Cm 0x .
559The
560.Ar sortorder
561defaults to
562.Cm lstint
563and may be
564.Cm addr ,
565.Cm avgint ,
566.Cm count ,
567.Cm lstint ,
568or any of those preceded by
569.Ql \&-
570to reverse the sort order.
571The output columns are:
572.Bl -tag -width "something" -compact -offset indent
573.It Column
574Description
575.It Ic lstint
576Interval in seconds between the receipt of the most recent packet from
577this address and the completion of the retrieval of the MRU list by
578.Nm .
579.It Ic avgint
580Average interval in s between packets from this address.
581.It Ic rstr
582Restriction flags associated with this address.
583Most are copied unchanged from the matching
584.Ic restrict
585command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
586the last packet from this address triggered a rate control response.
587.It Ic r
588Rate control indicator, either
589a period,
590.Ic L
591or
592.Ic K
593for no rate control response,
594rate limiting by discarding, or rate limiting with a KoD response, respectively.
595.It Ic m
596Packet mode.
597.It Ic v
598Packet version number.
599.It Ic count
600Packets received from this address.
601.It Ic rport
602Source port of last packet from this address.
603.It Ic remote address
604host or DNS name, numeric address, or address followed by
605claimed DNS name which could not be verified in parentheses.
606.El
607.It Ic opeers Op Fl 4 | Fl 6
608Obtain and print the old-style list of all peers and clients showing
609.Cm dstadr
610(associated with the given IP version),
611rather than the
612.Cm refid .
613.It Ic passociations
614Perform the same function as the
615.Ic associations
616command,
617except that it uses previously stored data rather than making a new query.
618.It Ic peers
619Display a list of peers in the form:
620.Dl [tally]remote refid st t when pool reach delay offset jitter
621.Bl -tag -width "something" -compact -offset indent
622.It Variable
623Description
624.It Cm [tally]
625single-character code indicating current value of the
626.Ic select
627field of the
628.Lk decode.html#peer "peer status word"
629.It Cm remote
630host name (or IP number) of peer.
631The value displayed will be truncated to 15 characters unless the
632.Nm
633.Fl w
634option is given, in which case the full value will be displayed
635on the first line, and if too long,
636the remaining data will be displayed on the next line.
637.It Cm refid
638source IP address or
639.Lk decode.html#kiss "'kiss code"
640.It Cm st
641stratum: 0 for local reference clocks, 1 for servers with local
642reference clocks, ..., 16 for unsynchronized server clocks
643.It Cm t
644.Ic u :
645unicast or manycast client,
646.Ic b :
647broadcast or multicast client,
648.Ic p :
649pool source,
650.Ic l :
651local (reference clock),
652.Ic s :
653symmetric (peer),
654.Ic A :
655manycast server,
656.Ic B :
657broadcast server,
658.Ic M :
659multicast server
660.It Cm when
661time in seconds, minutes, hours, or days since the last packet
662was received, or
663.Ql \&-
664if a packet has never been received
665.It Cm poll
666poll interval (s)
667.It Cm reach
668reach shift register (octal)
669.It Cm delay
670roundtrip delay
671.It Cm offset
672offset of server relative to this host
673.It Cm jitter
674offset RMS error estimate.
675.El
676.It Ic pstats Ar associd
677Display the statistics for the peer with the given
678.Ar associd :
679associd, status, remote host, local address, time last received,
680time until next send, reachability change, packets sent,
681packets received, bad authentication, bogus origin, duplicate,
682bad dispersion, bad reference time, candidate order.
683.It Ic readlist Op Ar associd
684.It Ic rl Op Ar associd
685Display all system or peer variables.
686If the
687.Ar associd
688is omitted, it is assumed to be zero.
689.It Ic readvar Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
690.It Ic rv Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
691Display the specified system or peer variables.
692If
693.Ar associd
694is zero, the variables are from the
695.Sx System Variables
696name space, otherwise they are from the
697.Sx Peer Variables
698name space.
699The
700.Ar associd
701is required, as the same name can occur in both spaces.
702If no
703.Ar name
704is included, all operative variables in the name space are displayed.
705In this case only, if the
706.Ar associd
707is omitted, it is assumed to be zero.
708Multiple names are specified with comma separators and without whitespace.
709Note that time values are represented in milliseconds
710and frequency values in parts-per-million (PPM).
711Some NTP timestamps are represented in the format
712.Ar YYYY Ns Ar MM Ar DD Ar TTTT ,
713where
714.Ar YYYY
715is the year,
716.Ar MM
717the month of year,
718.Ar DD
719the day of month and
720.Ar TTTT
721the time of day.
722.It Ic reslist
723Display the access control (restrict) list for
724.Nm .
725Authentication is required.
726.It Ic saveconfig Ar filename
727Save the current configuration,
728including any runtime modifications made by
729.Ic :config
730or
731.Ic config-from-file ,
732to the NTP server host file
733.Ar filename .
734This command will be rejected by the server unless
735.Lk miscopt.html#saveconfigdir "saveconfigdir"
736appears in the
737.Xr ntpd 8
738configuration file.
739.Ar filename
740can use
741.Xr date 1
742format specifiers to substitute the current date and time, for
743example,
744.D1 Ic saveconfig Pa ntp-%Y%m%d-%H%M%S.conf .
745The filename used is stored in system variable
746.Cm savedconfig .
747Authentication is required.
748.It Ic sysinfo
749Display system operational summary:
750associd, status, system peer, system peer mode, leap indicator,
751stratum, log2 precision, root delay, root dispersion,
752reference id, reference time, system jitter, clock jitter,
753clock wander, broadcast delay, symm. auth. delay.
754.It Ic sysstats
755Display system uptime and packet counts maintained in the
756protocol module:
757uptime, sysstats reset, packets received, current version,
758older version, bad length or format, authentication failed,
759declined, restricted, rate limited, KoD responses,
760processed for time.
761.It Ic timerstats
762Display interval timer counters:
763time since reset, timer overruns, calls to transmit.
764.It Ic writelist Ar associd
765Set all system or peer variables included in the variable list.
766.It Ic writevar Ar associd Ar name Ns = Ns Ar value Op , ...
767Set the specified variables in the variable list.
768If the
769.Ar associd
770is zero, the variables are from the
771.Sx System Variables
772name space, otherwise they are from the
773.Sx Peer Variables
774name space.
775The
776.Ar associd
777is required, as the same name can occur in both spaces.
778Authentication is required.
779.El
780
781.Ss Status Words and Kiss Codes
782The current state of the operating program is shown
783in a set of status words
784maintained by the system.
785Status information is also available on a per-association basis.
786These words are displayed by the
787.Ic readlist
788and
789.Ic associations
790commands both in hexadecimal and in decoded short tip strings.
791The codes, tips and short explanations are documented on the
792.Lk decode.html "Event Messages and Status Words"
793page.
794The page also includes a list of system and peer messages,
795the code for the latest of which is included in the status word.
796.Pp
797Information resulting from protocol machine state transitions
798is displayed using an informal set of ASCII strings called
799.Lk decode.html#kiss "kiss codes" .
800The original purpose was for kiss-o'-death (KoD) packets
801sent by the server to advise the client of an unusual condition.
802They are now displayed, when appropriate,
803in the reference identifier field in various billboards.
804
805.Ss System Variables
806The following system variables appear in the
807.Ic readlist
808billboard.
809Not all variables are displayed in some configurations.
810.Pp
811.Bl -tag -width "something" -compact -offset indent
812.It Variable
813Description
814.It Cm status
815.Lk decode.html#sys "system status word"
816.It Cm version
817NTP software version and build time
818.It Cm processor
819hardware platform and version
820.It Cm system
821operating system and version
822.It Cm leap
823leap warning indicator (0-3)
824.It Cm stratum
825stratum (1-15)
826.It Cm precision
827precision (log2 s)
828.It Cm rootdelay
829total roundtrip delay to the primary reference clock
830.It Cm rootdisp
831total dispersion to the primary reference clock
832.It Cm refid
833reference id or
834.Lk decode.html#kiss "kiss code"
835.It Cm reftime
836reference time
837.It Ic clock
838date and time of day
839.It Cm peer
840system peer association id
841.It Cm tc
842time constant and poll exponent (log2 s) (3-17)
843.It Cm mintc
844minimum time constant (log2 s) (3-10)
845.It Cm offset
846combined offset of server relative to this host
847.It Cm frequency
848frequency drift (PPM) relative to hardware clock
849.It Cm sys_jitter
850combined system jitter
851.It Cm clk_wander
852clock frequency wander (PPM)
853.It Cm clk_jitter
854clock jitter
855.It Cm tai
856TAI-UTC offset (s)
857.It Cm leapsec
858NTP seconds when the next leap second is/was inserted
859.It Cm expire
860NTP seconds when the NIST leapseconds file expires
861.El
862The jitter and wander statistics are exponentially-weighted RMS averages.
863The system jitter is defined in the NTPv4 specification;
864the clock jitter statistic is computed by the clock discipline module.
865.Pp
866When the NTPv4 daemon is compiled with the OpenSSL software library,
867additional system variables are displayed,
868including some or all of the following,
869depending on the particular Autokey dance:
870.Bl -tag -width "something" -compact -offset indent
871.It Variable
872Description
873.It Cm host
874Autokey host name for this host
875.It Cm ident
876Autokey group name for this host
877.It Cm flags
878host flags  (see Autokey specification)
879.It Cm digest
880OpenSSL message digest algorithm
881.It Cm signature
882OpenSSL digest/signature scheme
883.It Cm update
884NTP seconds at last signature update
885.It Cm cert
886certificate subject, issuer and certificate flags
887.It Cm until
888NTP seconds when the certificate expires
889.El
890.Ss Peer Variables
891The following peer variables appear in the
892.Ic readlist
893billboard for each association.
894Not all variables are displayed in some configurations.
895.Pp
896.Bl -tag -width "something" -compact -offset indent
897.It Variable
898Description
899.It Cm associd
900association id
901.It Cm status
902.Lk decode.html#peer "peer status word"
903.It Cm srcadr
904source (remote) IP address
905.It Cm srcport
906source (remote) port
907.It Cm dstadr
908destination (local) IP address
909.It Cm dstport
910destination (local) port
911.It Cm leap
912leap indicator (0-3)
913.It Cm stratum
914stratum (0-15)
915.It Cm precision
916precision (log2 s)
917.It Cm rootdelay
918total roundtrip delay to the primary reference clock
919.It Cm rootdisp
920total root dispersion to the primary reference clock
921.It Cm refid
922reference id or
923.Lk decode.html#kiss "kiss code"
924.It Cm reftime
925reference time
926.It Cm rec
927last packet received time
928.It Cm reach
929reach register (octal)
930.It Cm unreach
931unreach counter
932.It Cm hmode
933host mode (1-6)
934.It Cm pmode
935peer mode (1-5)
936.It Cm hpoll
937host poll exponent (log2 s) (3-17)
938.It Cm ppoll
939peer poll exponent (log2 s) (3-17)
940.It Cm headway
941headway (see
942.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
943.It Cm flash
944.Lk decode.html#flash "flash status word"
945.It Cm keyid
946symmetric key id
947.It Cm offset
948filter offset
949.It Cm delay
950filter delay
951.It Cm dispersion
952filter dispersion
953.It Cm jitter
954filter jitter
955.It Cm bias
956unicast/broadcast bias
957.It Cm xleave
958interleave delay (see
959.Lk xleave.html "NTP Interleaved Modes" )
960.El
961The
962.Cm bias
963variable is calculated when the first broadcast packet is received
964after the calibration volley.
965It represents the offset of the broadcast subgraph relative to the
966unicast subgraph.
967The
968.Cm xleave
969variable appears only for the interleaved symmetric and interleaved modes.
970It represents the internal queuing, buffering and transmission delays
971for the preceding packet.
972.Pp
973When the NTPv4 daemon is compiled with the OpenSSL software library,
974additional peer variables are displayed, including the following:
975.Bl -tag -width "something" -compact -offset indent
976.It Variable
977Description
978.It Cm flags
979peer flags (see Autokey specification)
980.It Cm host
981Autokey server name
982.It Cm flags
983peer flags (see Autokey specification)
984.It Cm signature
985OpenSSL digest/signature scheme
986.It Cm initsequence
987initial key id
988.It Cm initkey
989initial key index
990.It Cm timestamp
991Autokey signature timestamp
992.It Cm ident
993Autokey group name for this association
994.El
995
996.Ss Clock Variables
997The following clock variables appear in the
998.Ic clocklist
999billboard for each association with a reference clock.
1000Not all variables are displayed in some configurations.
1001.Bl -tag -width "something" -compact -offset indent
1002.It Variable
1003Description
1004.It Cm associd
1005association id
1006.It Cm status
1007.Lk decode.html#clock "clock status word"
1008.It Cm device
1009device description
1010.It Cm timecode
1011ASCII time code string (specific to device)
1012.It Cm poll
1013poll messages sent
1014.It Cm noreply
1015no reply
1016.It Cm badformat
1017bad format
1018.It Cm baddata
1019bad date or time
1020.It Cm fudgetime1
1021fudge time 1
1022.It Cm fudgetime2
1023fudge time 2
1024.It Cm stratum
1025driver stratum
1026.It Cm refid
1027driver reference id
1028.It Cm flags
1029driver flags
1030.El
1031	_END_PROG_MDOC_DESCRIP;
1032};
1033