13 .TH ntpq 1ntpqman "26 Apr 2016" "4.2.8p7" "User Commands"
15 .\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-11aqEI/ag-c2aiDI)
17 .\" It has been AutoGen-ed April 26, 2016 at 08:29:35 PM by AutoGen 5.18.5
18 .\" From the definitions ntpq-opts.def
19 .\" and the template file agman-cmd.tpl
22 \- standard NTP query program
25 .\" Mixture of short (flag) options and long options
26 [\f\*[B-Font]\-flags\f[]]
27 [\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
28 [\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
36 utility program is used to query NTP servers which
37 implement the standard NTP mode 6 control message formats defined
38 in Appendix B of the NTPv3 specification RFC1305, requesting
39 information about current state and/or changes in that state.
40 The same formats are used in NTPv4, although some of the
41 variables have changed and new ones added. The description on this
42 page is for the NTPv4 variables.
43 The program may be run either in interactive mode or controlled using
44 command line arguments.
45 Requests to read and write arbitrary
46 variables can be assembled, with raw and pretty-printed output
47 options being available.
50 utility can also obtain and print a
51 list of peers in a common format by sending multiple queries to the
53 If one or more request options is included on the command line
56 is executed, each of the requests will be sent
57 to the NTP servers running on each of the hosts given as command
58 line arguments, or on localhost by default.
62 will attempt to read commands from the
63 standard input and execute these on the NTP server running on the
64 first host given on the command line, again defaulting to localhost
65 when no other host is specified.
68 utility will prompt for
69 commands if the standard input is a terminal device.
71 uses NTP mode 6 packets to communicate with the
72 NTP server, and hence can be used to query any compatible server on
73 the network which permits it.
74 Note that since NTP is a UDP protocol
75 this communication will be somewhat unreliable, especially over
76 large distances in terms of network topology.
80 one attempt to retransmit requests, and will time requests out if
81 the remote host is not heard from within a suitable timeout
84 command line option other than
89 cause the specified query (queries) to be sent to the indicated
94 interactive format commands from the standard input.
95 .SS "Internal Commands"
96 Interactive format commands consist of a keyword followed by zero
98 Only enough characters of the full keyword to
99 uniquely identify the command need be typed.
101 number of interactive format commands are executed entirely within
104 utility itself and do not result in NTP mode 6
105 requests being sent to a server.
106 These are described following.
108 .NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command_keyword\f[]]
112 .NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command_keyword\f[]]
115 by itself will print a list of all the command
116 keywords known to this incarnation of
120 followed by a command keyword will print function and usage
121 information about the command.
122 This command is probably a better
123 source of information about
130 .NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]variable_name\f[][\f\*[B-Font]=value\f[]] \f\*[B-Font]...\f[]
134 .NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]variable_name\f[] \f\*[B-Font]...\f[]
138 .NOP \f\*[B-Font]clearvars\f[]
142 .NOP \f\*[B-Font]showvars\f[]
143 The data carried by NTP mode 6 messages consists of a list of
145 \[oq]variable_name=value\[cq],
148 is ignored, and can be omitted,
149 in requests to the server to read variables.
152 utility maintains an internal list in which data to be included in control
153 messages can be assembled, and sent using the
154 \f\*[B-Font]readlist\f[]
156 \f\*[B-Font]writelist\f[]
157 commands described below.
159 \f\*[B-Font]addvars\f[]
160 command allows variables and their optional values to be added to
162 If more than one variable is to be added, the list should
163 be comma-separated and not contain white space.
165 \f\*[B-Font]rmvars\f[]
166 command can be used to remove individual variables from the list,
168 \f\*[B-Font]clearlist\f[]
169 command removes all variables from the
172 \f\*[B-Font]showvars\f[]
173 command displays the current list of optional variables.
177 .NOP \f\*[B-Font]authenticate\f[] [yes | no]
180 does not authenticate requests unless
181 they are write requests.
183 \[oq]authenticate yes\[cq]
186 to send authentication with all requests it
188 Authenticated requests causes some servers to handle
189 requests slightly differently, and can occasionally melt the CPU in
190 fuzzballs if you turn authentication on before doing a
194 \[oq]authenticate\[cq]
197 to display whether or not
199 is currently autheinticating requests.
203 .NOP \f\*[B-Font]cooked\f[]
204 Causes output from query commands to be "cooked", so that
205 variables which are recognized by
208 values reformatted for human consumption.
211 thinks should have a decodable value but didn't are
212 marked with a trailing
217 .NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[] | \f\*[B-Font]less\f[] | \f\*[B-Font]off\f[]]
218 With no argument, displays the current debug level.
219 Otherwise, the debug level is changed to the indicated level.
223 .NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[]
224 Specify a time interval to be added to timestamps included in
225 requests which require authentication.
226 This is used to enable
227 (unreliable) server reconfiguration over long delay network paths
228 or between machines whose clocks are unsynchronized.
230 server does not now require timestamps in authenticated requests,
231 so this command may be obsolete.
235 .NOP \f\*[B-Font]exit\f[]
241 .NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[]
242 Set the host to which future queries will be sent.
243 \f\*[I-Font]hostname\f[]
244 may be either a host name or a numeric address.
248 .NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]]
251 is specified, host names are printed in
252 information displays.
255 is specified, numeric
256 addresses are printed instead.
260 modified using the command line
266 .NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[]
267 This command allows the specification of a key number to be
268 used to authenticate configuration requests.
271 \f\*[B-Font]controlkey\f[]
272 key number the server has been configured to use for this
277 .NOP \f\*[B-Font]keytype\f[] [\f\*[B-Font]md5\f[] | \f\*[B-Font]OpenSSLDigestType\f[]]
278 Specify the type of key to use for authenticating requests.
283 was built with OpenSSL support,
284 any digest type supported by OpenSSL can also be provided.
285 If no argument is given, the current
286 \f\*[B-Font]keytype\f[]
291 .NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[] | \f\*[B-Font]2\f[] | \f\*[B-Font]3\f[] | \f\*[B-Font]4\f[]]
292 Sets the NTP version number which
296 Defaults to 3, and note that mode 6 control messages (and
297 modes, for that matter) didn't exist in NTP version 1.
299 to be no servers left which demand version 1.
300 With no argument, displays the current NTP version that will be used
301 when communicating with servers.
305 .NOP \f\*[B-Font]passwd\f[]
306 This command prompts you to type in a password (which will not
307 be echoed) which will be used to authenticate configuration
309 The password must correspond to the key configured for
310 use by the NTP server for this purpose if such requests are to be
312 .\" Not yet implemented.
316 .\" Poll an NTP server in client mode
322 .NOP \f\*[B-Font]quit\f[]
328 .NOP \f\*[B-Font]raw\f[]
329 Causes all output from query commands is printed as received
330 from the remote server.
331 The only formating/interpretation done on
332 the data is to transform nonascii data into a printable (but barely
333 understandable) form.
337 .NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[]
338 Specify a timeout period for responses to server queries.
340 default is about 5000 milliseconds.
343 retries each query once after a timeout, the total waiting time for
344 a timeout will be twice the timeout value set.
348 .NOP \f\*[B-Font]version\f[]
349 Print the version of the
353 .SS "Control Message Commands"
354 Association IDs are used to identify system, peer and clock variables.
355 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.
356 Most control commands send a single mode-6 message to the server and expect a single response message.
357 The exceptions are the
359 command, which sends a series of messages,
364 commands, which iterate over a range of associations.
366 .NOP \f\*[B-Font]associations\f[]
367 Display a list of mobilized associations in the form:
368 .Dl ind assid status conf reach auth condition last_event cnt
371 .IP \fB\(bu\fP 2 \f[C]ind\f[] \f[C]Ta\f[] \f[C]index\f[] \f[C]on\f[] \f[C]this\f[] \f[C]list\f[]
372 .IP \fB\(bu\fP 2 \f[C]assid\f[] \f[C]Ta\f[] \f[C]association\f[] \f[C]ID\f[]
373 .IP \fB\(bu\fP 2 \f[C]status\f[] \f[C]Ta\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word\f[]
374 .IP \fB\(bu\fP 2 \f[C]conf\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]persistent,\f[] \f[C]no\f[]: \f[C]ephemeral\f[]
375 .IP \fB\(bu\fP 2 \f[C]reach\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]reachable,\f[] \f[C]no\f[]: \f[C]unreachable\f[]
376 .IP \fB\(bu\fP 2 \f[C]auth\f[] \f[C]Ta\f[] \f[C]ok\f[], \f[C]yes\f[], \f[C]bad\f[] \f[C]and\f[] \f[C]none\f[]
377 .IP \fB\(bu\fP 2 \f[C]condition\f[] \f[C]Ta\f[] \f[C]selection\f[] \f[C]status\f[] \f[C](see\f[] \f[C]the\f[] \f[C]select\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
378 .IP \fB\(bu\fP 2 \f[C]last_event\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]report\f[] \f[C](see\f[] \f[C]the\f[] \f[C]event\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
379 .IP \fB\(bu\fP 2 \f[C]cnt\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]count\f[] \f[C](see\f[] \f[C]the\f[] \f[C]count\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
384 .NOP \f\*[B-Font]authinfo\f[]
385 Display the authentication statistics.
389 .NOP \f\*[B-Font]clockvar\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
393 .NOP \f\*[B-Font]cv\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
394 Display a list of clock variables for those associations supporting a reference clock.
398 .NOP \f\*[B-Font]:config\f[] [...]
399 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.
403 .NOP \f\*[B-Font]config-from-file\f[] \f\*[I-Font]filename\f[]
404 Send the each line of
405 \f\*[I-Font]filename\f[]
406 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.
410 .NOP \f\*[B-Font]ifstats\f[]
411 Display statistics for each local network address. Authentication is required.
415 .NOP \f\*[B-Font]iostats\f[]
416 Display network and reference clock I/O statistics.
420 .NOP \f\*[B-Font]kerninfo\f[]
421 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.
425 .NOP \f\*[B-Font]lassociations\f[]
426 Perform the same function as the associations command, except display mobilized and unmobilized associations.
430 .NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
431 Obtain and print a list of all peers and clients showing
432 \f\*[I-Font]dstadr\f[]
433 (associated with any given IP version).
437 .NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
438 Print a peer spreadsheet for the appropriate IP version(s).
439 \f\*[I-Font]dstadr\f[]
440 (associated with any given IP version).
444 .NOP \f\*[B-Font]monstats\f[]
445 Display monitor facility statistics.
449 .NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[]]
450 Obtain and print traffic counts collected and maintained by the monitor facility.
451 With the exception of
452 \f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[],
453 the options filter the list returned by
454 \f\*[B-Font]ntpd.\f[]
456 \f\*[B-Font]limited\f[]
459 options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
461 \f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[]
462 option filters entries representing less than
463 \f\*[I-Font]count\f[]
466 \f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[]
467 option filters entries for packets received on any local address other than
468 \f\*[I-Font]localaddr\f[].
469 \f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[]
471 \f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[]
472 filter entries containing none or less than all, respectively, of the bits in
473 \f\*[I-Font]hexmask\f[],
474 which must begin with
477 \f\*[I-Font]sortorder\f[]
479 \f\*[B-Font]lstint\f[]
481 \f\*[B-Font]addr\f[],
482 \f\*[B-Font]count\f[],
483 \f\*[B-Font]avgint\f[],
484 \f\*[B-Font]lstint\f[],
485 or any of those preceded by a minus sign (hyphen) to reverse the sort order.
486 The output columns are:
494 .NOP \f\*[B-Font]lstint\f[]
495 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
500 .NOP \f\*[B-Font]avgint\f[]
501 Average interval in s between packets from this address.
505 .NOP \f\*[B-Font]rstr\f[]
506 Restriction flags associated with this address.
507 Most are copied unchanged from the matching
508 \f\*[B-Font]restrict\f[]
509 command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
513 .NOP \f\*[B-Font]r\f[]
514 Rate control indicator, either
519 for no rate control response,
520 rate limiting by discarding, or rate limiting with a KoD response, respectively.
524 .NOP \f\*[B-Font]m\f[]
529 .NOP \f\*[B-Font]v\f[]
530 Packet version number.
534 .NOP \f\*[B-Font]count\f[]
535 Packets received from this address.
539 .NOP \f\*[B-Font]rport\f[]
540 Source port of last packet from this address.
544 .NOP \f\*[B-Font]remote\f[] \f\*[B-Font]address\f[]
545 DNS name, numeric address, or address followed by
546 claimed DNS name which could not be verified in parentheses.
551 .NOP \f\*[B-Font]mreadvar\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
555 .NOP \f\*[B-Font]mrv\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
556 Perform the same function as the
557 \f\*[B-Font]readvar\f[]
558 command, except for a range of association IDs.
559 This range is determined from the association list cached by the most recent
560 \f\*[B-Font]associations\f[]
565 .NOP \f\*[B-Font]opeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
566 Obtain and print the old-style list of all peers and clients showing
567 \f\*[I-Font]dstadr\f[]
568 (associated with any given IP version),
570 \f\*[I-Font]refid\f[].
574 .NOP \f\*[B-Font]passociations\f[]
575 Perform the same function as the
576 \f\*[B-Font]associations\f[]
578 except that it uses previously stored data rather than making a new query.
582 .NOP \f\*[B-Font]peers\f[]
583 Display a list of peers in the form:
584 .Dl [tally]remote refid st t when pool reach delay offset jitter
592 .NOP \f\*[B-Font][tally]\f[]
593 single-character code indicating current value of the
594 \f\*[B-Font]select\f[]
596 .Lk decode.html#peer "peer status word"
600 .NOP \f\*[B-Font]remote\f[]
601 host name (or IP number) of peer.
602 The value displayed will be truncated to 15 characters unless the
604 flag is given, in which case the full value will be displayed
606 and the remaining data is displayed on the next line.
610 .NOP \f\*[B-Font]refid\f[]
612 .Lk decode.html#kiss "'kiss code"
616 .NOP \f\*[B-Font]st\f[]
621 .NOP \f\*[B-Font]t\f[]
623 unicast or manycast client,
625 broadcast or multicast client,
627 local (reference clock),
639 .NOP \f\*[B-Font]when\f[]
640 sec/min/hr since last received packet
644 .NOP \f\*[B-Font]poll\f[]
645 poll interval (log2 s)
649 .NOP \f\*[B-Font]reach\f[]
650 reach shift register (octal)
654 .NOP \f\*[B-Font]delay\f[]
659 .NOP \f\*[B-Font]offset\f[]
660 offset of server relative to this host
664 .NOP \f\*[B-Font]jitter\f[]
670 .NOP \f\*[B-Font]apeers\f[]
671 Display a list of peers in the form:
672 .Dl [tally]remote refid assid st t when pool reach delay offset jitter
673 where the output is just like the
674 \f\*[B-Font]peers\f[]
675 command except that the
676 \f\*[B-Font]refid\f[]
677 is displayed in hex format and the association number is also displayed.
681 .NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]assocID\f[]
682 Show the statistics for the peer with the given
683 \f\*[I-Font]assocID\f[].
687 .NOP \f\*[B-Font]readlist\f[] \f\*[I-Font]assocID\f[]
691 .NOP \f\*[B-Font]rl\f[] \f\*[I-Font]assocID\f[]
692 Read the system or peer variables included in the variable list.
696 .NOP \f\*[B-Font]readvar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
700 .NOP \f\*[B-Font]rv\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
701 Display the specified variables.
703 \f\*[I-Font]assocID\f[]
704 is zero, the variables are from the
705 \fISystem\f[] \fIVariables\f[]
706 name space, otherwise they are from the
707 \fIPeer\f[] \fIVariables\f[]
710 \f\*[I-Font]assocID\f[]
711 is required, as the same name can occur in both spaces.
714 is included, all operative variables in the name space are displayed.
715 In this case only, if the
716 \f\*[I-Font]assocID\f[]
717 is omitted, it is assumed zero.
718 Multiple names are specified with comma separators and without whitespace.
719 Note that time values are represented in milliseconds
720 and frequency values in parts-per-million (PPM).
721 Some NTP timestamps are represented in the format
723 where YYYY is the year,
724 MM the month of year,
725 DD the day of month and
726 TTTT the time of day.
730 .NOP \f\*[B-Font]reslist\f[]
731 Show the access control (restrict) list for
736 .NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
737 Write the current configuration,
738 including any runtime modifications given with
739 \f\*[B-Font]:config\f[]
741 \f\*[B-Font]config-from-file\f[],
742 to the ntpd host's file
743 \f\*[I-Font]filename\f[].
744 This command will be rejected by the server unless
745 .Lk miscopt.html#saveconfigdir "saveconfigdir"
749 \f\*[I-Font]filename\f[]
751 \fCstrftime\f[]\fR()\f[]
752 format specifies to substitute the current date and time, for example,
753 \f\*[B-Font]q]saveconfig\f[] \f\*[B-Font]ntp-%Y%m%d-%H%M%S.confq]\f[].
754 The filename used is stored in system variable
755 \f\*[B-Font]savedconfig\f[].
756 Authentication is required.
760 .NOP \f\*[B-Font]timerstats\f[]
761 Display interval timer counters.
765 .NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]assocID\f[]
766 Write the system or peer variables included in the variable list.
770 .NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
771 Write the specified variables.
773 \f\*[I-Font]assocID\f[]
774 is zero, the variables are from the
775 \fISystem\f[] \fIVariables\f[]
776 name space, otherwise they are from the
777 \fIPeer\f[] \fIVariables\f[]
780 \f\*[I-Font]assocID\f[]
781 is required, as the same name can occur in both spaces.
785 .NOP \f\*[B-Font]sysinfo\f[]
786 Display operational summary.
790 .NOP \f\*[B-Font]sysstats\f[]
791 Print statistics counters maintained in the protocol module.
793 .SS Status Words and Kiss Codes
794 The current state of the operating program is shown
795 in a set of status words
796 maintained by the system.
797 Status information is also available on a per-association basis.
798 These words are displayed in the
802 commands both in hexadecimal and in decoded short tip strings.
803 The codes, tips and short explanations are documented on the
804 .Lk decode.html "Event Messages and Status Words"
806 The page also includes a list of system and peer messages,
807 the code for the latest of which is included in the status word.
811 Information resulting from protocol machine state transitions
812 is displayed using an informal set of ASCII strings called
813 .Lk decode.html#kiss "kiss codes" .
814 The original purpose was for kiss-o'-death (KoD) packets
815 sent by the server to advise the client of an unusual condition.
816 They are now displayed, when appropriate,
817 in the reference identifier field in various billboards.
819 The following system variables appear in the
822 Not all variables are displayed in some configurations.
829 .NOP \f\*[B-Font]status\f[]
830 .Lk decode.html#sys "system status word"
834 .NOP \f\*[B-Font]version\f[]
835 NTP software version and build time
839 .NOP \f\*[B-Font]processor\f[]
840 hardware platform and version
844 .NOP \f\*[B-Font]system\f[]
845 operating system and version
849 .NOP \f\*[B-Font]leap\f[]
850 leap warning indicator (0-3)
854 .NOP \f\*[B-Font]stratum\f[]
859 .NOP \f\*[B-Font]precision\f[]
864 .NOP \f\*[B-Font]rootdelay\f[]
865 total roundtrip delay to the primary reference clock
869 .NOP \f\*[B-Font]rootdisp\f[]
870 total dispersion to the primary reference clock
874 .NOP \f\*[B-Font]peer\f[]
875 system peer association ID
879 .NOP \f\*[B-Font]tc\f[]
880 time constant and poll exponent (log2 s) (3-17)
884 .NOP \f\*[B-Font]mintc\f[]
885 minimum time constant (log2 s) (3-10)
889 .NOP \f\*[B-Font]clock\f[]
894 .NOP \f\*[B-Font]refid\f[]
896 .Lk decode.html#kiss "kiss code"
900 .NOP \f\*[B-Font]reftime\f[]
905 .NOP \f\*[B-Font]offset\f[]
906 combined offset of server relative to this host
910 .NOP \f\*[B-Font]sys_jitter\f[]
911 combined system jitter
915 .NOP \f\*[B-Font]frequency\f[]
916 frequency offset (PPM) relative to hardware clock
920 .NOP \f\*[B-Font]clk_wander\f[]
921 clock frequency wander (PPM)
925 .NOP \f\*[B-Font]clk_jitter\f[]
930 .NOP \f\*[B-Font]tai\f[]
935 .NOP \f\*[B-Font]leapsec\f[]
936 NTP seconds when the next leap second is/was inserted
940 .NOP \f\*[B-Font]expire\f[]
941 NTP seconds when the NIST leapseconds file expires
943 The jitter and wander statistics are exponentially-weighted RMS averages.
944 The system jitter is defined in the NTPv4 specification;
945 the clock jitter statistic is computed by the clock discipline module.
949 When the NTPv4 daemon is compiled with the OpenSSL software library,
950 additional system variables are displayed,
951 including some or all of the following,
952 depending on the particular Autokey dance:
959 .NOP \f\*[B-Font]host\f[]
960 Autokey host name for this host
964 .NOP \f\*[B-Font]ident\f[]
965 Autokey group name for this host
969 .NOP \f\*[B-Font]flags\f[]
970 host flags (see Autokey specification)
974 .NOP \f\*[B-Font]digest\f[]
975 OpenSSL message digest algorithm
979 .NOP \f\*[B-Font]signature\f[]
980 OpenSSL digest/signature scheme
984 .NOP \f\*[B-Font]update\f[]
985 NTP seconds at last signature update
989 .NOP \f\*[B-Font]cert\f[]
990 certificate subject, issuer and certificate flags
994 .NOP \f\*[B-Font]until\f[]
995 NTP seconds when the certificate expires
998 The following peer variables appear in the
1000 billboard for each association.
1001 Not all variables are displayed in some configurations.
1008 .NOP \f\*[B-Font]associd\f[]
1013 .NOP \f\*[B-Font]status\f[]
1014 .Lk decode.html#peer "peer status word"
1018 .NOP \f\*[B-Font]srcadr\f[]
1019 source (remote) IP address
1023 .NOP \f\*[B-Font]srcport\f[]
1024 source (remote) port
1028 .NOP \f\*[B-Font]dstadr\f[]
1029 destination (local) IP address
1033 .NOP \f\*[B-Font]dstport\f[]
1034 destination (local) port
1038 .NOP \f\*[B-Font]leap\f[]
1039 leap indicator (0-3)
1043 .NOP \f\*[B-Font]stratum\f[]
1048 .NOP \f\*[B-Font]precision\f[]
1053 .NOP \f\*[B-Font]rootdelay\f[]
1054 total roundtrip delay to the primary reference clock
1058 .NOP \f\*[B-Font]rootdisp\f[]
1059 total root dispersion to the primary reference clock
1063 .NOP \f\*[B-Font]refid\f[]
1065 .Lk decode.html#kiss "kiss code"
1069 .NOP \f\*[B-Font]reftime\f[]
1074 .NOP \f\*[B-Font]reach\f[]
1075 reach register (octal)
1079 .NOP \f\*[B-Font]unreach\f[]
1084 .NOP \f\*[B-Font]hmode\f[]
1089 .NOP \f\*[B-Font]pmode\f[]
1094 .NOP \f\*[B-Font]hpoll\f[]
1095 host poll exponent (log2 s) (3-17)
1099 .NOP \f\*[B-Font]ppoll\f[]
1100 peer poll exponent (log2 s) (3-17)
1104 .NOP \f\*[B-Font]headway\f[]
1106 .Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
1110 .NOP \f\*[B-Font]flash\f[]
1111 .Lk decode.html#flash "flash status word"
1115 .NOP \f\*[B-Font]offset\f[]
1120 .NOP \f\*[B-Font]delay\f[]
1125 .NOP \f\*[B-Font]dispersion\f[]
1130 .NOP \f\*[B-Font]jitter\f[]
1135 .NOP \f\*[B-Font]ident\f[]
1136 Autokey group name for this association
1140 .NOP \f\*[B-Font]bias\f[]
1141 unicast/broadcast bias
1145 .NOP \f\*[B-Font]xleave\f[]
1146 interleave delay (see
1147 .Lk xleave.html "NTP Interleaved Modes" )
1150 \f\*[B-Font]bias\f[]
1151 variable is calculated when the first broadcast packet is received
1152 after the calibration volley.
1153 It represents the offset of the broadcast subgraph relative to the unicast subgraph.
1155 \f\*[B-Font]xleave\f[]
1156 variable appears only for the interleaved symmetric and interleaved modes.
1157 It represents the internal queuing, buffering and transmission delays
1158 for the preceding packet.
1162 When the NTPv4 daemon is compiled with the OpenSSL software library,
1163 additional peer variables are displayed, including the following:
1170 .NOP \f\*[B-Font]flags\f[]
1171 peer flags (see Autokey specification)
1175 .NOP \f\*[B-Font]host\f[]
1180 .NOP \f\*[B-Font]flags\f[]
1181 peer flags (see Autokey specification)
1185 .NOP \f\*[B-Font]signature\f[]
1186 OpenSSL digest/signature scheme
1190 .NOP \f\*[B-Font]initsequence\f[]
1195 .NOP \f\*[B-Font]initkey\f[]
1200 .NOP \f\*[B-Font]timestamp\f[]
1201 Autokey signature timestamp
1204 The following clock variables appear in the
1206 billboard for each association with a reference clock.
1207 Not all variables are displayed in some configurations.
1214 .NOP \f\*[B-Font]associd\f[]
1219 .NOP \f\*[B-Font]status\f[]
1220 .Lk decode.html#clock "clock status word"
1224 .NOP \f\*[B-Font]device\f[]
1229 .NOP \f\*[B-Font]timecode\f[]
1230 ASCII time code string (specific to device)
1234 .NOP \f\*[B-Font]poll\f[]
1239 .NOP \f\*[B-Font]noreply\f[]
1244 .NOP \f\*[B-Font]badformat\f[]
1249 .NOP \f\*[B-Font]baddata\f[]
1254 .NOP \f\*[B-Font]fudgetime1\f[]
1259 .NOP \f\*[B-Font]fudgetime2\f[]
1264 .NOP \f\*[B-Font]stratum\f[]
1269 .NOP \f\*[B-Font]refid\f[]
1274 .NOP \f\*[B-Font]flags\f[]
1279 .NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
1280 Force IPv4 DNS name resolution.
1281 This option must not appear in combination with any of the following options:
1284 Force DNS resolution of following host names on the command line
1285 to the IPv4 namespace.
1287 .NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
1288 Force IPv6 DNS name resolution.
1289 This option must not appear in combination with any of the following options:
1292 Force DNS resolution of following host names on the command line
1293 to the IPv6 namespace.
1295 .NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
1296 run a command and exit.
1297 This option may appear an unlimited number of times.
1299 The following argument is interpreted as an interactive format command
1300 and is added to the list of commands to be executed on the specified
1303 .NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
1304 Increase debug verbosity level.
1305 This option may appear an unlimited number of times.
1308 .NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
1309 Set the debug verbosity level.
1310 This option may appear an unlimited number of times.
1311 This option takes an integer number as its argument.
1314 .NOP \f\*[B-Font]\-i\f[], \f\*[B-Font]\-\-interactive\f[]
1315 Force ntpq to operate in interactive mode.
1316 This option must not appear in combination with any of the following options:
1319 Force \fBntpq\fP to operate in interactive mode.
1320 Prompts will be written to the standard output and
1321 commands read from the standard input.
1323 .NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-numeric\f[]
1324 numeric host addresses.
1326 Output all host addresses in dotted-quad numeric format rather than
1327 converting to the canonical host names.
1329 .NOP \f\*[B-Font]\-\-old\-rv\f[]
1330 Always output status line with readvar.
1332 By default, \fBntpq\fP now suppresses the \fBassocid=...\fP
1333 line that precedes the output of \fBreadvar\fP
1334 (alias \fBrv\fP) when a single variable is requested, such as
1335 \fBntpq \-c "rv 0 offset"\fP.
1336 This option causes \fBntpq\fP to include both lines of output
1337 for a single-variable \fBreadvar\fP.
1338 Using an environment variable to
1339 preset this option in a script will enable both older and
1340 newer \fBntpq\fP to behave identically in this regard.
1342 .NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
1343 Print a list of the peers.
1344 This option must not appear in combination with any of the following options:
1347 Print a list of the peers known to the server as well as a summary
1348 of their state. This is equivalent to the 'peers' interactive command.
1350 .NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]keyword\f[], \f\*[B-Font]\-\-refid\f[]=\f\*[I-Font]keyword\f[]
1351 Set default display type for S2+ refids.
1352 This option takes a keyword as its argument. The argument sets an enumeration value that can
1353 be tested by comparing them against the option value macro.
1354 The available keywords are:
1360 or their numeric equivalent.
1364 \f\*[I-Font]keyword\f[]
1369 Set the default display format for S2+ refids.
1371 .NOP \f\*[B-Font]\-w\f[], \f\*[B-Font]\-\-wide\f[]
1372 Display the full 'remote' value.
1374 Display the full value of the 'remote' value. If this requires
1375 more than 15 characters, display the full value, emit a newline,
1376 and continue the data display properly indented on the next line.
1378 .NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
1379 Display usage information and exit.
1381 .NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
1382 Pass the extended usage information through a pager.
1384 .NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
1385 Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
1386 configuration file listed in the \fBOPTION PRESETS\fP section, below.
1387 The command will exit after updating the config file.
1389 .NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
1390 Load options from \fIcfgfile\fP.
1391 The \fIno-load-opts\fP form will disable the loading
1392 of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
1395 .NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
1396 Output version of program and exit. The default mode is `v', a simple
1397 version. The `c' mode will print copyright information and `n' will
1398 print the full copyright notice.
1400 .SH "OPTION PRESETS"
1401 Any option that is not marked as \fInot presettable\fP may be preset
1402 by loading values from configuration ("RC" or ".INI") file(s) and values from
1403 environment variables named:
1405 \fBNTPQ_<option-name>\fP or \fBNTPQ\fP
1408 The environmental presets take precedence (are processed later than)
1409 the configuration files.
1410 The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
1411 If any of these are directories, then the file \fI.ntprc\fP
1412 is searched for within those directories.
1414 See \fBOPTION PRESETS\fP for configuration environment variables.
1416 See \fBOPTION PRESETS\fP for configuration files.
1418 One of the following exit values will be returned:
1420 .NOP 0 " (EXIT_SUCCESS)"
1421 Successful program execution.
1423 .NOP 1 " (EXIT_FAILURE)"
1424 The operation failed or the command syntax was not valid.
1426 .NOP 66 " (EX_NOINPUT)"
1427 A specified configuration file could not be loaded.
1429 .NOP 70 " (EX_SOFTWARE)"
1430 libopts had an internal operational error. Please report
1431 it to autogen-users@lists.sourceforge.net. Thank you.
1434 The University of Delaware and Network Time Foundation
1436 Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation all rights reserved.
1437 This program is released under the terms of the NTP license, <http://ntp.org/license>.
1439 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
1441 This manual page was \fIAutoGen\fP-erated from the \fBntpq\fP