diff options
Diffstat (limited to 'contrib/ntp/ntpq/ntpq.html')
-rw-r--r-- | contrib/ntp/ntpq/ntpq.html | 429 |
1 files changed, 257 insertions, 172 deletions
diff --git a/contrib/ntp/ntpq/ntpq.html b/contrib/ntp/ntpq/ntpq.html index d8f6dd6..55aafc8 100644 --- a/contrib/ntp/ntpq/ntpq.html +++ b/contrib/ntp/ntpq/ntpq.html @@ -44,7 +44,7 @@ monitor the operational status and determine the performance of <code>ntpd</code>, the NTP daemon. - <p>This document applies to version 4.2.8p10 of <code>ntpq</code>. + <p>This document applies to version 4.2.8p11 of <code>ntpq</code>. <ul class="menu"> <li><a accesskey="1" href="#ntpq-Description">ntpq Description</a> @@ -97,13 +97,9 @@ The description on this page is for the NTPv4 variables. <p>The <code>ntpq</code> -utility program is used to query NTP servers which -implement the standard NTP mode 6 control message formats defined -in Appendix B of the NTPv3 specification RFC1305, requesting +utility program is used to query NTP servers to monitor NTP operations +and performance, requesting information about current state and/or changes in that state. -The same formats are used in NTPv4, although some of the -variables have changed and new ones added. The description on this -page is for the NTPv4 variables. The program may be run either in interactive mode or controlled using command line arguments. Requests to read and write arbitrary @@ -147,6 +143,16 @@ one attempt to retransmit requests, and will time requests out if the remote host is not heard from within a suitable timeout time. + <p>Note that in contexts where a host name is expected, a +<code>-4</code> +qualifier preceding the host name forces resolution to the IPv4 +namespace, while a +<code>-6</code> +qualifier forces resolution to the IPv6 namespace. +For examples and usage, see the +NTP Debugging Techniques +page. + <p>Specifying a command line option other than <code>-i</code> @@ -171,35 +177,30 @@ uniquely identify the command need be typed. number of interactive format commands are executed entirely within the <code>ntpq</code> -utility itself and do not result in NTP mode 6 +utility itself and do not result in NTP requests being sent to a server. These are described following. <dl> -<dt><code>?</code> <code>[</code><kbd>command_keyword</kbd><code>]</code><br><dt><code>help</code> <code>[</code><kbd>command_keyword</kbd><code>]</code><dd>A +<dt><code>?</code> <code>[</code><kbd>command</kbd><code>]</code><br><dt><code>help</code> <code>[</code><kbd>command</kbd><code>]</code><dd>A ? -by itself will print a list of all the command -keywords known to this incarnation of +by itself will print a list of all the commands +known to <code>ntpq</code> A ? -followed by a command keyword will print function and usage +followed by a command name will print function and usage information about the command. -This command is probably a better -source of information about -<code>ntpq</code> -than this manual -page. -<br><dt><code>addvars</code> <kbd>variable_name</kbd><code>[=value]</code> <code>...</code><br><dt><code>rmvars</code> <kbd>variable_name</kbd> <code>...</code><br><dt><code>clearvars</code><br><dt><code>showvars</code><dd>The data carried by NTP mode 6 messages consists of a list of +<br><dt><code>addvars</code> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code><code>[,...]</code><br><dt><code>rmvars</code> <kbd>name</kbd><code>[,...]</code><br><dt><code>clearvars</code><br><dt><code>showvars</code><dd>The arguments to this command consist of a list of items of the form -variable_name=value, +<kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code>, where the -=value +.No = Ns Ar value is ignored, and can be omitted, in requests to the server to read variables. The <code>ntpq</code> -utility maintains an internal list in which data to be included in control -messages can be assembled, and sent using the +utility maintains an internal list in which data to be included in +messages can be assembled, and displayed or set using the <code>readlist</code> and <code>writelist</code> @@ -214,34 +215,30 @@ The <code>rmvars</code> command can be used to remove individual variables from the list, while the -<code>clearlist</code> +<code>clearvars</code> command removes all variables from the list. The <code>showvars</code> command displays the current list of optional variables. -<br><dt><code>authenticate</code> <code>[yes | no]</code><dd>Normally +<br><dt><code>authenticate</code> <code>[yes|no]</code><dd>Normally <code>ntpq</code> does not authenticate requests unless they are write requests. The command -authenticate yes +<code>authenticate</code> <code>yes</code> causes <code>ntpq</code> to send authentication with all requests it makes. Authenticated requests causes some servers to handle -requests slightly differently, and can occasionally melt the CPU in -fuzzballs if you turn authentication on before doing a -<code>peer</code> -display. +requests slightly differently. The command -authenticate +<code>authenticate</code> causes <code>ntpq</code> to display whether or not -<code>ntpq</code> -is currently autheinticating requests. +it is currently authenticating requests. <br><dt><code>cooked</code><dd>Causes output from query commands to be "cooked", so that variables which are recognized by <code>ntpq</code> @@ -249,12 +246,12 @@ will have their values reformatted for human consumption. Variables which <code>ntpq</code> -thinks should have a decodable value but didn't are +could not decode completely are marked with a trailing ?. -<br><dt><code>debug</code> <code>[more | less | off]</code><dd>With no argument, displays the current debug level. -Otherwise, the debug level is changed to the indicated level. -<br><dt><code>delay</code> <kbd>milliseconds</kbd><dd>Specify a time interval to be added to timestamps included in +<br><dt><code>debug</code> <code>[more|less|off]</code><dd>With no argument, displays the current debug level. +Otherwise, the debugging level is changed as indicated. +<br><dt><code>delay</code> <code>[</code><kbd>milliseconds</kbd><code>]</code><dd>Specify a time interval to be added to timestamps included in requests which require authentication. This is used to enable (unreliable) server reconfiguration over long delay network paths @@ -262,12 +259,18 @@ or between machines whose clocks are unsynchronized. Actually the server does not now require timestamps in authenticated requests, so this command may be obsolete. +Without any arguments, displays the current delay. +<br><dt><code>drefid</code> <code>[hash|ipv4]</code><dd>Display refids as IPv4 or hash. +Without any arguments, displays whether refids are shown as IPv4 +addresses or hashes. <br><dt><code>exit</code><dd>Exit <code>ntpq</code> -<br><dt><code>host</code> <kbd>hostname</kbd><dd>Set the host to which future queries will be sent. -<kbd>hostname</kbd> +<br><dt><code>host</code> <code>[</code><kbd>name</kbd><code>]</code><dd>Set the host to which future queries will be sent. +The +<kbd>name</kbd> may be either a host name or a numeric address. -<br><dt><code>hostnames</code> <code>[yes | no]</code><dd>If +Without any arguments, displays the current host. +<br><dt><code>hostnames</code> <code>[yes|no]</code><dd>If <code>yes</code> is specified, host names are printed in information displays. @@ -281,24 +284,28 @@ unless modified using the command line <code>-n</code> switch. -<br><dt><code>keyid</code> <kbd>keyid</kbd><dd>This command allows the specification of a key number to be +Without any arguments, displays whether host names or numeric addresses +are shown. +<br><dt><code>keyid</code> <code>[</code><kbd>keyid</kbd><code>]</code><dd>This command allows the specification of a key number to be used to authenticate configuration requests. This must correspond to the <code>controlkey</code> key number the server has been configured to use for this purpose. -<br><dt><code>keytype</code> <code>[md5 | OpenSSLDigestType]</code><dd>Specify the type of key to use for authenticating requests. -<code>md5</code> -is alway supported. +Without any arguments, displays the current +<kbd>keyid</kbd>. +<br><dt><code>keytype</code> <code>[</code><kbd>digest</kbd><code>]</code><dd>Specify the digest algorithm to use for authenticating requests, with default +<code>MD5</code>. If <code>ntpq</code> -was built with OpenSSL support, -any digest type supported by OpenSSL can also be provided. +was built with OpenSSL support, and OpenSSL is installed, +<kbd>digest</kbd> +can be any message digest algorithm supported by OpenSSL. If no argument is given, the current -<code>keytype</code> -is displayed. -<br><dt><code>ntpversion</code> <code>[1 | 2 | 3 | 4]</code><dd>Sets the NTP version number which +<code>keytype</code> <kbd>digest</kbd> +algorithm used is displayed. +<br><dt><code>ntpversion</code> <code>[1|2|3|4]</code><dd>Sets the NTP version number which <code>ntpq</code> claims in packets. @@ -314,9 +321,10 @@ requests. The password must correspond to the key configured for use by the NTP server for this purpose if such requests are to be successful. -<code>poll</code> +<br><dt><code>poll</code> <code>[</code><kbd>n</kbd><code>]</code> <code>[verbose]</code><dd>Poll an NTP server in client mode <kbd>n</kbd> -<code>verbose</code> +times. +Poll not implemented yet. <br><dt><code>quit</code><dd>Exit <code>ntpq</code> <br><dt><code>raw</code><dd>Causes all output from query commands is printed as received @@ -324,23 +332,27 @@ from the remote server. The only formating/interpretation done on the data is to transform nonascii data into a printable (but barely understandable) form. -<br><dt><code>timeout</code> <kbd>milliseconds</kbd><dd>Specify a timeout period for responses to server queries. +<br><dt><code>timeout</code> <code>[</code><kbd>milliseconds</kbd><code>]</code><dd>Specify a timeout period for responses to server queries. The default is about 5000 milliseconds. +Without any arguments, displays the current timeout period. Note that since <code>ntpq</code> retries each query once after a timeout, the total waiting time for a timeout will be twice the timeout value set. -<br><dt><code>version</code><dd>Print the version of the +<br><dt><code>version</code><dd>Display the version of the <code>ntpq</code> program. </dl> <h5 class="subsubsection">Control Message Commands</h5> -<p>Association IDs are used to identify system, peer and clock variables. -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. -Most control commands send a single mode-6 message to the server and expect a single response message. +<p>Association ids are used to identify system, peer and clock variables. +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. +Most control commands send a single message to the server and expect a +single response message. The exceptions are the <code>peers</code> command, which sends a series of messages, @@ -350,38 +362,87 @@ and <code>mreadvar</code> commands, which iterate over a range of associations. <dl> -<dt><code>associations</code><dd>Display a list of mobilized associations in the form: +<dt><code>apeers</code><dd>Display a list of peers in the form: + <pre class="example"> [tally]remote refid assid st t when pool reach delay offset jitter + </pre> + <p>where the output is just like the +<code>peers</code> +command except that the +<code>refid</code> +is displayed in hex format and the association number is also displayed. +<br><dt><code>associations</code><dd>Display a list of mobilized associations in the form: <pre class="example"> ind assid status conf reach auth condition last_event cnt </pre> <dl> -<dt>Sy String Ta Sy Description<br><dt><code>ind</code> <code>Ta</code> <code>index</code> <code>on</code> <code>this</code> <code>list</code><br><dt><code>assid</code> <code>Ta</code> <code>association</code> <code>ID</code><br><dt><code>status</code> <code>Ta</code> <code>peer</code> <code>status</code> <code>word</code><br><dt><code>conf</code> <code>Ta</code> <code>yes</code>: <code>persistent,</code> <code>no</code>: <code>ephemeral</code><br><dt><code>reach</code> <code>Ta</code> <code>yes</code>: <code>reachable,</code> <code>no</code>: <code>unreachable</code><br><dt><code>auth</code> <code>Ta</code> <code>ok</code>, <code>yes</code>, <code>bad</code> <code>and</code> <code>none</code><br><dt><code>condition</code> <code>Ta</code> <code>selection</code> <code>status</code> <code>(see</code> <code>the</code> <code>select</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><br><dt><code>last_event</code> <code>Ta</code> <code>event</code> <code>report</code> <code>(see</code> <code>the</code> <code>event</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><br><dt><code>cnt</code> <code>Ta</code> <code>event</code> <code>count</code> <code>(see</code> <code>the</code> <code>count</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><dd></dl> - <br><dt><code>authinfo</code><dd>Display the authentication statistics. -<br><dt><code>clockvar</code> <kbd>assocID</kbd> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code> <code>[...]</code><br><dt><code>cv</code> <kbd>assocID</kbd> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code> <code>[...]</code><dd>Display a list of clock variables for those associations supporting a reference clock. -<br><dt><code>:config</code> <code>[...]</code><dd>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. -<br><dt><code>config-from-file</code> <kbd>filename</kbd><dd>Send the each line of +<dt>Sy Variable Ta Sy Description<br><dt><code>ind</code> <code>Ta</code> <code>index</code> <code>on</code> <code>this</code> <code>list</code><br><dt><code>assid</code> <code>Ta</code> <code>association</code> <code>id</code><br><dt><code>status</code> <code>Ta</code> <code>peer</code> <code>status</code> <code>word</code><br><dt><code>conf</code> <code>Ta</code> <code>yes</code>: <code>No</code> <code>persistent,</code> <code>no</code>: <code>No</code> <code>ephemeral</code><br><dt><code>reach</code> <code>Ta</code> <code>yes</code>: <code>No</code> <code>reachable,</code> <code>no</code>: <code>No</code> <code>unreachable</code><br><dt><code>auth</code> <code>Ta</code> <code>ok</code>, <code>yes</code>, <code>bad</code> <code>No</code> <code>and</code> <code>none</code><br><dt><code>condition</code> <code>Ta</code> <code>selection</code> <code>status</code> <code>(see</code> <code>the</code> <code>select</code> <code>No</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><br><dt><code>last_event</code> <code>Ta</code> <code>event</code> <code>report</code> <code>(see</code> <code>the</code> <code>event</code> <code>No</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><br><dt><code>cnt</code> <code>Ta</code> <code>event</code> <code>count</code> <code>(see</code> <code>the</code> <code>count</code> <code>No</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><dd></dl> + <br><dt><code>authinfo</code><dd>Display the authentication statistics counters: +time since reset, stored keys, free keys, key lookups, keys not found, +uncached keys, expired keys, encryptions, decryptions. +<br><dt><code>clocklist</code> <code>[</code><kbd>associd</kbd><code>]</code><br><dt><code>cl</code> <code>[</code><kbd>associd</kbd><code>]</code><dd>Display all clock variables in the variable list for those associations +supporting a reference clock. +<br><dt><code>clockvar</code> <code>[</code><kbd>associd</kbd><code>]</code> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code><code>[,...]</code><br><dt><code>cv</code> <code>[</code><kbd>associd</kbd><code>]</code> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code><code>[,...]</code><dd>Display a list of clock variables for those associations supporting a +reference clock. +<br><dt><code>:config</code> <kbd>configuration command line</kbd><dd>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. +<br><dt><code>config-from-file</code> <kbd>filename</kbd><dd>Send each line of <kbd>filename</kbd> -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. -<br><dt><code>ifstats</code><dd>Display statistics for each local network address. Authentication is required. -<br><dt><code>iostats</code><dd>Display network and reference clock I/O statistics. -<br><dt><code>kerninfo</code><dd>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. -<br><dt><code>lassociations</code><dd>Perform the same function as the associations command, except display mobilized and unmobilized associations. -<br><dt><code>lopeers</code> <code>[-4 | -6]</code><dd>Obtain and print a list of all peers and clients showing -<kbd>dstadr</kbd> -(associated with any given IP version). -<br><dt><code>lpeers</code> <code>[-4 | -6]</code><dd>Print a peer spreadsheet for the appropriate IP version(s). -<kbd>dstadr</kbd> -(associated with any given IP version). -<br><dt><code>monstats</code><dd>Display monitor facility statistics. -<br><dt><code>mrulist</code> <code>[limited | kod | mincount=</code><kbd>count</kbd><code> | laddr=</code><kbd>localaddr</kbd><code> | sort=</code><kbd>sortorder</kbd><code> | resany=</code><kbd>hexmask</kbd><code> | resall=</code><kbd>hexmask</kbd><code>]</code><dd>Obtain and print traffic counts collected and maintained by the monitor facility. +to the server as run-time configuration commands in the same format as +lines in the configuration file. +This command is experimental until further notice and clarification. +Authentication is required. +<br><dt><code>ifstats</code><dd>Display status and statistics counters for each local network interface address: +interface number, interface name and address or broadcast, drop, flag, +ttl, mc, received, sent, send failed, peers, uptime. +Authentication is required. +<br><dt><code>iostats</code><dd>Display network and reference clock I/O statistics: +time since reset, receive buffers, free receive buffers, used receive buffers, +low water refills, dropped packets, ignored packets, received packets, +packets sent, packet send failures, input wakeups, useful input wakeups. +<br><dt><code>kerninfo</code><dd>Display kernel loop and PPS statistics: +associd, status, pll offset, pll frequency, maximum error, +estimated error, kernel status, pll time constant, precision, +frequency tolerance, pps frequency, pps stability, pps jitter, +calibration interval, calibration cycles, jitter exceeded, +stability exceeded, calibration errors. +As with other ntpq output, times are in milliseconds; very small values +may be shown as exponentials. +The precision value displayed is in milliseconds as well, unlike the +precision system variable. +<br><dt><code>lassociations</code><dd>Perform the same function as the associations command, except display +mobilized and unmobilized associations, including all clients. +<br><dt><code>lopeers</code> <code>[-4|-6]</code><dd>Display a list of all peers and clients showing +<code>dstadr</code> +(associated with the given IP version). +<br><dt><code>lpassociations</code><dd>Display the last obtained list of associations, including all clients. +<br><dt><code>lpeers</code> <code>[-4|-6]</code><dd>Display a list of all peers and clients (associated with the given IP version). +<br><dt><code>monstats</code><dd>Display monitor facility status, statistics, and limits: +enabled, addresses, peak addresses, maximum addresses, +reclaim above count, reclaim older than, kilobytes, maximum kilobytes. +<br><dt><code>mreadlist</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd><br><dt><code>mrl</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd><dd>Perform the same function as the +<code>readlist</code> +command for a range of association ids. +<br><dt><code>mreadvar</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd> <code>[</code><kbd>name</kbd><code>]</code><code>[,...]</code><dd>This range may be determined from the list displayed by any +command showing associations. +<br><dt><code>mrv</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd> <code>[</code><kbd>name</kbd><code>]</code><code>[,...]</code><dd>Perform the same function as the +<code>readvar</code> +command for a range of association ids. +This range may be determined from the list displayed by any +command showing associations. +<br><dt><code>mrulist</code> <code>[limited | kod | mincount=</code><kbd>count</kbd><code> | laddr=</code><kbd>localaddr</kbd><code> | sort=[-]</code><kbd>sortorder</kbd><code> | resany=</code><kbd>hexmask</kbd><code> | resall=</code><kbd>hexmask</kbd><code>]</code><dd>Display traffic counts of the most recently seen source addresses +collected and maintained by the monitor facility. With the exception of -<code>sort</code>=<kbd>sortorder</kbd>, +<code>sort</code>=<code>[-]</code><kbd>sortorder</kbd>, the options filter the list returned by -<code>ntpd.</code> +<code>ntpd(8)</code>. The <code>limited</code> and <code>kod</code> -options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response. +options return only entries representing client addresses from which the +last packet received triggered either discarding or a KoD response. The <code>mincount</code>=<kbd>count</kbd> option filters entries representing less than @@ -402,22 +463,26 @@ The <kbd>sortorder</kbd> defaults to <code>lstint</code> -and may be any of +and may be <code>addr</code>, -<code>count</code>, <code>avgint</code>, +<code>count</code>, <code>lstint</code>, -or any of those preceded by a minus sign (hyphen) to reverse the sort order. +or any of those preceded by +- +to reverse the sort order. The output columns are: <dl> <dt>Column<dd>Description -<br><dt><code>lstint</code><dd>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 +<br><dt><code>lstint</code><dd>Interval in seconds between the receipt of the most recent packet from +this address and the completion of the retrieval of the MRU list by <code>ntpq</code> <br><dt><code>avgint</code><dd>Average interval in s between packets from this address. <br><dt><code>rstr</code><dd>Restriction flags associated with this address. Most are copied unchanged from the matching <code>restrict</code> -command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response. +command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless +the last packet from this address triggered a rate control response. <br><dt><code>r</code><dd>Rate control indicator, either a period, <code>L</code> @@ -429,20 +494,14 @@ rate limiting by discarding, or rate limiting with a KoD response, respectively. <br><dt><code>v</code><dd>Packet version number. <br><dt><code>count</code><dd>Packets received from this address. <br><dt><code>rport</code><dd>Source port of last packet from this address. -<br><dt><code>remote</code> <code>address</code><dd>DNS name, numeric address, or address followed by +<br><dt><code>remote</code> <code>address</code><dd>host or DNS name, numeric address, or address followed by claimed DNS name which could not be verified in parentheses. </dl> - <br><dt><code>mreadvar</code> <code>assocID</code> <code>assocID</code> <code>[</code><kbd>variable_name</kbd><code>[=</code><kbd>value</kbd><code>] ...]</code><br><dt><code>mrv</code> <code>assocID</code> <code>assocID</code> <code>[</code><kbd>variable_name</kbd><code>[=</code><kbd>value</kbd><code>] ...]</code><dd>Perform the same function as the -<code>readvar</code> -command, except for a range of association IDs. -This range is determined from the association list cached by the most recent -<code>associations</code> -command. -<br><dt><code>opeers</code> <code>[-4 | -6]</code><dd>Obtain and print the old-style list of all peers and clients showing -<kbd>dstadr</kbd> -(associated with any given IP version), + <br><dt><code>opeers</code> <code>[-4 | -6]</code><dd>Obtain and print the old-style list of all peers and clients showing +<code>dstadr</code> +(associated with the given IP version), rather than the -<kbd>refid</kbd>. +<code>refid</code>. <br><dt><code>passociations</code><dd>Perform the same function as the <code>associations</code> command, @@ -457,18 +516,22 @@ except that it uses previously stored data rather than making a new query. field of the .Lk decode.html#peer "peer status word" <br><dt><code>remote</code><dd>host name (or IP number) of peer. -The value displayed will be truncated to 15 characters unless the +The value displayed will be truncated to 15 characters unless the +<code>ntpq</code> <code>-w</code> -flag is given, in which case the full value will be displayed -on the first line, -and the remaining data is displayed on the next line. -<br><dt><code>refid</code><dd>association ID or +option is given, in which case the full value will be displayed +on the first line, and if too long, +the remaining data will be displayed on the next line. +<br><dt><code>refid</code><dd>source IP address or .Lk decode.html#kiss "'kiss code" -<br><dt><code>st</code><dd>stratum +<br><dt><code>st</code><dd>stratum: 0 for local reference clocks, 1 for servers with local +reference clocks, ..., 16 for unsynchronized server clocks <br><dt><code>t</code><dd><code>u</code>: unicast or manycast client, <code>b</code>: broadcast or multicast client, +<code>p</code>: +pool source, <code>l</code>: local (reference clock), <code>s</code>: @@ -479,89 +542,108 @@ manycast server, broadcast server, <code>M</code>: multicast server -<br><dt><code>when</code><dd>sec/min/hr since last received packet -<br><dt><code>poll</code><dd>poll interval (log2 s) +<br><dt><code>when</code><dd>time in seconds, minutes, hours, or days since the last packet +was received, or +- +if a packet has never been received +<br><dt><code>poll</code><dd>poll interval (s) <br><dt><code>reach</code><dd>reach shift register (octal) <br><dt><code>delay</code><dd>roundtrip delay <br><dt><code>offset</code><dd>offset of server relative to this host -<br><dt><code>jitter</code><dd>jitter +<br><dt><code>jitter</code><dd>offset RMS error estimate. </dl> - <br><dt><code>apeers</code><dd>Display a list of peers in the form: - <pre class="example"> [tally]remote refid assid st t when pool reach delay offset jitter - </pre> - <p>where the output is just like the -<code>peers</code> -command except that the -<code>refid</code> -is displayed in hex format and the association number is also displayed. -<br><dt><code>pstats</code> <kbd>assocID</kbd><dd>Show the statistics for the peer with the given -<kbd>assocID</kbd>. -<br><dt><code>readlist</code> <kbd>assocID</kbd><br><dt><code>rl</code> <kbd>assocID</kbd><dd>Read the system or peer variables included in the variable list. -<br><dt><code>readvar</code> <kbd>assocID</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code> <code>[, ...]</code><br><dt><code>rv</code> <kbd>assocID</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code> <code>[, ...]</code><dd>Display the specified variables. + <br><dt><code>pstats</code> <kbd>associd</kbd><dd>Display the statistics for the peer with the given +<kbd>associd</kbd>: +associd, status, remote host, local address, time last received, +time until next send, reachability change, packets sent, +packets received, bad authentication, bogus origin, duplicate, +bad dispersion, bad reference time, candidate order. +<br><dt><code>readlist</code> <code>[</code><kbd>associd</kbd><code>]</code><br><dt><code>rl</code> <code>[</code><kbd>associd</kbd><code>]</code><dd>Display all system or peer variables. +If the +<kbd>associd</kbd> +is omitted, it is assumed to be zero. +<br><dt><code>readvar</code> <code>[</code><kbd>associd</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>] [, ...]]</code><br><dt><code>rv</code> <code>[</code><kbd>associd</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>] [, ...]]</code><dd>Display the specified system or peer variables. If -<kbd>assocID</kbd> +<kbd>associd</kbd> is zero, the variables are from the <a href="#System-Variables">System Variables</a> name space, otherwise they are from the <a href="#Peer-Variables">Peer Variables</a> name space. The -<kbd>assocID</kbd> +<kbd>associd</kbd> is required, as the same name can occur in both spaces. If no <kbd>name</kbd> -is included, all operative variables in the name space are displayed. - - <p>In this case only, if the -<kbd>assocID</kbd> -is omitted, it is assumed zero. +is included, all operative variables in the name space are displayed. +In this case only, if the +<kbd>associd</kbd> +is omitted, it is assumed to be zero. Multiple names are specified with comma separators and without whitespace. Note that time values are represented in milliseconds and frequency values in parts-per-million (PPM). Some NTP timestamps are represented in the format -YYYYMMDDTTTT , -where YYYY is the year, -MM the month of year, -DD the day of month and -TTTT the time of day. -<br><dt><code>reslist</code><dd>Show the access control (restrict) list for +<kbd>YYYY</kbd><kbd>MM</kbd> <kbd>DD</kbd> <kbd>TTTT</kbd>, +where +<kbd>YYYY</kbd> +is the year, +<kbd>MM</kbd> +the month of year, +<kbd>DD</kbd> +the day of month and +<kbd>TTTT</kbd> +the time of day. +<br><dt><code>reslist</code><dd>Display the access control (restrict) list for <code>ntpq</code> - - <br><dt><code>saveconfig</code> <kbd>filename</kbd><dd>Write the current configuration, -including any runtime modifications given with +Authentication is required. +<br><dt><code>saveconfig</code> <kbd>filename</kbd><dd>Save the current configuration, +including any runtime modifications made by <code>:config</code> or <code>config-from-file</code>, -to the ntpd host's file +to the NTP server host file <kbd>filename</kbd>. This command will be rejected by the server unless .Lk miscopt.html#saveconfigdir "saveconfigdir" appears in the -<code>ntpd</code> +<code>ntpd(8)</code> configuration file. <kbd>filename</kbd> can use -<code>strftime()</code> -format specifies to substitute the current date and time, for example, -<code>q]saveconfig</code> <code>ntp-%Y%m%d-%H%M%S.confq]</code>. -The filename used is stored in system variable +<code>date(1)</code> +format specifiers to substitute the current date and time, for +example, + <pre class="example"> <code>saveconfig</code> <span class="file">ntp-%Y%m%d-%H%M%S.conf</span>. + </pre> + <p>The filename used is stored in system variable <code>savedconfig</code>. Authentication is required. -<br><dt><code>timerstats</code><dd>Display interval timer counters. -<br><dt><code>writelist</code> <kbd>assocID</kbd><dd>Write the system or peer variables included in the variable list. -<br><dt><code>writevar</code> <kbd>assocID</kbd> <kbd>name</kbd>=<kbd>value</kbd> <code>[, ...]</code><dd>Write the specified variables. +<br><dt><code>sysinfo</code><dd>Display system operational summary: +associd, status, system peer, system peer mode, leap indicator, +stratum, log2 precision, root delay, root dispersion, +reference id, reference time, system jitter, clock jitter, +clock wander, broadcast delay, symm. auth. delay. +<br><dt><code>sysstats</code><dd>Display system uptime and packet counts maintained in the +protocol module: +uptime, sysstats reset, packets received, current version, +older version, bad length or format, authentication failed, +declined, restricted, rate limited, KoD responses, +processed for time. +<br><dt><code>timerstats</code><dd>Display interval timer counters: +time since reset, timer overruns, calls to transmit. +<br><dt><code>writelist</code> <kbd>associd</kbd><dd>Set all system or peer variables included in the variable list. +<br><dt><code>writevar</code> <kbd>associd</kbd> <kbd>name</kbd>=<kbd>value</kbd> <code>[, ...]</code><dd>Set the specified variables in the variable list. If the -<kbd>assocID</kbd> +<kbd>associd</kbd> is zero, the variables are from the <a href="#System-Variables">System Variables</a> name space, otherwise they are from the <a href="#Peer-Variables">Peer Variables</a> name space. The -<kbd>assocID</kbd> +<kbd>associd</kbd> is required, as the same name can occur in both spaces. -<br><dt><code>sysinfo</code><dd>Display operational summary. -<br><dt><code>sysstats</code><dd>Print statistics counters maintained in the protocol module. +Authentication is required. </dl> <h5 class="subsubsection">Status Words and Kiss Codes</h5> @@ -570,10 +652,10 @@ is required, as the same name can occur in both spaces. in a set of status words maintained by the system. Status information is also available on a per-association basis. -These words are displayed in the -<code>rv</code> +These words are displayed by the +<code>readlist</code> and -<code>as</code> +<code>associations</code> commands both in hexadecimal and in decoded short tip strings. The codes, tips and short explanations are documented on the .Lk decode.html "Event Messages and Status Words" @@ -592,9 +674,10 @@ in the reference identifier field in various billboards. <h5 class="subsubsection">System Variables</h5> <p>The following system variables appear in the -<code>rv</code> +<code>readlist</code> billboard. Not all variables are displayed in some configurations. + <dl> <dt>Variable<dd>Description <br><dt><code>status</code><dd>.Lk decode.html#sys "system status word" @@ -606,16 +689,16 @@ Not all variables are displayed in some configurations. <br><dt><code>precision</code><dd>precision (log2 s) <br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock <br><dt><code>rootdisp</code><dd>total dispersion to the primary reference clock -<br><dt><code>peer</code><dd>system peer association ID -<br><dt><code>tc</code><dd>time constant and poll exponent (log2 s) (3-17) -<br><dt><code>mintc</code><dd>minimum time constant (log2 s) (3-10) -<br><dt><code>clock</code><dd>date and time of day -<br><dt><code>refid</code><dd>reference ID or +<br><dt><code>refid</code><dd>reference id or .Lk decode.html#kiss "kiss code" <br><dt><code>reftime</code><dd>reference time -<br><dt><code>offset</code><dd>combined offset of server relative to this host +<br><dt><code>clock</code><dd>date and time of day +<br><dt><code>peer</code><dd>system peer association id +<br><dt><code>tc</code><dd>time constant and poll exponent (log2 s) (3-17) +<br><dt><code>mintc</code><dd>minimum time constant (log2 s) (3-10) +<br><dt><code>offset</code><dd>combined offset of server relative to this host +<br><dt><code>frequency</code><dd>frequency drift (PPM) relative to hardware clock <br><dt><code>sys_jitter</code><dd>combined system jitter -<br><dt><code>frequency</code><dd>frequency offset (PPM) relative to hardware clock <br><dt><code>clk_wander</code><dd>clock frequency wander (PPM) <br><dt><code>clk_jitter</code><dd>clock jitter <br><dt><code>tai</code><dd>TAI-UTC offset (s) @@ -630,7 +713,6 @@ the clock jitter statistic is computed by the clock discipline module. additional system variables are displayed, including some or all of the following, depending on the particular Autokey dance: - <dl> <dt>Variable<dd>Description <br><dt><code>host</code><dd>Autokey host name for this host @@ -646,13 +728,13 @@ depending on the particular Autokey dance: <h5 class="subsubsection">Peer Variables</h5> <p>The following peer variables appear in the -<code>rv</code> +<code>readlist</code> billboard for each association. Not all variables are displayed in some configurations. <dl> <dt>Variable<dd>Description -<br><dt><code>associd</code><dd>association ID +<br><dt><code>associd</code><dd>association id <br><dt><code>status</code><dd>.Lk decode.html#peer "peer status word" <br><dt><code>srcadr</code><dd>source (remote) IP address <br><dt><code>srcport</code><dd>source (remote) port @@ -663,9 +745,10 @@ Not all variables are displayed in some configurations. <br><dt><code>precision</code><dd>precision (log2 s) <br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock <br><dt><code>rootdisp</code><dd>total root dispersion to the primary reference clock -<br><dt><code>refid</code><dd>reference ID or +<br><dt><code>refid</code><dd>reference id or .Lk decode.html#kiss "kiss code" <br><dt><code>reftime</code><dd>reference time +<br><dt><code>rec</code><dd>last packet received time <br><dt><code>reach</code><dd>reach register (octal) <br><dt><code>unreach</code><dd>unreach counter <br><dt><code>hmode</code><dd>host mode (1-6) @@ -675,11 +758,11 @@ Not all variables are displayed in some configurations. <br><dt><code>headway</code><dd>headway (see .Lk rate.html "Rate Management and the Kiss-o'-Death Packet" ) <br><dt><code>flash</code><dd>.Lk decode.html#flash "flash status word" +<br><dt><code>keyid</code><dd>symmetric key id <br><dt><code>offset</code><dd>filter offset <br><dt><code>delay</code><dd>filter delay <br><dt><code>dispersion</code><dd>filter dispersion <br><dt><code>jitter</code><dd>filter jitter -<br><dt><code>ident</code><dd>Autokey group name for this association <br><dt><code>bias</code><dd>unicast/broadcast bias <br><dt><code>xleave</code><dd>interleave delay (see .Lk xleave.html "NTP Interleaved Modes" ) @@ -688,7 +771,8 @@ Not all variables are displayed in some configurations. <code>bias</code> variable is calculated when the first broadcast packet is received after the calibration volley. -It represents the offset of the broadcast subgraph relative to the unicast subgraph. +It represents the offset of the broadcast subgraph relative to the +unicast subgraph. The <code>xleave</code> variable appears only for the interleaved symmetric and interleaved modes. @@ -703,20 +787,21 @@ additional peer variables are displayed, including the following: <br><dt><code>host</code><dd>Autokey server name <br><dt><code>flags</code><dd>peer flags (see Autokey specification) <br><dt><code>signature</code><dd>OpenSSL digest/signature scheme -<br><dt><code>initsequence</code><dd>initial key ID +<br><dt><code>initsequence</code><dd>initial key id <br><dt><code>initkey</code><dd>initial key index <br><dt><code>timestamp</code><dd>Autokey signature timestamp +<br><dt><code>ident</code><dd>Autokey group name for this association </dl> <h5 class="subsubsection">Clock Variables</h5> <p>The following clock variables appear in the -<code>cv</code> +<code>clocklist</code> billboard for each association with a reference clock. Not all variables are displayed in some configurations. <dl> <dt>Variable<dd>Description -<br><dt><code>associd</code><dd>association ID +<br><dt><code>associd</code><dd>association id <br><dt><code>status</code><dd>.Lk decode.html#clock "clock status word" <br><dt><code>device</code><dd>device description <br><dt><code>timecode</code><dd>ASCII time code string (specific to device) @@ -727,7 +812,7 @@ Not all variables are displayed in some configurations. <br><dt><code>fudgetime1</code><dd>fudge time 1 <br><dt><code>fudgetime2</code><dd>fudge time 2 <br><dt><code>stratum</code><dd>driver stratum -<br><dt><code>refid</code><dd>driver reference ID +<br><dt><code>refid</code><dd>driver reference id <br><dt><code>flags</code><dd>driver flags </dl> @@ -770,12 +855,12 @@ the usage text by passing it through a pager program. used to select the program, defaulting to <span class="file">more</span>. Both will exit with a status code of 0. -<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p10-beta +<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p10 Usage: ntpq [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...] Flg Arg Option-Name Description - -4 no ipv4 Force IPv4 DNS name resolution + -4 no ipv4 Force IPv4 name resolution - prohibits the option 'ipv6' - -6 no ipv6 Force IPv6 DNS name resolution + -6 no ipv6 Force IPv6 name resolution - prohibits the option 'ipv4' -c Str command run a command and exit - may appear multiple times @@ -826,7 +911,7 @@ Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> <h4 class="subsection">ipv4 option (-4)</h4> <p><a name="index-ntpq_002dipv4-4"></a> -This is the “force ipv4 dns name resolution” option. +This is the “force ipv4 name resolution” option. <p class="noindent">This option has some usage constraints. It: <ul> @@ -834,7 +919,7 @@ This is the “force ipv4 dns name resolution” option. ipv6. </ul> - <p>Force DNS resolution of following host names on the command line + <p>Force resolution of following host names on the command line to the IPv4 namespace. <div class="node"> <p><hr> @@ -847,7 +932,7 @@ Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> <h4 class="subsection">ipv6 option (-6)</h4> <p><a name="index-ntpq_002dipv6-5"></a> -This is the “force ipv6 dns name resolution” option. +This is the “force ipv6 name resolution” option. <p class="noindent">This option has some usage constraints. It: <ul> @@ -855,7 +940,7 @@ This is the “force ipv6 dns name resolution” option. ipv4. </ul> - <p>Force DNS resolution of following host names on the command line + <p>Force resolution of following host names on the command line to the IPv6 namespace. <div class="node"> <p><hr> @@ -1185,7 +1270,7 @@ This must correspond to a key ID configured in <code>ntp.conf</code> for this pu with default <code>MD5</code>. If the OpenSSL library is installed, digest can be be any message digest algorithm supported by the library. -The current selections are: <code>MD2</code>, <code>MD4</code>, <code>MD5</code>, <code>MDC2</code>, <code>RIPEMD160</code>, <code>SHA</code> and <code>SHA1</code>. +The current selections are: <code>AES128CMAC</code>, <code>MD2</code>, <code>MD4</code>, <code>MD5</code>, <code>MDC2</code>, <code>RIPEMD160</code>, <code>SHA</code> and <code>SHA1</code>. <br><dt><code><a name="ntpversion"></a> ntpversion 1 | 2 | 3 | 4</code><dd>Sets the NTP version number which <code>ntpq</code> claims in packets. Defaults to 2. |