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