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