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