13 .TH ntpq 1ntpqman "27 Feb 2018" "4.2.8p11" "User Commands"
15 .\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-D4aGRT/ag-Q4ayQT)
17 .\" It has been AutoGen-ed February 27, 2018 at 05:15:22 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[]]]
39 utility program is used to query NTP servers to monitor NTP operations
40 and performance, requesting
41 information about current state and/or changes in that state.
42 The program may be run either in interactive mode or controlled using
43 command line arguments.
44 Requests to read and write arbitrary
45 variables can be assembled, with raw and pretty-printed output
46 options being available.
49 utility can also obtain and print a
50 list of peers in a common format by sending multiple queries to the
55 If one or more request options is included on the command line
58 is executed, each of the requests will be sent
59 to the NTP servers running on each of the hosts given as command
60 line arguments, or on localhost by default.
64 will attempt to read commands from the
65 standard input and execute these on the NTP server running on the
66 first host given on the command line, again defaulting to localhost
67 when no other host is specified.
70 utility will prompt for
71 commands if the standard input is a terminal device.
76 uses NTP mode 6 packets to communicate with the
77 NTP server, and hence can be used to query any compatible server on
78 the network which permits it.
79 Note that since NTP is a UDP protocol
80 this communication will be somewhat unreliable, especially over
81 large distances in terms of network topology.
85 one attempt to retransmit requests, and will time requests out if
86 the remote host is not heard from within a suitable timeout
91 Note that in contexts where a host name is expected, a
93 qualifier preceding the host name forces resolution to the IPv4
96 qualifier forces resolution to the IPv6 namespace.
97 For examples and usage, see the
98 \*[Lq]NTP Debugging Techniques\*[Rq]
104 command line option other than
109 cause the specified query (queries) to be sent to the indicated
114 interactive format commands from the standard input.
115 .SS "Internal Commands"
119 Interactive format commands consist of a keyword followed by zero
121 Only enough characters of the full keyword to
122 uniquely identify the command need be typed.
127 number of interactive format commands are executed entirely within
130 utility itself and do not result in NTP
131 requests being sent to a server.
132 These are described following.
134 .NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command\f[]]
138 .NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command\f[]]
141 by itself will print a list of all the commands
146 followed by a command name will print function and usage
147 information about the command.
151 .NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][,...]
155 .NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]name\f[][,...]
159 .NOP \f\*[B-Font]clearvars\f[]
163 .NOP \f\*[B-Font]showvars\f[]
164 The arguments to this command consist of a list of
166 \f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]],
168 .NOP \&=\f\*[I-Font]value\f[]
169 is ignored, and can be omitted,
170 in requests to the server to read variables.
173 utility maintains an internal list in which data to be included in
174 messages can be assembled, and displayed or set using the
175 \f\*[B-Font]readlist\f[]
177 \f\*[B-Font]writelist\f[]
178 commands described below.
180 \f\*[B-Font]addvars\f[]
181 command allows variables and their optional values to be added to
183 If more than one variable is to be added, the list should
184 be comma-separated and not contain white space.
186 \f\*[B-Font]rmvars\f[]
187 command can be used to remove individual variables from the list,
189 \f\*[B-Font]clearvars\f[]
190 command removes all variables from the
193 \f\*[B-Font]showvars\f[]
194 command displays the current list of optional variables.
198 .NOP \f\*[B-Font]authenticate\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]]
201 does not authenticate requests unless
202 they are write requests.
204 \f\*[B-Font]authenticate\f[] \f\*[B-Font]yes\f[]
207 to send authentication with all requests it
209 Authenticated requests causes some servers to handle
210 requests slightly differently.
212 \f\*[B-Font]authenticate\f[]
215 to display whether or not
216 it is currently authenticating requests.
220 .NOP \f\*[B-Font]cooked\f[]
221 Causes output from query commands to be "cooked", so that
222 variables which are recognized by
225 values reformatted for human consumption.
228 could not decode completely are
229 marked with a trailing
234 .NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[]|\f\*[B-Font]less\f[]|\f\*[B-Font]off\f[]]
235 With no argument, displays the current debug level.
236 Otherwise, the debugging level is changed as indicated.
240 .NOP \f\*[B-Font]delay\f[] [\f\*[I-Font]milliseconds\f[]]
241 Specify a time interval to be added to timestamps included in
242 requests which require authentication.
243 This is used to enable
244 (unreliable) server reconfiguration over long delay network paths
245 or between machines whose clocks are unsynchronized.
247 server does not now require timestamps in authenticated requests,
248 so this command may be obsolete.
249 Without any arguments, displays the current delay.
253 .NOP \f\*[B-Font]drefid\f[] [\f\*[B-Font]hash\f[]|\f\*[B-Font]ipv4\f[]]
254 Display refids as IPv4 or hash.
255 Without any arguments, displays whether refids are shown as IPv4
260 .NOP \f\*[B-Font]exit\f[]
266 .NOP \f\*[B-Font]host\f[] [\f\*[I-Font]name\f[]]
267 Set the host to which future queries will be sent.
270 may be either a host name or a numeric address.
271 Without any arguments, displays the current host.
275 .NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]]
278 is specified, host names are printed in
279 information displays.
282 is specified, numeric
283 addresses are printed instead.
287 modified using the command line
290 Without any arguments, displays whether host names or numeric addresses
295 .NOP \f\*[B-Font]keyid\f[] [\f\*[I-Font]keyid\f[]]
296 This command allows the specification of a key number to be
297 used to authenticate configuration requests.
300 \f\*[B-Font]controlkey\f[]
301 key number the server has been configured to use for this
303 Without any arguments, displays the current
304 \f\*[I-Font]keyid\f[].
308 .NOP \f\*[B-Font]keytype\f[] [\f\*[I-Font]digest\f[]]
309 Specify the digest algorithm to use for authenticating requests, with default
313 was built with OpenSSL support, and OpenSSL is installed,
314 \f\*[I-Font]digest\f[]
315 can be any message digest algorithm supported by OpenSSL.
316 If no argument is given, the current
317 \f\*[B-Font]keytype\f[] \f\*[I-Font]digest\f[]
318 algorithm used is displayed.
322 .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[]]
323 Sets the NTP version number which
327 Defaults to 3, and note that mode 6 control messages (and
328 modes, for that matter) didn't exist in NTP version 1.
330 to be no servers left which demand version 1.
331 With no argument, displays the current NTP version that will be used
332 when communicating with servers.
336 .NOP \f\*[B-Font]passwd\f[]
337 This command prompts you to type in a password (which will not
338 be echoed) which will be used to authenticate configuration
340 The password must correspond to the key configured for
341 use by the NTP server for this purpose if such requests are to be
346 .NOP \f\*[B-Font]poll\f[] [\f\*[I-Font]n\f[]] [\f\*[B-Font]verbose\f[]]
347 Poll an NTP server in client mode
350 Poll not implemented yet.
354 .NOP \f\*[B-Font]quit\f[]
360 .NOP \f\*[B-Font]raw\f[]
361 Causes all output from query commands is printed as received
362 from the remote server.
363 The only formating/interpretation done on
364 the data is to transform nonascii data into a printable (but barely
365 understandable) form.
369 .NOP \f\*[B-Font]timeout\f[] [\f\*[I-Font]milliseconds\f[]]
370 Specify a timeout period for responses to server queries.
372 default is about 5000 milliseconds.
373 Without any arguments, displays the current timeout period.
376 retries each query once after a timeout, the total waiting time for
377 a timeout will be twice the timeout value set.
381 .NOP \f\*[B-Font]version\f[]
382 Display the version of the
386 .SS "Control Message Commands"
387 Association ids are used to identify system, peer and clock variables.
388 System variables are assigned an association id of zero and system name
389 space, while each association is assigned a nonzero association id and
391 Most control commands send a single message to the server and expect a
392 single response message.
393 The exceptions are the
394 \f\*[B-Font]peers\f[]
395 command, which sends a series of messages,
397 \f\*[B-Font]mreadlist\f[]
399 \f\*[B-Font]mreadvar\f[]
400 commands, which iterate over a range of associations.
402 .NOP \f\*[B-Font]apeers\f[]
403 Display a list of peers in the form:
404 .Dl [tally]remote refid assid st t when pool reach delay offset jitter
405 where the output is just like the
406 \f\*[B-Font]peers\f[]
407 command except that the
408 \f\*[B-Font]refid\f[]
409 is displayed in hex format and the association number is also displayed.
413 .NOP \f\*[B-Font]associations\f[]
414 Display a list of mobilized associations in the form:
415 .Dl ind assid status conf reach auth condition last_event cnt
418 .IP \fB\(bu\fP 2 \f\*[B-Font]ind\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]index\f[] \f\*[B-Font]on\f[] \f\*[B-Font]this\f[] \f\*[B-Font]list\f[]
419 .IP \fB\(bu\fP 2 \f\*[B-Font]assid\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]association\f[] \f\*[B-Font]id\f[]
420 .IP \fB\(bu\fP 2 \f\*[B-Font]status\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\f[]
421 .IP \fB\(bu\fP 2 \f\*[B-Font]conf\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]persistent,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]ephemeral\f[]
422 .IP \fB\(bu\fP 2 \f\*[B-Font]reach\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]reachable,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]unreachable\f[]
423 .IP \fB\(bu\fP 2 \f\*[B-Font]auth\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]ok\f[], \f\*[B-Font]yes\f[], \f\*[B-Font]bad\f[] \f\*[B-Font]No\f[] \f\*[B-Font]and\f[] \f\*[B-Font]none\f[]
424 .IP \fB\(bu\fP 2 \f\*[B-Font]condition\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]selection\f[] \f\*[B-Font]status\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]select\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
425 .IP \fB\(bu\fP 2 \f\*[B-Font]last_event\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]report\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]event\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
426 .IP \fB\(bu\fP 2 \f\*[B-Font]cnt\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]count\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]count\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
431 .NOP \f\*[B-Font]authinfo\f[]
432 Display the authentication statistics counters:
433 time since reset, stored keys, free keys, key lookups, keys not found,
434 uncached keys, expired keys, encryptions, decryptions.
438 .NOP \f\*[B-Font]clocklist\f[] [\f\*[I-Font]associd\f[]]
442 .NOP \f\*[B-Font]cl\f[] [\f\*[I-Font]associd\f[]]
443 Display all clock variables in the variable list for those associations
444 supporting a reference clock.
448 .NOP \f\*[B-Font]clockvar\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...]
452 .NOP \f\*[B-Font]cv\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...]
453 Display a list of clock variables for those associations supporting a
458 .NOP \f\*[B-Font]:config\f[] \f\*[I-Font]configuration command line\f[]
459 Send the remainder of the command line, including whitespace, to the
460 server as a run-time configuration command in the same format as a line
461 in the configuration file.
462 This command is experimental until further notice and clarification.
463 Authentication is of course required.
467 .NOP \f\*[B-Font]config-from-file\f[] \f\*[I-Font]filename\f[]
469 \f\*[I-Font]filename\f[]
470 to the server as run-time configuration commands in the same format as
471 lines in the configuration file.
472 This command is experimental until further notice and clarification.
473 Authentication is required.
477 .NOP \f\*[B-Font]ifstats\f[]
478 Display status and statistics counters for each local network interface address:
479 interface number, interface name and address or broadcast, drop, flag,
480 ttl, mc, received, sent, send failed, peers, uptime.
481 Authentication is required.
485 .NOP \f\*[B-Font]iostats\f[]
486 Display network and reference clock I/O statistics:
487 time since reset, receive buffers, free receive buffers, used receive buffers,
488 low water refills, dropped packets, ignored packets, received packets,
489 packets sent, packet send failures, input wakeups, useful input wakeups.
493 .NOP \f\*[B-Font]kerninfo\f[]
494 Display kernel loop and PPS statistics:
495 associd, status, pll offset, pll frequency, maximum error,
496 estimated error, kernel status, pll time constant, precision,
497 frequency tolerance, pps frequency, pps stability, pps jitter,
498 calibration interval, calibration cycles, jitter exceeded,
499 stability exceeded, calibration errors.
500 As with other ntpq output, times are in milliseconds; very small values
501 may be shown as exponentials.
502 The precision value displayed is in milliseconds as well, unlike the
503 precision system variable.
507 .NOP \f\*[B-Font]lassociations\f[]
508 Perform the same function as the associations command, except display
509 mobilized and unmobilized associations, including all clients.
513 .NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]]
514 Display a list of all peers and clients showing
515 \f\*[B-Font]dstadr\f[]
516 (associated with the given IP version).
520 .NOP \f\*[B-Font]lpassociations\f[]
521 Display the last obtained list of associations, including all clients.
525 .NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]]
526 Display a list of all peers and clients (associated with the given IP version).
530 .NOP \f\*[B-Font]monstats\f[]
531 Display monitor facility status, statistics, and limits:
532 enabled, addresses, peak addresses, maximum addresses,
533 reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
537 .NOP \f\*[B-Font]mreadlist\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[]
541 .NOP \f\*[B-Font]mrl\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[]
542 Perform the same function as the
543 \f\*[B-Font]readlist\f[]
544 command for a range of association ids.
548 .NOP \f\*[B-Font]mreadvar\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...]
549 This range may be determined from the list displayed by any
550 command showing associations.
554 .NOP \f\*[B-Font]mrv\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...]
555 Perform the same function as the
556 \f\*[B-Font]readvar\f[]
557 command for a range of association ids.
558 This range may be determined from the list displayed by any
559 command showing associations.
563 .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[]]
564 Display traffic counts of the most recently seen source addresses
565 collected and maintained by the monitor facility.
566 With the exception of
567 \f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[],
568 the options filter the list returned by
569 \fCntpd\f[]\fR(8)\f[].
571 \f\*[B-Font]limited\f[]
574 options return only entries representing client addresses from which the
575 last packet received triggered either discarding or a KoD response.
577 \f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[]
578 option filters entries representing less than
579 \f\*[I-Font]count\f[]
582 \f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[]
583 option filters entries for packets received on any local address other than
584 \f\*[I-Font]localaddr\f[].
585 \f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[]
587 \f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[]
588 filter entries containing none or less than all, respectively, of the bits in
589 \f\*[I-Font]hexmask\f[],
590 which must begin with
593 \f\*[I-Font]sortorder\f[]
595 \f\*[B-Font]lstint\f[]
597 \f\*[B-Font]addr\f[],
598 \f\*[B-Font]avgint\f[],
599 \f\*[B-Font]count\f[],
600 \f\*[B-Font]lstint\f[],
601 or any of those preceded by
603 to reverse the sort order.
604 The output columns are:
612 .NOP \f\*[B-Font]lstint\f[]
613 Interval in seconds between the receipt of the most recent packet from
614 this address and the completion of the retrieval of the MRU list by
619 .NOP \f\*[B-Font]avgint\f[]
620 Average interval in s between packets from this address.
624 .NOP \f\*[B-Font]rstr\f[]
625 Restriction flags associated with this address.
626 Most are copied unchanged from the matching
627 \f\*[B-Font]restrict\f[]
628 command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
629 the last packet from this address triggered a rate control response.
633 .NOP \f\*[B-Font]r\f[]
634 Rate control indicator, either
639 for no rate control response,
640 rate limiting by discarding, or rate limiting with a KoD response, respectively.
644 .NOP \f\*[B-Font]m\f[]
649 .NOP \f\*[B-Font]v\f[]
650 Packet version number.
654 .NOP \f\*[B-Font]count\f[]
655 Packets received from this address.
659 .NOP \f\*[B-Font]rport\f[]
660 Source port of last packet from this address.
664 .NOP \f\*[B-Font]remote\f[] \f\*[B-Font]address\f[]
665 host or DNS name, numeric address, or address followed by
666 claimed DNS name which could not be verified in parentheses.
671 .NOP \f\*[B-Font]opeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
672 Obtain and print the old-style list of all peers and clients showing
673 \f\*[B-Font]dstadr\f[]
674 (associated with the given IP version),
676 \f\*[B-Font]refid\f[].
680 .NOP \f\*[B-Font]passociations\f[]
681 Perform the same function as the
682 \f\*[B-Font]associations\f[]
684 except that it uses previously stored data rather than making a new query.
688 .NOP \f\*[B-Font]peers\f[]
689 Display a list of peers in the form:
690 .Dl [tally]remote refid st t when pool reach delay offset jitter
698 .NOP \f\*[B-Font][tally]\f[]
699 single-character code indicating current value of the
700 \f\*[B-Font]select\f[]
702 .Lk decode.html#peer "peer status word"
706 .NOP \f\*[B-Font]remote\f[]
707 host name (or IP number) of peer.
708 The value displayed will be truncated to 15 characters unless the
711 option is given, in which case the full value will be displayed
712 on the first line, and if too long,
713 the remaining data will be displayed on the next line.
717 .NOP \f\*[B-Font]refid\f[]
719 .Lk decode.html#kiss "'kiss code"
723 .NOP \f\*[B-Font]st\f[]
724 stratum: 0 for local reference clocks, 1 for servers with local
725 reference clocks, ..., 16 for unsynchronized server clocks
729 .NOP \f\*[B-Font]t\f[]
731 unicast or manycast client,
733 broadcast or multicast client,
737 local (reference clock),
749 .NOP \f\*[B-Font]when\f[]
750 time in seconds, minutes, hours, or days since the last packet
753 if a packet has never been received
757 .NOP \f\*[B-Font]poll\f[]
762 .NOP \f\*[B-Font]reach\f[]
763 reach shift register (octal)
767 .NOP \f\*[B-Font]delay\f[]
772 .NOP \f\*[B-Font]offset\f[]
773 offset of server relative to this host
777 .NOP \f\*[B-Font]jitter\f[]
778 offset RMS error estimate.
783 .NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]associd\f[]
784 Display the statistics for the peer with the given
785 \f\*[I-Font]associd\f[]:
786 associd, status, remote host, local address, time last received,
787 time until next send, reachability change, packets sent,
788 packets received, bad authentication, bogus origin, duplicate,
789 bad dispersion, bad reference time, candidate order.
793 .NOP \f\*[B-Font]readlist\f[] [\f\*[I-Font]associd\f[]]
797 .NOP \f\*[B-Font]rl\f[] [\f\*[I-Font]associd\f[]]
798 Display all system or peer variables.
800 \f\*[I-Font]associd\f[]
801 is omitted, it is assumed to be zero.
805 .NOP \f\*[B-Font]readvar\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]]
809 .NOP \f\*[B-Font]rv\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]]
810 Display the specified system or peer variables.
812 \f\*[I-Font]associd\f[]
813 is zero, the variables are from the
814 \fISystem\f[] \fIVariables\f[]
815 name space, otherwise they are from the
816 \fIPeer\f[] \fIVariables\f[]
819 \f\*[I-Font]associd\f[]
820 is required, as the same name can occur in both spaces.
823 is included, all operative variables in the name space are displayed.
824 In this case only, if the
825 \f\*[I-Font]associd\f[]
826 is omitted, it is assumed to be zero.
827 Multiple names are specified with comma separators and without whitespace.
828 Note that time values are represented in milliseconds
829 and frequency values in parts-per-million (PPM).
830 Some NTP timestamps are represented in the format
831 \f\*[I-Font]YYYY\f[]\f\*[I-Font]MM\f[] \f\*[I-Font]DD\f[] \f\*[I-Font]TTTT\f[],
844 .NOP \f\*[B-Font]reslist\f[]
845 Display the access control (restrict) list for
847 Authentication is required.
851 .NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
852 Save the current configuration,
853 including any runtime modifications made by
854 \f\*[B-Font]:config\f[]
856 \f\*[B-Font]config-from-file\f[],
857 to the NTP server host file
858 \f\*[I-Font]filename\f[].
859 This command will be rejected by the server unless
860 .Lk miscopt.html#saveconfigdir "saveconfigdir"
862 \fCntpd\f[]\fR(8)\f[]
864 \f\*[I-Font]filename\f[]
866 \fCdate\f[]\fR(1)\f[]
867 format specifiers to substitute the current date and time, for
870 \f\*[B-Font]saveconfig\f[] \fIntp-%Y%m%d-%H%M%S.conf\f[].
872 The filename used is stored in system variable
873 \f\*[B-Font]savedconfig\f[].
874 Authentication is required.
878 .NOP \f\*[B-Font]sysinfo\f[]
879 Display system operational summary:
880 associd, status, system peer, system peer mode, leap indicator,
881 stratum, log2 precision, root delay, root dispersion,
882 reference id, reference time, system jitter, clock jitter,
883 clock wander, broadcast delay, symm. auth. delay.
887 .NOP \f\*[B-Font]sysstats\f[]
888 Display system uptime and packet counts maintained in the
890 uptime, sysstats reset, packets received, current version,
891 older version, bad length or format, authentication failed,
892 declined, restricted, rate limited, KoD responses,
897 .NOP \f\*[B-Font]timerstats\f[]
898 Display interval timer counters:
899 time since reset, timer overruns, calls to transmit.
903 .NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]associd\f[]
904 Set all system or peer variables included in the variable list.
908 .NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]associd\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
909 Set the specified variables in the variable list.
911 \f\*[I-Font]associd\f[]
912 is zero, the variables are from the
913 \fISystem\f[] \fIVariables\f[]
914 name space, otherwise they are from the
915 \fIPeer\f[] \fIVariables\f[]
918 \f\*[I-Font]associd\f[]
919 is required, as the same name can occur in both spaces.
920 Authentication is required.
922 .SS Status Words and Kiss Codes
923 The current state of the operating program is shown
924 in a set of status words
925 maintained by the system.
926 Status information is also available on a per-association basis.
927 These words are displayed by the
928 \f\*[B-Font]readlist\f[]
930 \f\*[B-Font]associations\f[]
931 commands both in hexadecimal and in decoded short tip strings.
932 The codes, tips and short explanations are documented on the
933 .Lk decode.html "Event Messages and Status Words"
935 The page also includes a list of system and peer messages,
936 the code for the latest of which is included in the status word.
940 Information resulting from protocol machine state transitions
941 is displayed using an informal set of ASCII strings called
942 .Lk decode.html#kiss "kiss codes" .
943 The original purpose was for kiss-o'-death (KoD) packets
944 sent by the server to advise the client of an unusual condition.
945 They are now displayed, when appropriate,
946 in the reference identifier field in various billboards.
948 The following system variables appear in the
949 \f\*[B-Font]readlist\f[]
951 Not all variables are displayed in some configurations.
961 .NOP \f\*[B-Font]status\f[]
962 .Lk decode.html#sys "system status word"
966 .NOP \f\*[B-Font]version\f[]
967 NTP software version and build time
971 .NOP \f\*[B-Font]processor\f[]
972 hardware platform and version
976 .NOP \f\*[B-Font]system\f[]
977 operating system and version
981 .NOP \f\*[B-Font]leap\f[]
982 leap warning indicator (0-3)
986 .NOP \f\*[B-Font]stratum\f[]
991 .NOP \f\*[B-Font]precision\f[]
996 .NOP \f\*[B-Font]rootdelay\f[]
997 total roundtrip delay to the primary reference clock
1001 .NOP \f\*[B-Font]rootdisp\f[]
1002 total dispersion to the primary reference clock
1006 .NOP \f\*[B-Font]refid\f[]
1008 .Lk decode.html#kiss "kiss code"
1012 .NOP \f\*[B-Font]reftime\f[]
1017 .NOP \f\*[B-Font]clock\f[]
1018 date and time of day
1022 .NOP \f\*[B-Font]peer\f[]
1023 system peer association id
1027 .NOP \f\*[B-Font]tc\f[]
1028 time constant and poll exponent (log2 s) (3-17)
1032 .NOP \f\*[B-Font]mintc\f[]
1033 minimum time constant (log2 s) (3-10)
1037 .NOP \f\*[B-Font]offset\f[]
1038 combined offset of server relative to this host
1042 .NOP \f\*[B-Font]frequency\f[]
1043 frequency drift (PPM) relative to hardware clock
1047 .NOP \f\*[B-Font]sys_jitter\f[]
1048 combined system jitter
1052 .NOP \f\*[B-Font]clk_wander\f[]
1053 clock frequency wander (PPM)
1057 .NOP \f\*[B-Font]clk_jitter\f[]
1062 .NOP \f\*[B-Font]tai\f[]
1067 .NOP \f\*[B-Font]leapsec\f[]
1068 NTP seconds when the next leap second is/was inserted
1072 .NOP \f\*[B-Font]expire\f[]
1073 NTP seconds when the NIST leapseconds file expires
1075 The jitter and wander statistics are exponentially-weighted RMS averages.
1076 The system jitter is defined in the NTPv4 specification;
1077 the clock jitter statistic is computed by the clock discipline module.
1081 When the NTPv4 daemon is compiled with the OpenSSL software library,
1082 additional system variables are displayed,
1083 including some or all of the following,
1084 depending on the particular Autokey dance:
1091 .NOP \f\*[B-Font]host\f[]
1092 Autokey host name for this host
1096 .NOP \f\*[B-Font]ident\f[]
1097 Autokey group name for this host
1101 .NOP \f\*[B-Font]flags\f[]
1102 host flags (see Autokey specification)
1106 .NOP \f\*[B-Font]digest\f[]
1107 OpenSSL message digest algorithm
1111 .NOP \f\*[B-Font]signature\f[]
1112 OpenSSL digest/signature scheme
1116 .NOP \f\*[B-Font]update\f[]
1117 NTP seconds at last signature update
1121 .NOP \f\*[B-Font]cert\f[]
1122 certificate subject, issuer and certificate flags
1126 .NOP \f\*[B-Font]until\f[]
1127 NTP seconds when the certificate expires
1130 The following peer variables appear in the
1131 \f\*[B-Font]readlist\f[]
1132 billboard for each association.
1133 Not all variables are displayed in some configurations.
1143 .NOP \f\*[B-Font]associd\f[]
1148 .NOP \f\*[B-Font]status\f[]
1149 .Lk decode.html#peer "peer status word"
1153 .NOP \f\*[B-Font]srcadr\f[]
1154 source (remote) IP address
1158 .NOP \f\*[B-Font]srcport\f[]
1159 source (remote) port
1163 .NOP \f\*[B-Font]dstadr\f[]
1164 destination (local) IP address
1168 .NOP \f\*[B-Font]dstport\f[]
1169 destination (local) port
1173 .NOP \f\*[B-Font]leap\f[]
1174 leap indicator (0-3)
1178 .NOP \f\*[B-Font]stratum\f[]
1183 .NOP \f\*[B-Font]precision\f[]
1188 .NOP \f\*[B-Font]rootdelay\f[]
1189 total roundtrip delay to the primary reference clock
1193 .NOP \f\*[B-Font]rootdisp\f[]
1194 total root dispersion to the primary reference clock
1198 .NOP \f\*[B-Font]refid\f[]
1200 .Lk decode.html#kiss "kiss code"
1204 .NOP \f\*[B-Font]reftime\f[]
1209 .NOP \f\*[B-Font]rec\f[]
1210 last packet received time
1214 .NOP \f\*[B-Font]reach\f[]
1215 reach register (octal)
1219 .NOP \f\*[B-Font]unreach\f[]
1224 .NOP \f\*[B-Font]hmode\f[]
1229 .NOP \f\*[B-Font]pmode\f[]
1234 .NOP \f\*[B-Font]hpoll\f[]
1235 host poll exponent (log2 s) (3-17)
1239 .NOP \f\*[B-Font]ppoll\f[]
1240 peer poll exponent (log2 s) (3-17)
1244 .NOP \f\*[B-Font]headway\f[]
1246 .Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
1250 .NOP \f\*[B-Font]flash\f[]
1251 .Lk decode.html#flash "flash status word"
1255 .NOP \f\*[B-Font]keyid\f[]
1260 .NOP \f\*[B-Font]offset\f[]
1265 .NOP \f\*[B-Font]delay\f[]
1270 .NOP \f\*[B-Font]dispersion\f[]
1275 .NOP \f\*[B-Font]jitter\f[]
1280 .NOP \f\*[B-Font]bias\f[]
1281 unicast/broadcast bias
1285 .NOP \f\*[B-Font]xleave\f[]
1286 interleave delay (see
1287 .Lk xleave.html "NTP Interleaved Modes" )
1290 \f\*[B-Font]bias\f[]
1291 variable is calculated when the first broadcast packet is received
1292 after the calibration volley.
1293 It represents the offset of the broadcast subgraph relative to the
1296 \f\*[B-Font]xleave\f[]
1297 variable appears only for the interleaved symmetric and interleaved modes.
1298 It represents the internal queuing, buffering and transmission delays
1299 for the preceding packet.
1303 When the NTPv4 daemon is compiled with the OpenSSL software library,
1304 additional peer variables are displayed, including the following:
1311 .NOP \f\*[B-Font]flags\f[]
1312 peer flags (see Autokey specification)
1316 .NOP \f\*[B-Font]host\f[]
1321 .NOP \f\*[B-Font]flags\f[]
1322 peer flags (see Autokey specification)
1326 .NOP \f\*[B-Font]signature\f[]
1327 OpenSSL digest/signature scheme
1331 .NOP \f\*[B-Font]initsequence\f[]
1336 .NOP \f\*[B-Font]initkey\f[]
1341 .NOP \f\*[B-Font]timestamp\f[]
1342 Autokey signature timestamp
1346 .NOP \f\*[B-Font]ident\f[]
1347 Autokey group name for this association
1350 The following clock variables appear in the
1351 \f\*[B-Font]clocklist\f[]
1352 billboard for each association with a reference clock.
1353 Not all variables are displayed in some configurations.
1360 .NOP \f\*[B-Font]associd\f[]
1365 .NOP \f\*[B-Font]status\f[]
1366 .Lk decode.html#clock "clock status word"
1370 .NOP \f\*[B-Font]device\f[]
1375 .NOP \f\*[B-Font]timecode\f[]
1376 ASCII time code string (specific to device)
1380 .NOP \f\*[B-Font]poll\f[]
1385 .NOP \f\*[B-Font]noreply\f[]
1390 .NOP \f\*[B-Font]badformat\f[]
1395 .NOP \f\*[B-Font]baddata\f[]
1400 .NOP \f\*[B-Font]fudgetime1\f[]
1405 .NOP \f\*[B-Font]fudgetime2\f[]
1410 .NOP \f\*[B-Font]stratum\f[]
1415 .NOP \f\*[B-Font]refid\f[]
1420 .NOP \f\*[B-Font]flags\f[]
1425 .NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
1426 Force IPv4 name resolution.
1427 This option must not appear in combination with any of the following options:
1430 Force resolution of following host names on the command line
1431 to the IPv4 namespace.
1433 .NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
1434 Force IPv6 name resolution.
1435 This option must not appear in combination with any of the following options:
1438 Force resolution of following host names on the command line
1439 to the IPv6 namespace.
1441 .NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
1442 run a command and exit.
1443 This option may appear an unlimited number of times.
1445 The following argument is interpreted as an interactive format command
1446 and is added to the list of commands to be executed on the specified
1449 .NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
1450 Increase debug verbosity level.
1451 This option may appear an unlimited number of times.
1454 .NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
1455 Set the debug verbosity level.
1456 This option may appear an unlimited number of times.
1457 This option takes an integer number as its argument.
1460 .NOP \f\*[B-Font]\-i\f[], \f\*[B-Font]\-\-interactive\f[]
1461 Force ntpq to operate in interactive mode.
1462 This option must not appear in combination with any of the following options:
1465 Force \fBntpq\fP to operate in interactive mode.
1466 Prompts will be written to the standard output and
1467 commands read from the standard input.
1469 .NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-numeric\f[]
1470 numeric host addresses.
1472 Output all host addresses in dotted-quad numeric format rather than
1473 converting to the canonical host names.
1475 .NOP \f\*[B-Font]\-\-old\-rv\f[]
1476 Always output status line with readvar.
1478 By default, \fBntpq\fP now suppresses the \fBassocid=...\fP
1479 line that precedes the output of \fBreadvar\fP
1480 (alias \fBrv\fP) when a single variable is requested, such as
1481 \fBntpq \-c "rv 0 offset"\fP.
1482 This option causes \fBntpq\fP to include both lines of output
1483 for a single-variable \fBreadvar\fP.
1484 Using an environment variable to
1485 preset this option in a script will enable both older and
1486 newer \fBntpq\fP to behave identically in this regard.
1488 .NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
1489 Print a list of the peers.
1490 This option must not appear in combination with any of the following options:
1493 Print a list of the peers known to the server as well as a summary
1494 of their state. This is equivalent to the 'peers' interactive command.
1496 .NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]keyword\f[], \f\*[B-Font]\-\-refid\f[]=\f\*[I-Font]keyword\f[]
1497 Set default display type for S2+ refids.
1498 This option takes a keyword as its argument. The argument sets an enumeration value that can
1499 be tested by comparing them against the option value macro.
1500 The available keywords are:
1506 or their numeric equivalent.
1510 \f\*[I-Font]keyword\f[]
1515 Set the default display format for S2+ refids.
1517 .NOP \f\*[B-Font]\-w\f[], \f\*[B-Font]\-\-wide\f[]
1518 Display the full 'remote' value.
1520 Display the full value of the 'remote' value. If this requires
1521 more than 15 characters, display the full value, emit a newline,
1522 and continue the data display properly indented on the next line.
1524 .NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
1525 Display usage information and exit.
1527 .NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
1528 Pass the extended usage information through a pager.
1530 .NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
1531 Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
1532 configuration file listed in the \fBOPTION PRESETS\fP section, below.
1533 The command will exit after updating the config file.
1535 .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[]
1536 Load options from \fIcfgfile\fP.
1537 The \fIno-load-opts\fP form will disable the loading
1538 of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
1541 .NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
1542 Output version of program and exit. The default mode is `v', a simple
1543 version. The `c' mode will print copyright information and `n' will
1544 print the full copyright notice.
1546 .SH "OPTION PRESETS"
1547 Any option that is not marked as \fInot presettable\fP may be preset
1548 by loading values from configuration ("RC" or ".INI") file(s) and values from
1549 environment variables named:
1551 \fBNTPQ_<option-name>\fP or \fBNTPQ\fP
1554 The environmental presets take precedence (are processed later than)
1555 the configuration files.
1556 The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
1557 If any of these are directories, then the file \fI.ntprc\fP
1558 is searched for within those directories.
1560 See \fBOPTION PRESETS\fP for configuration environment variables.
1562 See \fBOPTION PRESETS\fP for configuration files.
1564 One of the following exit values will be returned:
1566 .NOP 0 " (EXIT_SUCCESS)"
1567 Successful program execution.
1569 .NOP 1 " (EXIT_FAILURE)"
1570 The operation failed or the command syntax was not valid.
1572 .NOP 66 " (EX_NOINPUT)"
1573 A specified configuration file could not be loaded.
1575 .NOP 70 " (EX_SOFTWARE)"
1576 libopts had an internal operational error. Please report
1577 it to autogen-users@lists.sourceforge.net. Thank you.
1580 The University of Delaware and Network Time Foundation
1582 Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
1583 This program is released under the terms of the NTP license, <http://ntp.org/license>.
1585 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
1587 This manual page was \fIAutoGen\fP-erated from the \fBntpq\fP