Home | History | Annotate | Line # | Download | only in ntpq
      1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      2 <html>
      3 <!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
      4 <head>
      5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      6 <title>ntpq: Network Time Protocol Query User&rsquo;s Manual</title>
      7 
      8 <meta name="description" content="ntpq: Network Time Protocol Query User&rsquo;s Manual">
      9 <meta name="keywords" content="ntpq: Network Time Protocol Query User&rsquo;s Manual">
     10 <meta name="resource-type" content="document">
     11 <meta name="distribution" content="global">
     12 <meta name="Generator" content="makeinfo">
     13 <link href="#Top" rel="start" title="Top">
     14 <link href="dir.html#Top" rel="up" title="(dir)">
     15 <style type="text/css">
     16 <!--
     17 a.summary-letter {text-decoration: none}
     18 blockquote.indentedblock {margin-right: 0em}
     19 div.display {margin-left: 3.2em}
     20 div.example {margin-left: 3.2em}
     21 div.lisp {margin-left: 3.2em}
     22 kbd {font-style: oblique}
     23 pre.display {font-family: inherit}
     24 pre.format {font-family: inherit}
     25 pre.menu-comment {font-family: serif}
     26 pre.menu-preformatted {font-family: serif}
     27 span.nolinebreak {white-space: nowrap}
     28 span.roman {font-family: initial; font-weight: normal}
     29 span.sansserif {font-family: sans-serif; font-weight: normal}
     30 ul.no-bullet {list-style: none}
     31 -->
     32 </style>
     33 
     34 
     35 </head>
     36 
     37 <body lang="en">
     38 <h1 class="settitle" align="center">ntpq: Network Time Protocol Query User&rsquo;s Manual</h1>
     39 
     40 
     41 
     42 
     43 
     44 <span id="SEC_Overview"></span>
     45 <h2 class="shortcontents-heading">Short Table of Contents</h2>
     46 
     47 <div class="shortcontents">
     48 <ul class="no-bullet">
     49 <li><a id="stoc-Description" href="#toc-Description">1 Description</a></li>
     50 </ul>
     51 </div>
     52 
     53 
     54 <span id="Top"></span><div class="header">
     55 <p>
     56 Next: <a href="#ntpq-Description" accesskey="n" rel="next">ntpq Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
     57 </div>
     58 <span id="ntpq_003a-Network-Time-Protocol-Query-User-Manual"></span><h1 class="top">ntpq: Network Time Protocol Query User Manual</h1>
     59 
     60 <p>The <code>ntpq</code> utility program is used to
     61 monitor the operational status
     62 and determine the performance of
     63 <code>ntpd</code>, the NTP daemon.
     64 </p>
     65 <p>This document applies to version 4.2.8p18 of <code>ntpq</code>.
     66 </p>
     67 <table class="menu" border="0" cellspacing="0">
     68 <tr><td align="left" valign="top">&bull; <a href="#ntpq-Description" accesskey="1">ntpq Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
     69 </td></tr>
     70 <tr><td align="left" valign="top">&bull; <a href="#ntpq-Invocation" accesskey="2">ntpq Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpq
     71 </td></tr>
     72 <tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
     73 </td></tr>
     74 <tr><td align="left" valign="top">&bull; <a href="#Internal-Commands" accesskey="4">Internal Commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
     75 </td></tr>
     76 <tr><td align="left" valign="top">&bull; <a href="#Control-Message-Commands" accesskey="5">Control Message Commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
     77 </td></tr>
     78 <tr><td align="left" valign="top">&bull; <a href="#Status-Words-and-Kiss-Codes" accesskey="6">Status Words and Kiss Codes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
     79 </td></tr>
     80 <tr><td align="left" valign="top">&bull; <a href="#System-Variables" accesskey="7">System Variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
     81 </td></tr>
     82 <tr><td align="left" valign="top">&bull; <a href="#Peer-Variables" accesskey="8">Peer Variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
     83 </td></tr>
     84 <tr><td align="left" valign="top">&bull; <a href="#Clock-Variables" accesskey="9">Clock Variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
     85 </td></tr>
     86 </table>
     87 
     88 <hr>
     89 <span id="ntpq-Description"></span><div class="header">
     90 <p>
     91 Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
     92 </div>
     93 <span id="Description"></span><h2 class="chapter">1 Description</h2>
     94 
     95 <p>The <code>ntpq</code> utility program is used to monitor NTP daemon <code>ntpd</code> operations and determine performance.
     96 It uses the standard NTP mode 6 control message formats defined in
     97 Appendix B of the NTPv3 specification RFC1305.
     98 The same formats are used in NTPv4, although some of the variable names have changed and new ones added.
     99 The description on this page is for the NTPv4 variables.
    100 </p>
    101 <p>The program can be run either in interactive mode or controlled using command line arguments.  Requests to read and write arbitrary variables can be assembled, with raw and pretty-printed output options being available.  The <code>ntpq</code> can also obtain and print a list of peers in a common format by sending multiple queries to the server.
    102 </p>
    103 <p>If one or more request options is included on the command line when <code>ntpq</code> is executed, each of the requests will be sent to the NTP servers running on each of the hosts given as command line arguments, or on localhost by default.  If no request options are given, <code>ntpq</code> will attempt to read commands from the standard input and execute these on the NTP server running on the first host given on the command line, again defaulting to localhost when no other host is specified.  <code>ntpq</code> will prompt for commands if the standard input is a terminal device.
    104 </p>
    105 <p><code>ntpq</code> uses NTP mode 6 packets to communicate with the NTP server, and hence can be used to query any compatible server on the network which permits it.  Note that since NTP is a UDP protocol this communication will be somewhat unreliable, especially over large distances in terms of network topology.  <code>ntpq</code> makes one attempt to retransmit requests, and will time requests out if the remote host is not heard from within a suitable timeout time.
    106 </p>
    107 <p>Note that in contexts where a host name is expected, a <code>-4</code> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <code>-6</code> qualifier forces DNS resolution to the IPv6 namespace.
    108 </p>
    109 <p>For examples and usage, see the <a href="debug.html">NTP Debugging Techniques</a> page.
    110 </p>
    111 <table class="menu" border="0" cellspacing="0">
    112 <tr><td align="left" valign="top">&bull; <a href="#ntpq-Invocation" accesskey="1">Invoking ntpq</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    113 </td></tr>
    114 <tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    115 </td></tr>
    116 <tr><td align="left" valign="top">&bull; <a href="#Internal-Commands" accesskey="3">Internal Commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    117 </td></tr>
    118 <tr><td align="left" valign="top">&bull; <a href="#Control-Message-Commands" accesskey="4">Control Message Commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    119 </td></tr>
    120 <tr><td align="left" valign="top">&bull; <a href="#Status-Words-and-Kiss-Codes" accesskey="5">Status Words and Kiss Codes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    121 </td></tr>
    122 <tr><td align="left" valign="top">&bull; <a href="#System-Variables" accesskey="6">System Variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    123 </td></tr>
    124 <tr><td align="left" valign="top">&bull; <a href="#Peer-Variables" accesskey="7">Peer Variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    125 </td></tr>
    126 <tr><td align="left" valign="top">&bull; <a href="#Clock-Variables" accesskey="8">Clock Variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    127 </td></tr>
    128 </table>
    129 
    130 <hr>
    131 <span id="ntpq-Invocation"></span><div class="header">
    132 <p>
    133 Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#ntpq-Description" accesskey="p" rel="prev">ntpq Description</a>, Up: <a href="#ntpq-Description" accesskey="u" rel="up">ntpq Description</a> &nbsp; </p>
    134 </div>
    135 <span id="Invoking-ntpq"></span><h3 class="section">1.1 Invoking ntpq</h3>
    136 <span id="index-ntpq"></span>
    137 <span id="index-standard-NTP-query-program"></span>
    138 
    139 
    140 <p>The
    141 <code>ntpq</code>
    142 utility program is used to query NTP servers to monitor NTP operations
    143 and performance, requesting
    144 information about current state and/or changes in that state.
    145 The program may be run either in interactive mode or controlled using
    146 command line arguments.
    147 Requests to read and write arbitrary
    148 variables can be assembled, with raw and pretty-printed output
    149 options being available.
    150 The
    151 <code>ntpq</code>
    152 utility can also obtain and print a
    153 list of peers in a common format by sending multiple queries to the
    154 server.
    155 </p>
    156 <p>If one or more request options is included on the command line
    157 when
    158 <code>ntpq</code>
    159 is executed, each of the requests will be sent
    160 to the NTP servers running on each of the hosts given as command
    161 line arguments, or on localhost by default.
    162 If no request options
    163 are given,
    164 <code>ntpq</code>
    165 will attempt to read commands from the
    166 standard input and execute these on the NTP server running on the
    167 first host given on the command line, again defaulting to localhost
    168 when no other host is specified.
    169 The
    170 <code>ntpq</code>
    171 utility will prompt for
    172 commands if the standard input is a terminal device.
    173 </p>
    174 <p><code>ntpq</code>
    175 uses NTP mode 6 packets to communicate with the
    176 NTP server, and hence can be used to query any compatible server on
    177 the network which permits it.
    178 Note that since NTP is a UDP protocol
    179 this communication will be somewhat unreliable, especially over
    180 large distances in terms of network topology.
    181 The
    182 <code>ntpq</code>
    183 utility makes
    184 one attempt to retransmit requests, and will time requests out if
    185 the remote host is not heard from within a suitable timeout
    186 time.
    187 </p>
    188 <p>Note that in contexts where a host name is expected, a
    189 <code>-4</code>
    190 qualifier preceding the host name forces resolution to the IPv4
    191 namespace, while a
    192 <code>-6</code>
    193 qualifier forces resolution to the IPv6 namespace.
    194 For examples and usage, see the
    195 &ldquo;NTP Debugging Techniques&rdquo;
    196 page.
    197 </p>
    198 <p>Specifying a
    199 command line option other than
    200 <code>-i</code>
    201 or
    202 <code>-n</code>
    203 will
    204 cause the specified query (queries) to be sent to the indicated
    205 host(s) immediately.
    206 Otherwise,
    207 <code>ntpq</code>
    208 will attempt to read
    209 interactive format commands from the standard input.
    210 </p>
    211 <table class="menu" border="0" cellspacing="0">
    212 <tr><td align="left" valign="top">&bull; <a href="#ntpq-usage" accesskey="1">ntpq help/usage (<samp>--help</samp>)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    213 </td></tr>
    214 <tr><td align="left" valign="top">&bull; <a href="#ntpq-ipv4" accesskey="2">ipv4 option (-4)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    215 </td></tr>
    216 <tr><td align="left" valign="top">&bull; <a href="#ntpq-ipv6" accesskey="3">ipv6 option (-6)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    217 </td></tr>
    218 <tr><td align="left" valign="top">&bull; <a href="#ntpq-command" accesskey="4">command option (-c)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    219 </td></tr>
    220 <tr><td align="left" valign="top">&bull; <a href="#ntpq-interactive" accesskey="5">interactive option (-i)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    221 </td></tr>
    222 <tr><td align="left" valign="top">&bull; <a href="#ntpq-numeric" accesskey="6">numeric option (-n)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    223 </td></tr>
    224 <tr><td align="left" valign="top">&bull; <a href="#ntpq-old_002drv" accesskey="7">old-rv option</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    225 </td></tr>
    226 <tr><td align="left" valign="top">&bull; <a href="#ntpq-peers" accesskey="8">peers option (-p)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    227 </td></tr>
    228 <tr><td align="left" valign="top">&bull; <a href="#ntpq-refid" accesskey="9">refid option (-r)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    229 </td></tr>
    230 <tr><td align="left" valign="top">&bull; <a href="#ntpq-unconnected">unconnected option (-u)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    231 </td></tr>
    232 <tr><td align="left" valign="top">&bull; <a href="#ntpq-wide">wide option (-w)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    233 </td></tr>
    234 <tr><td align="left" valign="top">&bull; <a href="#ntpq-config">presetting/configuring ntpq</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    235 </td></tr>
    236 <tr><td align="left" valign="top">&bull; <a href="#ntpq-exit-status">ntpq exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
    237 </td></tr>
    238 </table>
    239 
    240 <span id="Internal-Commands-1"></span><h4 class="subsection">1.1.1 Internal Commands</h4>
    241 
    242 <p>Interactive format commands consist of a keyword followed by zero
    243 to four arguments.
    244 Only enough characters of the full keyword to
    245 uniquely identify the command need be typed.
    246 </p>
    247 <p>A
    248 number of interactive format commands are executed entirely within
    249 the
    250 <code>ntpq</code>
    251 utility itself and do not result in NTP
    252 requests being sent to a server.
    253 These are described following.
    254 </p><dl compact="compact">
    255 <dt><code>?</code> <code>[<kbd>command</kbd>]</code></dt>
    256 <dt><code>help</code> <code>[<kbd>command</kbd>]</code></dt>
    257 <dd><p>A
    258 &lsquo;?&rsquo;
    259 by itself will print a list of all the commands
    260 known to
    261 <code>ntpq</code>
    262 A
    263 &lsquo;?&rsquo;
    264 followed by a command name will print function and usage
    265 information about the command.
    266 </p></dd>
    267 <dt><code>addvars</code> <kbd>name</kbd><code>[=<kbd>value</kbd>]</code><code>[,...]</code></dt>
    268 <dt><code>rmvars</code> <kbd>name</kbd><code>[,...]</code></dt>
    269 <dt><code>clearvars</code></dt>
    270 <dt><code>showvars</code></dt>
    271 <dd><p>The arguments to this command consist of a list of
    272 items of the form
    273 <kbd>name</kbd><code>[=<kbd>value</kbd>]</code>,
    274 where the
    275 .No = Ns Ar value
    276 is ignored, and can be omitted,
    277 in requests to the server to read variables.
    278 The
    279 <code>ntpq</code>
    280 utility maintains an internal list in which data to be included in
    281 messages can be assembled, and displayed or set using the
    282 <code>readlist</code>
    283 and
    284 <code>writelist</code>
    285 commands described below.
    286 The
    287 <code>addvars</code>
    288 command allows variables and their optional values to be added to
    289 the list.
    290 If more than one variable is to be added, the list should
    291 be comma-separated and not contain white space.
    292 The
    293 <code>rmvars</code>
    294 command can be used to remove individual variables from the list,
    295 while the
    296 <code>clearvars</code>
    297 command removes all variables from the
    298 list.
    299 The
    300 <code>showvars</code>
    301 command displays the current list of optional variables.
    302 </p></dd>
    303 <dt><code>authenticate</code> <code>[<code>yes</code>|<code>no</code>]</code></dt>
    304 <dd><p>Normally
    305 <code>ntpq</code>
    306 does not authenticate requests unless
    307 they are write requests.
    308 The command
    309 <code>authenticate</code> <code>yes</code>
    310 causes
    311 <code>ntpq</code>
    312 to send authentication with all requests it
    313 makes.
    314 Authenticated requests causes some servers to handle
    315 requests slightly differently.
    316 The command
    317 <code>authenticate</code>
    318 causes
    319 <code>ntpq</code>
    320 to display whether or not
    321 it is currently authenticating requests.
    322 </p></dd>
    323 <dt><code>cooked</code></dt>
    324 <dd><p>Causes output from query commands to be &quot;cooked&quot;, so that
    325 variables which are recognized by
    326 <code>ntpq</code>
    327 will have their
    328 values reformatted for human consumption.
    329 Variables which
    330 <code>ntpq</code>
    331 could not decode completely are
    332 marked with a trailing
    333 &lsquo;?&rsquo;.
    334 </p></dd>
    335 <dt><code>debug</code> <code>[<code>more</code>|<code>less</code>|<code>off</code>]</code></dt>
    336 <dd><p>With no argument, displays the current debug level.
    337 Otherwise, the debugging level is changed as indicated.
    338 </p></dd>
    339 <dt><code>delay</code> <code>[<kbd>milliseconds</kbd>]</code></dt>
    340 <dd><p>Specify a time interval to be added to timestamps included in
    341 requests which require authentication.
    342 This is used to enable
    343 (unreliable) server reconfiguration over long delay network paths
    344 or between machines whose clocks are unsynchronized.
    345 Actually the
    346 server does not now require timestamps in authenticated requests,
    347 so this command may be obsolete.
    348 Without any arguments, displays the current delay.
    349 </p></dd>
    350 <dt><code>drefid</code> <code>[<code>hash</code>|<code>ipv4</code>]</code></dt>
    351 <dd><p>Display refids as IPv4 or hash.
    352 Without any arguments, displays whether refids are shown as IPv4
    353 addresses or hashes.
    354 </p></dd>
    355 <dt><code>exit</code></dt>
    356 <dd><p>Exit
    357 <code>ntpq</code>
    358 </p></dd>
    359 <dt><code>host</code> <code>[<kbd>name</kbd>]</code></dt>
    360 <dd><p>Set the host to which future queries will be sent.
    361 The
    362 <kbd>name</kbd>
    363 may be either a host name or a numeric address.
    364 Without any arguments, displays the current host.
    365 </p></dd>
    366 <dt><code>hostnames</code> <code>[<code>yes</code>|<code>no</code>]</code></dt>
    367 <dd><p>If
    368 <code>yes</code>
    369 is specified, host names are printed in
    370 information displays.
    371 If
    372 <code>no</code>
    373 is specified, numeric
    374 addresses are printed instead.
    375 The default is
    376 <code>yes</code>,
    377 unless
    378 modified using the command line
    379 <code>-n</code>
    380 switch.
    381 Without any arguments, displays whether host names or numeric addresses
    382 are shown.
    383 </p></dd>
    384 <dt><code>keyid</code> <code>[<kbd>keyid</kbd>]</code></dt>
    385 <dd><p>This command allows the specification of a key number to be
    386 used to authenticate configuration requests.
    387 This must correspond
    388 to the
    389 <code>controlkey</code>
    390 key number the server has been configured to use for this
    391 purpose.
    392 Without any arguments, displays the current
    393 <kbd>keyid</kbd>.
    394 </p></dd>
    395 <dt><code>keytype</code> <code>[<kbd>digest</kbd>]</code></dt>
    396 <dd><p>Specify the digest algorithm to use for authenticating requests, with default
    397 <code>MD5</code>.
    398 If
    399 <code>ntpq</code>
    400 was built with OpenSSL support, and OpenSSL is installed,
    401 <kbd>digest</kbd>
    402 can be any message digest algorithm supported by OpenSSL.
    403 If no argument is given, the current
    404 <code>keytype</code> <kbd>digest</kbd>
    405 algorithm used is displayed.
    406 </p></dd>
    407 <dt><code>ntpversion</code> <code>[<code>1</code>|<code>2</code>|<code>3</code>|<code>4</code>]</code></dt>
    408 <dd><p>Sets the NTP version number which
    409 <code>ntpq</code>
    410 claims in
    411 packets.
    412 Defaults to 3, and note that mode 6 control messages (and
    413 modes, for that matter) didn&rsquo;t exist in NTP version 1.
    414 There appear
    415 to be no servers left which demand version 1.
    416 With no argument, displays the current NTP version that will be used
    417 when communicating with servers.
    418 </p></dd>
    419 <dt><code>passwd</code></dt>
    420 <dd><p>This command prompts you to type in a password (which will not
    421 be echoed) which will be used to authenticate configuration
    422 requests.
    423 The password must correspond to the key configured for
    424 use by the NTP server for this purpose if such requests are to be
    425 successful.
    426 </p></dd>
    427 <dt><code>poll</code> <code>[<kbd>n</kbd>]</code> <code>[<code>verbose</code>]</code></dt>
    428 <dd><p>Poll an NTP server in client mode
    429 <kbd>n</kbd>
    430 times.
    431 Poll not implemented yet.
    432 </p></dd>
    433 <dt><code>quit</code></dt>
    434 <dd><p>Exit
    435 <code>ntpq</code>
    436 </p></dd>
    437 <dt><code>raw</code></dt>
    438 <dd><p>Causes all output from query commands is printed as received
    439 from the remote server.
    440 The only formating/interpretation done on
    441 the data is to transform nonascii data into a printable (but barely
    442 understandable) form.
    443 </p></dd>
    444 <dt><code>timeout</code> <code>[<kbd>milliseconds</kbd>]</code></dt>
    445 <dd><p>Specify a timeout period for responses to server queries.
    446 The
    447 default is about 5000 milliseconds.
    448 Without any arguments, displays the current timeout period.
    449 Note that since
    450 <code>ntpq</code>
    451 retries each query once after a timeout, the total waiting time for
    452 a timeout will be twice the timeout value set.
    453 </p></dd>
    454 <dt><code>version</code></dt>
    455 <dd><p>Display the version of the
    456 <code>ntpq</code>
    457 program.
    458 </p></dd>
    459 </dl>
    460 
    461 <span id="Control-Message-Commands-1"></span><h4 class="subsubsection">1.1.1.1 Control Message Commands</h4>
    462 <p>Association ids are used to identify system, peer and clock variables.
    463 System variables are assigned an association id of zero and system name
    464 space, while each association is assigned a nonzero association id and
    465 peer namespace.
    466 Most control commands send a single message to the server and expect a
    467 single response message.
    468 The exceptions are the
    469 <code>peers</code>
    470 command, which sends a series of messages,
    471 and the
    472 <code>mreadlist</code>
    473 and
    474 <code>mreadvar</code>
    475 commands, which iterate over a range of associations.
    476 </p><dl compact="compact">
    477 <dt><code>apeers</code></dt>
    478 <dd><p>Display a list of peers in the form:
    479 </p><div class="example">
    480 <pre class="example">[tally]remote refid assid st t when pool reach delay offset jitter
    481 </pre></div>
    482 <p>where the output is just like the
    483 <code>peers</code>
    484 command except that the
    485 <code>refid</code>
    486 is displayed in hex format and the association number is also displayed.
    487 </p></dd>
    488 <dt><code>associations</code></dt>
    489 <dd><p>Display a list of mobilized associations in the form:
    490 </p><div class="example">
    491 <pre class="example">ind assid status conf reach auth condition last_event cnt
    492 </pre></div>
    493 <dl compact="compact">
    494 <dt>Sy Variable Ta Sy Description</dt>
    495 <dt><code>ind</code> <code>Ta</code> <code>index</code> <code>on</code> <code>this</code> <code>list</code></dt>
    496 <dt><code>assid</code> <code>Ta</code> <code>association</code> <code>id</code></dt>
    497 <dt><code>status</code> <code>Ta</code> <code>peer</code> <code>status</code> <code>word</code></dt>
    498 <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></dt>
    499 <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></dt>
    500 <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></dt>
    501 <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></dt>
    502 <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></dt>
    503 <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></dt>
    504 </dl>
    505 </dd>
    506 <dt><code>authinfo</code></dt>
    507 <dd><p>Display the authentication statistics counters:
    508 time since reset, stored keys, free keys, key lookups, keys not found,
    509 uncached keys, expired keys, encryptions, decryptions.
    510 </p></dd>
    511 <dt><code>clocklist</code> <code>[<kbd>associd</kbd>]</code></dt>
    512 <dt><code>cl</code> <code>[<kbd>associd</kbd>]</code></dt>
    513 <dd><p>Display all clock variables in the variable list for those associations
    514 supporting a reference clock.
    515 </p></dd>
    516 <dt><code>clockvar</code> <code>[<kbd>associd</kbd>]</code> <code>[<kbd>name</kbd><code>[=<kbd>value</kbd>]</code>]</code><code>[,...]</code></dt>
    517 <dt><code>cv</code> <code>[<kbd>associd</kbd>]</code> <code>[<kbd>name</kbd><code>[=<kbd>value</kbd>]</code>]</code><code>[,...]</code></dt>
    518 <dd><p>Display a list of clock variables for those associations supporting a
    519 reference clock.
    520 </p></dd>
    521 <dt><code>:config</code> <kbd>configuration command line</kbd></dt>
    522 <dd><p>Send the remainder of the command line, including whitespace, to the
    523 server as a run-time configuration command in the same format as a line
    524 in the configuration file.
    525 This command is experimental until further notice and clarification.
    526 Authentication is of course required.
    527 </p></dd>
    528 <dt><code>config-from-file</code> <kbd>filename</kbd></dt>
    529 <dd><p>Send each line of
    530 <kbd>filename</kbd>
    531 to the server as run-time configuration commands in the same format as
    532 lines in the configuration file.
    533 This command is experimental until further notice and clarification.
    534 Authentication is required.
    535 </p></dd>
    536 <dt><code>ifstats</code></dt>
    537 <dd><p>Display status and statistics counters for each local network interface address:
    538 interface number, interface name and address or broadcast, drop, flag,
    539 ttl, mc, received, sent, send failed, peers, uptime.
    540 Authentication is required.
    541 </p></dd>
    542 <dt><code>iostats</code></dt>
    543 <dd><p>Display network and reference clock I/O statistics:
    544 time since reset, receive buffers, free receive buffers, used receive buffers,
    545 low water refills, dropped packets, ignored packets, received packets,
    546 packets sent, packet send failures, input wakeups, useful input wakeups.
    547 </p></dd>
    548 <dt><code>kerninfo</code></dt>
    549 <dd><p>Display kernel loop and PPS statistics:
    550 associd, status, pll offset, pll frequency, maximum error,
    551 estimated error, kernel status, pll time constant, precision,
    552 frequency tolerance, pps frequency, pps stability, pps jitter,
    553 calibration interval, calibration cycles, jitter exceeded,
    554 stability exceeded, calibration errors.
    555 As with other ntpq output, times are in milliseconds; very small values
    556 may be shown as exponentials.
    557 The precision value displayed is in milliseconds as well, unlike the
    558 precision system variable.
    559 </p></dd>
    560 <dt><code>lassociations</code></dt>
    561 <dd><p>Perform the same function as the associations command, except display
    562 mobilized and unmobilized associations, including all clients.
    563 </p></dd>
    564 <dt><code>lopeers</code> <code>[<code>-4</code>|<code>-6</code>]</code></dt>
    565 <dd><p>Display a list of all peers and clients showing
    566 <code>dstadr</code>
    567 (associated with the given IP version).
    568 </p></dd>
    569 <dt><code>lpassociations</code></dt>
    570 <dd><p>Display the last obtained list of associations, including all clients.
    571 </p></dd>
    572 <dt><code>lpeers</code> <code>[<code>-4</code>|<code>-6</code>]</code></dt>
    573 <dd><p>Display a list of all peers and clients (associated with the given IP version).
    574 </p></dd>
    575 <dt><code>monstats</code></dt>
    576 <dd><p>Display monitor facility status, statistics, and limits:
    577 enabled, addresses, peak addresses, maximum addresses,
    578 reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
    579 </p></dd>
    580 <dt><code>mreadlist</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd></dt>
    581 <dt><code>mrl</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd></dt>
    582 <dd><p>Perform the same function as the
    583 <code>readlist</code>
    584 command for a range of association ids.
    585 </p></dd>
    586 <dt><code>mreadvar</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd> <code>[<kbd>name</kbd>]</code><code>[,...]</code></dt>
    587 <dd><p>This range may be determined from the list displayed by any
    588 command showing associations.
    589 </p></dd>
    590 <dt><code>mrv</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd> <code>[<kbd>name</kbd>]</code><code>[,...]</code></dt>
    591 <dd><p>Perform the same function as the
    592 <code>readvar</code>
    593 command for a range of association ids.
    594 This range may be determined from the list displayed by any
    595 command showing associations.
    596 </p></dd>
    597 <dt><code>mrulist</code> <code>[<code>limited</code> | <code>kod</code> | <code>mincount</code>=<kbd>count</kbd> | <code>laddr</code>=<kbd>localaddr</kbd> | <code>sort</code>=<code>[-]</code><kbd>sortorder</kbd> | <code>resany</code>=<kbd>hexmask</kbd> | <code>resall</code>=<kbd>hexmask</kbd>]</code></dt>
    598 <dd><p>Display traffic counts of the most recently seen source addresses
    599 collected and maintained by the monitor facility.
    600 With the exception of
    601 <code>sort</code>=<code>[-]</code><kbd>sortorder</kbd>,
    602 the options filter the list returned by
    603 <code>ntpd(8)</code>.
    604 The
    605 <code>limited</code>
    606 and
    607 <code>kod</code>
    608 options return only entries representing client addresses from which the
    609 last packet received triggered either discarding or a KoD response.
    610 The
    611 <code>mincount</code>=<kbd>count</kbd>
    612 option filters entries representing less than
    613 <kbd>count</kbd>
    614 packets.
    615 The
    616 <code>laddr</code>=<kbd>localaddr</kbd>
    617 option filters entries for packets received on any local address other than
    618 <kbd>localaddr</kbd>.
    619 <code>resany</code>=<kbd>hexmask</kbd>
    620 and
    621 <code>resall</code>=<kbd>hexmask</kbd>
    622 filter entries containing none or less than all, respectively, of the bits in
    623 <kbd>hexmask</kbd>,
    624 which must begin with
    625 <code>0x</code>.
    626 The
    627 <kbd>sortorder</kbd>
    628 defaults to
    629 <code>lstint</code>
    630 and may be 
    631 <code>addr</code>,
    632 <code>avgint</code>,
    633 <code>count</code>,
    634 <code>lstint</code>,
    635 or any of those preceded by
    636 &lsquo;-&rsquo;
    637 to reverse the sort order.
    638 The output columns are:
    639 </p><dl compact="compact">
    640 <dt>Column</dt>
    641 <dd><p>Description
    642 </p></dd>
    643 <dt><code>lstint</code></dt>
    644 <dd><p>Interval in seconds between the receipt of the most recent packet from
    645 this address and the completion of the retrieval of the MRU list by
    646 <code>ntpq</code>
    647 </p></dd>
    648 <dt><code>avgint</code></dt>
    649 <dd><p>Average interval in s between packets from this address.
    650 </p></dd>
    651 <dt><code>rstr</code></dt>
    652 <dd><p>Restriction flags associated with this address.
    653 Most are copied unchanged from the matching
    654 <code>restrict</code>
    655 command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
    656 the last packet from this address triggered a rate control response.
    657 </p></dd>
    658 <dt><code>r</code></dt>
    659 <dd><p>Rate control indicator, either
    660 a period,
    661 <code>L</code>
    662 or
    663 <code>K</code>
    664 for no rate control response,
    665 rate limiting by discarding, or rate limiting with a KoD response, respectively.
    666 </p></dd>
    667 <dt><code>m</code></dt>
    668 <dd><p>Packet mode.
    669 </p></dd>
    670 <dt><code>v</code></dt>
    671 <dd><p>Packet version number.
    672 </p></dd>
    673 <dt><code>count</code></dt>
    674 <dd><p>Packets received from this address.
    675 </p></dd>
    676 <dt><code>rport</code></dt>
    677 <dd><p>Source port of last packet from this address.
    678 </p></dd>
    679 <dt><code>remote</code> <code>address</code></dt>
    680 <dd><p>host or DNS name, numeric address, or address followed by
    681 claimed DNS name which could not be verified in parentheses.
    682 </p></dd>
    683 </dl>
    684 </dd>
    685 <dt><code>opeers</code> <code>[<code>-4</code> | <code>-6</code>]</code></dt>
    686 <dd><p>Obtain and print the old-style list of all peers and clients showing
    687 <code>dstadr</code>
    688 (associated with the given IP version),
    689 rather than the
    690 <code>refid</code>.
    691 </p></dd>
    692 <dt><code>passociations</code></dt>
    693 <dd><p>Perform the same function as the
    694 <code>associations</code>
    695 command,
    696 except that it uses previously stored data rather than making a new query.
    697 </p></dd>
    698 <dt><code>peers</code></dt>
    699 <dd><p>Display a list of peers in the form:
    700 </p><div class="example">
    701 <pre class="example">[tally]remote refid st t when pool reach delay offset jitter
    702 </pre></div>
    703 <dl compact="compact">
    704 <dt>Variable</dt>
    705 <dd><p>Description
    706 </p></dd>
    707 <dt><code>[tally]</code></dt>
    708 <dd><p>single-character code indicating current value of the
    709 <code>select</code>
    710 field of the
    711 .Lk decode.html#peer &quot;peer status word&quot;
    712 </p></dd>
    713 <dt><code>remote</code></dt>
    714 <dd><p>host name (or IP number) of peer.
    715 The value displayed will be truncated to 15 characters unless the
    716 <code>ntpq</code>
    717 <code>-w</code>
    718 option is given, in which case the full value will be displayed
    719 on the first line, and if too long,
    720 the remaining data will be displayed on the next line.
    721 </p></dd>
    722 <dt><code>refid</code></dt>
    723 <dd><p>source IP address or
    724 .Lk decode.html#kiss &quot;&rsquo;kiss code&quot;
    725 </p></dd>
    726 <dt><code>st</code></dt>
    727 <dd><p>stratum: 0 for local reference clocks, 1 for servers with local
    728 reference clocks, ..., 16 for unsynchronized server clocks
    729 </p></dd>
    730 <dt><code>t</code></dt>
    731 <dd><p><code>u</code>:
    732 unicast or manycast client,
    733 <code>b</code>:
    734 broadcast or multicast client,
    735 <code>p</code>:
    736 pool source,
    737 <code>l</code>:
    738 local (reference clock),
    739 <code>s</code>:
    740 symmetric (peer),
    741 <code>A</code>:
    742 manycast server,
    743 <code>B</code>:
    744 broadcast server,
    745 <code>M</code>:
    746 multicast server
    747 </p></dd>
    748 <dt><code>when</code></dt>
    749 <dd><p>time in seconds, minutes, hours, or days since the last packet
    750 was received, or
    751 &lsquo;-&rsquo;
    752 if a packet has never been received
    753 </p></dd>
    754 <dt><code>poll</code></dt>
    755 <dd><p>poll interval (s)
    756 </p></dd>
    757 <dt><code>reach</code></dt>
    758 <dd><p>reach shift register (octal)
    759 </p></dd>
    760 <dt><code>delay</code></dt>
    761 <dd><p>roundtrip delay
    762 </p></dd>
    763 <dt><code>offset</code></dt>
    764 <dd><p>offset of server relative to this host
    765 </p></dd>
    766 <dt><code>jitter</code></dt>
    767 <dd><p>offset RMS error estimate.
    768 </p></dd>
    769 </dl>
    770 </dd>
    771 <dt><code>pstats</code> <kbd>associd</kbd></dt>
    772 <dd><p>Display the statistics for the peer with the given
    773 <kbd>associd</kbd>:
    774 associd, status, remote host, local address, time last received,
    775 time until next send, reachability change, packets sent,
    776 packets received, bad authentication, bogus origin, duplicate,
    777 bad dispersion, bad reference time, candidate order.
    778 </p></dd>
    779 <dt><code>readlist</code> <code>[<kbd>associd</kbd>]</code></dt>
    780 <dt><code>rl</code> <code>[<kbd>associd</kbd>]</code></dt>
    781 <dd><p>Display all system or peer variables.
    782 If the
    783 <kbd>associd</kbd>
    784 is omitted, it is assumed to be zero.
    785 </p></dd>
    786 <dt><code>readvar</code> <code>[<kbd>associd</kbd> <kbd>name</kbd><code>[=<kbd>value</kbd>]</code> <code>[, ...]</code>]</code></dt>
    787 <dt><code>rv</code> <code>[<kbd>associd</kbd> <kbd>name</kbd><code>[=<kbd>value</kbd>]</code> <code>[, ...]</code>]</code></dt>
    788 <dd><p>Display the specified system or peer variables.
    789 If
    790 <kbd>associd</kbd>
    791 is zero, the variables are from the
    792 <a href="#System-Variables">System Variables</a>
    793 name space, otherwise they are from the
    794 <a href="#Peer-Variables">Peer Variables</a>
    795 name space.
    796 The
    797 <kbd>associd</kbd>
    798 is required, as the same name can occur in both spaces.
    799 If no
    800 <kbd>name</kbd>
    801 is included, all operative variables in the name space are displayed.
    802 In this case only, if the
    803 <kbd>associd</kbd>
    804 is omitted, it is assumed to be zero.
    805 Multiple names are specified with comma separators and without whitespace.
    806 Note that time values are represented in milliseconds
    807 and frequency values in parts-per-million (PPM).
    808 Some NTP timestamps are represented in the format
    809 <kbd>YYYY</kbd><kbd>MM</kbd> <kbd>DD</kbd> <kbd>TTTT</kbd>,
    810 where
    811 <kbd>YYYY</kbd>
    812 is the year,
    813 <kbd>MM</kbd>
    814 the month of year,
    815 <kbd>DD</kbd>
    816 the day of month and
    817 <kbd>TTTT</kbd>
    818 the time of day.
    819 </p></dd>
    820 <dt><code>reslist</code></dt>
    821 <dd><p>Display the access control (restrict) list for
    822 <code>ntpq</code>
    823 Authentication is required.
    824 </p></dd>
    825 <dt><code>saveconfig</code> <kbd>filename</kbd></dt>
    826 <dd><p>Save the current configuration,
    827 including any runtime modifications made by
    828 <code>:config</code>
    829 or
    830 <code>config-from-file</code>,
    831 to the NTP server host file
    832 <kbd>filename</kbd>.
    833 This command will be rejected by the server unless
    834 .Lk miscopt.html#saveconfigdir &quot;saveconfigdir&quot;
    835 appears in the
    836 <code>ntpd(8)</code>
    837 configuration file.
    838 <kbd>filename</kbd>
    839 can use
    840 <code>date(1)</code>
    841 format specifiers to substitute the current date and time, for
    842 example,
    843 </p><div class="example">
    844 <pre class="example"><code>saveconfig</code> <samp>ntp-%Y%m%d-%H%M%S.conf</samp>. 
    845 </pre></div>
    846 <p>The filename used is stored in system variable
    847 <code>savedconfig</code>.
    848 Authentication is required.
    849 </p></dd>
    850 <dt><code>sysinfo</code></dt>
    851 <dd><p>Display system operational summary:
    852 associd, status, system peer, system peer mode, leap indicator,
    853 stratum, log2 precision, root delay, root dispersion,
    854 reference id, reference time, system jitter, clock jitter,
    855 clock wander, broadcast delay, symm. auth. delay.
    856 </p></dd>
    857 <dt><code>sysstats</code></dt>
    858 <dd><p>Display system uptime and packet counts maintained in the
    859 protocol module:
    860 uptime, sysstats reset, packets received, current version,
    861 older version, bad length or format, authentication failed,
    862 declined, restricted, rate limited, KoD responses,
    863 processed for time.
    864 </p></dd>
    865 <dt><code>timerstats</code></dt>
    866 <dd><p>Display interval timer counters:
    867 time since reset, timer overruns, calls to transmit.
    868 </p></dd>
    869 <dt><code>writelist</code> <kbd>associd</kbd></dt>
    870 <dd><p>Set all system or peer variables included in the variable list.
    871 </p></dd>
    872 <dt><code>writevar</code> <kbd>associd</kbd> <kbd>name</kbd>=<kbd>value</kbd> <code>[, ...]</code></dt>
    873 <dd><p>Set the specified variables in the variable list.
    874 If the
    875 <kbd>associd</kbd>
    876 is zero, the variables are from the
    877 <a href="#System-Variables">System Variables</a>
    878 name space, otherwise they are from the
    879 <a href="#Peer-Variables">Peer Variables</a>
    880 name space.
    881 The
    882 <kbd>associd</kbd>
    883 is required, as the same name can occur in both spaces.
    884 Authentication is required.
    885 </p></dd>
    886 </dl>
    887 
    888 <span id="Status-Words-and-Kiss-Codes-1"></span><h4 class="subsubsection">1.1.1.2 Status Words and Kiss Codes</h4>
    889 <p>The current state of the operating program is shown
    890 in a set of status words
    891 maintained by the system.
    892 Status information is also available on a per-association basis.
    893 These words are displayed by the
    894 <code>readlist</code>
    895 and
    896 <code>associations</code>
    897 commands both in hexadecimal and in decoded short tip strings.
    898 The codes, tips and short explanations are documented on the
    899 .Lk decode.html &quot;Event Messages and Status Words&quot;
    900 page.
    901 The page also includes a list of system and peer messages,
    902 the code for the latest of which is included in the status word.
    903 </p>
    904 <p>Information resulting from protocol machine state transitions
    905 is displayed using an informal set of ASCII strings called
    906 .Lk decode.html#kiss &quot;kiss codes&quot; .
    907 The original purpose was for kiss-o&rsquo;-death (KoD) packets
    908 sent by the server to advise the client of an unusual condition.
    909 They are now displayed, when appropriate,
    910 in the reference identifier field in various billboards.
    911 </p>
    912 <span id="System-Variables-1"></span><h4 class="subsubsection">1.1.1.3 System Variables</h4>
    913 <p>The following system variables appear in the
    914 <code>readlist</code>
    915 billboard.
    916 Not all variables are displayed in some configurations.
    917 </p>
    918 <dl compact="compact">
    919 <dt>Variable</dt>
    920 <dd><p>Description
    921 </p></dd>
    922 <dt><code>status</code></dt>
    923 <dd><p>.Lk decode.html#sys &quot;system status word&quot;
    924 </p></dd>
    925 <dt><code>version</code></dt>
    926 <dd><p>NTP software version and build time
    927 </p></dd>
    928 <dt><code>processor</code></dt>
    929 <dd><p>hardware platform and version
    930 </p></dd>
    931 <dt><code>system</code></dt>
    932 <dd><p>operating system and version
    933 </p></dd>
    934 <dt><code>leap</code></dt>
    935 <dd><p>leap warning indicator (0-3)
    936 </p></dd>
    937 <dt><code>stratum</code></dt>
    938 <dd><p>stratum (1-15)
    939 </p></dd>
    940 <dt><code>precision</code></dt>
    941 <dd><p>precision (log2 s)
    942 </p></dd>
    943 <dt><code>rootdelay</code></dt>
    944 <dd><p>total roundtrip delay to the primary reference clock
    945 </p></dd>
    946 <dt><code>rootdisp</code></dt>
    947 <dd><p>total dispersion to the primary reference clock
    948 </p></dd>
    949 <dt><code>refid</code></dt>
    950 <dd><p>reference id or
    951 .Lk decode.html#kiss &quot;kiss code&quot;
    952 </p></dd>
    953 <dt><code>reftime</code></dt>
    954 <dd><p>reference time
    955 </p></dd>
    956 <dt><code>clock</code></dt>
    957 <dd><p>date and time of day
    958 </p></dd>
    959 <dt><code>peer</code></dt>
    960 <dd><p>system peer association id
    961 </p></dd>
    962 <dt><code>tc</code></dt>
    963 <dd><p>time constant and poll exponent (log2 s) (3-17)
    964 </p></dd>
    965 <dt><code>mintc</code></dt>
    966 <dd><p>minimum time constant (log2 s) (3-10)
    967 </p></dd>
    968 <dt><code>offset</code></dt>
    969 <dd><p>combined offset of server relative to this host
    970 </p></dd>
    971 <dt><code>frequency</code></dt>
    972 <dd><p>frequency drift (PPM) relative to hardware clock
    973 </p></dd>
    974 <dt><code>sys_jitter</code></dt>
    975 <dd><p>combined system jitter
    976 </p></dd>
    977 <dt><code>clk_wander</code></dt>
    978 <dd><p>clock frequency wander (PPM)
    979 </p></dd>
    980 <dt><code>clk_jitter</code></dt>
    981 <dd><p>clock jitter
    982 </p></dd>
    983 <dt><code>tai</code></dt>
    984 <dd><p>TAI-UTC offset (s)
    985 </p></dd>
    986 <dt><code>leapsec</code></dt>
    987 <dd><p>NTP seconds when the next leap second is/was inserted
    988 </p></dd>
    989 <dt><code>expire</code></dt>
    990 <dd><p>NTP seconds when the NIST leapseconds file expires
    991 </p></dd>
    992 </dl>
    993 <p>The jitter and wander statistics are exponentially-weighted RMS averages.
    994 The system jitter is defined in the NTPv4 specification;
    995 the clock jitter statistic is computed by the clock discipline module.
    996 </p>
    997 <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
    998 additional system variables are displayed,
    999 including some or all of the following,
   1000 depending on the particular Autokey dance:
   1001 </p><dl compact="compact">
   1002 <dt>Variable</dt>
   1003 <dd><p>Description
   1004 </p></dd>
   1005 <dt><code>host</code></dt>
   1006 <dd><p>Autokey host name for this host
   1007 </p></dd>
   1008 <dt><code>ident</code></dt>
   1009 <dd><p>Autokey group name for this host
   1010 </p></dd>
   1011 <dt><code>flags</code></dt>
   1012 <dd><p>host flags  (see Autokey specification)
   1013 </p></dd>
   1014 <dt><code>digest</code></dt>
   1015 <dd><p>OpenSSL message digest algorithm
   1016 </p></dd>
   1017 <dt><code>signature</code></dt>
   1018 <dd><p>OpenSSL digest/signature scheme
   1019 </p></dd>
   1020 <dt><code>update</code></dt>
   1021 <dd><p>NTP seconds at last signature update
   1022 </p></dd>
   1023 <dt><code>cert</code></dt>
   1024 <dd><p>certificate subject, issuer and certificate flags
   1025 </p></dd>
   1026 <dt><code>until</code></dt>
   1027 <dd><p>NTP seconds when the certificate expires
   1028 </p></dd>
   1029 </dl>
   1030 <span id="Peer-Variables-1"></span><h4 class="subsubsection">1.1.1.4 Peer Variables</h4>
   1031 <p>The following peer variables appear in the
   1032 <code>readlist</code>
   1033 billboard for each association.
   1034 Not all variables are displayed in some configurations.
   1035 </p>
   1036 <dl compact="compact">
   1037 <dt>Variable</dt>
   1038 <dd><p>Description
   1039 </p></dd>
   1040 <dt><code>associd</code></dt>
   1041 <dd><p>association id
   1042 </p></dd>
   1043 <dt><code>status</code></dt>
   1044 <dd><p>.Lk decode.html#peer &quot;peer status word&quot;
   1045 </p></dd>
   1046 <dt><code>srcadr</code></dt>
   1047 <dd><p>source (remote) IP address
   1048 </p></dd>
   1049 <dt><code>srcport</code></dt>
   1050 <dd><p>source (remote) port
   1051 </p></dd>
   1052 <dt><code>dstadr</code></dt>
   1053 <dd><p>destination (local) IP address
   1054 </p></dd>
   1055 <dt><code>dstport</code></dt>
   1056 <dd><p>destination (local) port
   1057 </p></dd>
   1058 <dt><code>leap</code></dt>
   1059 <dd><p>leap indicator (0-3)
   1060 </p></dd>
   1061 <dt><code>stratum</code></dt>
   1062 <dd><p>stratum (0-15)
   1063 </p></dd>
   1064 <dt><code>precision</code></dt>
   1065 <dd><p>precision (log2 s)
   1066 </p></dd>
   1067 <dt><code>rootdelay</code></dt>
   1068 <dd><p>total roundtrip delay to the primary reference clock
   1069 </p></dd>
   1070 <dt><code>rootdisp</code></dt>
   1071 <dd><p>total root dispersion to the primary reference clock
   1072 </p></dd>
   1073 <dt><code>refid</code></dt>
   1074 <dd><p>reference id or
   1075 .Lk decode.html#kiss &quot;kiss code&quot;
   1076 </p></dd>
   1077 <dt><code>reftime</code></dt>
   1078 <dd><p>reference time
   1079 </p></dd>
   1080 <dt><code>rec</code></dt>
   1081 <dd><p>last packet received time
   1082 </p></dd>
   1083 <dt><code>reach</code></dt>
   1084 <dd><p>reach register (octal)
   1085 </p></dd>
   1086 <dt><code>unreach</code></dt>
   1087 <dd><p>unreach counter
   1088 </p></dd>
   1089 <dt><code>hmode</code></dt>
   1090 <dd><p>host mode (1-6)
   1091 </p></dd>
   1092 <dt><code>pmode</code></dt>
   1093 <dd><p>peer mode (1-5)
   1094 </p></dd>
   1095 <dt><code>hpoll</code></dt>
   1096 <dd><p>host poll exponent (log2 s) (3-17)
   1097 </p></dd>
   1098 <dt><code>ppoll</code></dt>
   1099 <dd><p>peer poll exponent (log2 s) (3-17)
   1100 </p></dd>
   1101 <dt><code>headway</code></dt>
   1102 <dd><p>headway (see
   1103 .Lk rate.html &quot;Rate Management and the Kiss-o&rsquo;-Death Packet&quot; )
   1104 </p></dd>
   1105 <dt><code>flash</code></dt>
   1106 <dd><p>.Lk decode.html#flash &quot;flash status word&quot;
   1107 </p></dd>
   1108 <dt><code>keyid</code></dt>
   1109 <dd><p>symmetric key id
   1110 </p></dd>
   1111 <dt><code>offset</code></dt>
   1112 <dd><p>filter offset
   1113 </p></dd>
   1114 <dt><code>delay</code></dt>
   1115 <dd><p>filter delay
   1116 </p></dd>
   1117 <dt><code>dispersion</code></dt>
   1118 <dd><p>filter dispersion
   1119 </p></dd>
   1120 <dt><code>jitter</code></dt>
   1121 <dd><p>filter jitter
   1122 </p></dd>
   1123 <dt><code>bias</code></dt>
   1124 <dd><p>unicast/broadcast bias
   1125 </p></dd>
   1126 <dt><code>xleave</code></dt>
   1127 <dd><p>interleave delay (see
   1128 .Lk xleave.html &quot;NTP Interleaved Modes&quot; )
   1129 </p></dd>
   1130 </dl>
   1131 <p>The
   1132 <code>bias</code>
   1133 variable is calculated when the first broadcast packet is received
   1134 after the calibration volley.
   1135 It represents the offset of the broadcast subgraph relative to the
   1136 unicast subgraph.
   1137 The
   1138 <code>xleave</code>
   1139 variable appears only for the interleaved symmetric and interleaved modes.
   1140 It represents the internal queuing, buffering and transmission delays
   1141 for the preceding packet.
   1142 </p>
   1143 <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
   1144 additional peer variables are displayed, including the following:
   1145 </p><dl compact="compact">
   1146 <dt>Variable</dt>
   1147 <dd><p>Description
   1148 </p></dd>
   1149 <dt><code>flags</code></dt>
   1150 <dd><p>peer flags (see Autokey specification)
   1151 </p></dd>
   1152 <dt><code>host</code></dt>
   1153 <dd><p>Autokey server name
   1154 </p></dd>
   1155 <dt><code>flags</code></dt>
   1156 <dd><p>peer flags (see Autokey specification)
   1157 </p></dd>
   1158 <dt><code>signature</code></dt>
   1159 <dd><p>OpenSSL digest/signature scheme
   1160 </p></dd>
   1161 <dt><code>initsequence</code></dt>
   1162 <dd><p>initial key id
   1163 </p></dd>
   1164 <dt><code>initkey</code></dt>
   1165 <dd><p>initial key index
   1166 </p></dd>
   1167 <dt><code>timestamp</code></dt>
   1168 <dd><p>Autokey signature timestamp
   1169 </p></dd>
   1170 <dt><code>ident</code></dt>
   1171 <dd><p>Autokey group name for this association
   1172 </p></dd>
   1173 </dl>
   1174 
   1175 <span id="Clock-Variables-1"></span><h4 class="subsubsection">1.1.1.5 Clock Variables</h4>
   1176 <p>The following clock variables appear in the
   1177 <code>clocklist</code>
   1178 billboard for each association with a reference clock.
   1179 Not all variables are displayed in some configurations.
   1180 </p><dl compact="compact">
   1181 <dt>Variable</dt>
   1182 <dd><p>Description
   1183 </p></dd>
   1184 <dt><code>associd</code></dt>
   1185 <dd><p>association id
   1186 </p></dd>
   1187 <dt><code>status</code></dt>
   1188 <dd><p>.Lk decode.html#clock &quot;clock status word&quot;
   1189 </p></dd>
   1190 <dt><code>device</code></dt>
   1191 <dd><p>device description
   1192 </p></dd>
   1193 <dt><code>timecode</code></dt>
   1194 <dd><p>ASCII time code string (specific to device)
   1195 </p></dd>
   1196 <dt><code>poll</code></dt>
   1197 <dd><p>poll messages sent
   1198 </p></dd>
   1199 <dt><code>noreply</code></dt>
   1200 <dd><p>no reply
   1201 </p></dd>
   1202 <dt><code>badformat</code></dt>
   1203 <dd><p>bad format
   1204 </p></dd>
   1205 <dt><code>baddata</code></dt>
   1206 <dd><p>bad date or time
   1207 </p></dd>
   1208 <dt><code>fudgetime1</code></dt>
   1209 <dd><p>fudge time 1
   1210 </p></dd>
   1211 <dt><code>fudgetime2</code></dt>
   1212 <dd><p>fudge time 2
   1213 </p></dd>
   1214 <dt><code>stratum</code></dt>
   1215 <dd><p>driver stratum
   1216 </p></dd>
   1217 <dt><code>refid</code></dt>
   1218 <dd><p>driver reference id
   1219 </p></dd>
   1220 <dt><code>flags</code></dt>
   1221 <dd><p>driver flags
   1222 </p></dd>
   1223 </dl>
   1224 
   1225 <p>This section was generated by <strong>AutoGen</strong>,
   1226 using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpq</code> program.
   1227 This software is released under the NTP license, &lt;http://ntp.org/license>;.
   1228 </p>
   1229 <table class="menu" border="0" cellspacing="0">
   1230 <tr><td align="left" valign="top">&bull; <a href="#ntpq-usage" accesskey="1">ntpq usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpq help/usage (<samp>--help</samp>)
   1231 </td></tr>
   1232 <tr><td align="left" valign="top">&bull; <a href="#ntpq-ipv4" accesskey="2">ntpq ipv4</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
   1233 </td></tr>
   1234 <tr><td align="left" valign="top">&bull; <a href="#ntpq-ipv6" accesskey="3">ntpq ipv6</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
   1235 </td></tr>
   1236 <tr><td align="left" valign="top">&bull; <a href="#ntpq-command" accesskey="4">ntpq command</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">command option (-c)
   1237 </td></tr>
   1238 <tr><td align="left" valign="top">&bull; <a href="#ntpq-interactive" accesskey="5">ntpq interactive</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">interactive option (-i)
   1239 </td></tr>
   1240 <tr><td align="left" valign="top">&bull; <a href="#ntpq-numeric" accesskey="6">ntpq numeric</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">numeric option (-n)
   1241 </td></tr>
   1242 <tr><td align="left" valign="top">&bull; <a href="#ntpq-old_002drv" accesskey="7">ntpq old-rv</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">old-rv option
   1243 </td></tr>
   1244 <tr><td align="left" valign="top">&bull; <a href="#ntpq-peers" accesskey="8">ntpq peers</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">peers option (-p)
   1245 </td></tr>
   1246 <tr><td align="left" valign="top">&bull; <a href="#ntpq-refid" accesskey="9">ntpq refid</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">refid option (-r)
   1247 </td></tr>
   1248 <tr><td align="left" valign="top">&bull; <a href="#ntpq-unconnected">ntpq unconnected</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">unconnected option (-u)
   1249 </td></tr>
   1250 <tr><td align="left" valign="top">&bull; <a href="#ntpq-wide">ntpq wide</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">wide option (-w)
   1251 </td></tr>
   1252 <tr><td align="left" valign="top">&bull; <a href="#ntpq-config">ntpq config</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntpq
   1253 </td></tr>
   1254 <tr><td align="left" valign="top">&bull; <a href="#ntpq-exit-status">ntpq exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
   1255 </td></tr>
   1256 </table>
   1257 
   1258 <hr>
   1259 <span id="ntpq-usage"></span><div class="header">
   1260 <p>
   1261 Next: <a href="#ntpq-ipv4" accesskey="n" rel="next">ntpq ipv4</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1262 </div>
   1263 <span id="ntpq-help_002fusage-_0028_002d_002dhelp_0029"></span><h4 class="subsection">1.1.2 ntpq help/usage (<samp>--help</samp>)</h4>
   1264 <span id="index-ntpq-help"></span>
   1265 
   1266 <p>This is the automatically generated usage text for ntpq.
   1267 </p>
   1268 <p>The text printed is the same whether selected with the <code>help</code> option
   1269 (<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>).  <code>more-help</code> will print
   1270 the usage text by passing it through a pager program.
   1271 <code>more-help</code> is disabled on platforms without a working
   1272 <code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
   1273 used to select the program, defaulting to <samp>more</samp>.  Both will exit
   1274 with a status code of 0.
   1275 </p>
   1276 <div class="example">
   1277 <pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p18
   1278 Usage:  ntpq [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
   1279   Flg Arg Option-Name    Description
   1280    -4 no  ipv4           Force IPv4 name resolution
   1281                                 - prohibits the option 'ipv6'
   1282    -6 no  ipv6           Force IPv6 name resolution
   1283                                 - prohibits the option 'ipv4'
   1284    -c Str command        run a command and exit
   1285                                 - may appear multiple times
   1286    -d no  debug-level    Increase debug verbosity level
   1287                                 - may appear multiple times
   1288    -D Num set-debug-level Set the debug verbosity level
   1289                                 - may appear multiple times
   1290    -i no  interactive    Force ntpq to operate in interactive mode
   1291                                 - prohibits these options:
   1292                                 command
   1293                                 peers
   1294    -n no  numeric        numeric host addresses
   1295       no  old-rv         Always output status line with readvar
   1296    -p no  peers          Print a list of the peers
   1297                                 - prohibits the option 'interactive'
   1298    -r KWd refid          Set default display type for S2+ refids
   1299    -u no  unconnected    Use unconnected UDP to communicate with ntpd (default on Windows)
   1300    -w no  wide           Display the full 'remote' value
   1301       opt version        output version information and exit
   1302    -? no  help           display extended usage information and exit
   1303    -! no  more-help      extended usage information passed thru pager
   1304    -&gt; opt save-opts      save the option state to a config file
   1305    -&lt; Str load-opts      load options from a config file
   1306                                 - disabled as '--no-load-opts'
   1307                                 - may appear multiple times
   1308 
   1309 Options are specified by doubled hyphens and their name or by a single
   1310 hyphen and the flag character.
   1311 
   1312 The following option preset mechanisms are supported:
   1313  - reading file $HOME/.ntprc
   1314  - reading file ./.ntprc
   1315  - examining environment variables named NTPQ_*
   1316 
   1317 The valid &quot;refid&quot; option keywords are:
   1318   hash ipv4
   1319   or an integer from 0 through 1
   1320 
   1321 Please send bug reports to:  &lt;https://bugs.ntp.org, bugs (a] ntp.org&gt;
   1322 </pre></div>
   1323 
   1324 <hr>
   1325 <span id="ntpq-ipv4"></span><div class="header">
   1326 <p>
   1327 Next: <a href="#ntpq-ipv6" accesskey="n" rel="next">ntpq ipv6</a>, Previous: <a href="#ntpq-usage" accesskey="p" rel="prev">ntpq usage</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1328 </div>
   1329 <span id="ipv4-option-_0028_002d4_0029"></span><h4 class="subsection">1.1.3 ipv4 option (-4)</h4>
   1330 <span id="index-ntpq_002dipv4"></span>
   1331 
   1332 <p>This is the &ldquo;force ipv4 name resolution&rdquo; option.
   1333 </p>
   1334 <p>This option has some usage constraints.  It:
   1335 </p><ul>
   1336 <li> must not appear in combination with any of the following options:
   1337 ipv6.
   1338 </li></ul>
   1339 
   1340 <p>Force resolution of following host names on the command line
   1341 to the IPv4 namespace.
   1342 </p><hr>
   1343 <span id="ntpq-ipv6"></span><div class="header">
   1344 <p>
   1345 Next: <a href="#ntpq-command" accesskey="n" rel="next">ntpq command</a>, Previous: <a href="#ntpq-ipv4" accesskey="p" rel="prev">ntpq ipv4</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1346 </div>
   1347 <span id="ipv6-option-_0028_002d6_0029"></span><h4 class="subsection">1.1.4 ipv6 option (-6)</h4>
   1348 <span id="index-ntpq_002dipv6"></span>
   1349 
   1350 <p>This is the &ldquo;force ipv6 name resolution&rdquo; option.
   1351 </p>
   1352 <p>This option has some usage constraints.  It:
   1353 </p><ul>
   1354 <li> must not appear in combination with any of the following options:
   1355 ipv4.
   1356 </li></ul>
   1357 
   1358 <p>Force resolution of following host names on the command line
   1359 to the IPv6 namespace.
   1360 </p><hr>
   1361 <span id="ntpq-command"></span><div class="header">
   1362 <p>
   1363 Next: <a href="#ntpq-interactive" accesskey="n" rel="next">ntpq interactive</a>, Previous: <a href="#ntpq-ipv6" accesskey="p" rel="prev">ntpq ipv6</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1364 </div>
   1365 <span id="command-option-_0028_002dc_0029"></span><h4 class="subsection">1.1.5 command option (-c)</h4>
   1366 <span id="index-ntpq_002dcommand"></span>
   1367 
   1368 <p>This is the &ldquo;run a command and exit&rdquo; option.
   1369 This option takes a string argument <samp>cmd</samp>.
   1370 </p>
   1371 <p>This option has some usage constraints.  It:
   1372 </p><ul>
   1373 <li> may appear an unlimited number of times.
   1374 </li></ul>
   1375 
   1376 <p>The following argument is interpreted as an interactive format command
   1377 and is added to the list of commands to be executed on the specified
   1378 host(s).
   1379 </p><hr>
   1380 <span id="ntpq-interactive"></span><div class="header">
   1381 <p>
   1382 Next: <a href="#ntpq-numeric" accesskey="n" rel="next">ntpq numeric</a>, Previous: <a href="#ntpq-command" accesskey="p" rel="prev">ntpq command</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1383 </div>
   1384 <span id="interactive-option-_0028_002di_0029"></span><h4 class="subsection">1.1.6 interactive option (-i)</h4>
   1385 <span id="index-ntpq_002dinteractive"></span>
   1386 
   1387 <p>This is the &ldquo;force ntpq to operate in interactive mode&rdquo; option.
   1388 </p>
   1389 <p>This option has some usage constraints.  It:
   1390 </p><ul>
   1391 <li> must not appear in combination with any of the following options:
   1392 command, peers.
   1393 </li></ul>
   1394 
   1395 <p>Force <code>ntpq</code> to operate in interactive mode.
   1396 Prompts will be written to the standard output and
   1397 commands read from the standard input.
   1398 </p><hr>
   1399 <span id="ntpq-numeric"></span><div class="header">
   1400 <p>
   1401 Next: <a href="#ntpq-old_002drv" accesskey="n" rel="next">ntpq old-rv</a>, Previous: <a href="#ntpq-interactive" accesskey="p" rel="prev">ntpq interactive</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1402 </div>
   1403 <span id="numeric-option-_0028_002dn_0029"></span><h4 class="subsection">1.1.7 numeric option (-n)</h4>
   1404 <span id="index-ntpq_002dnumeric"></span>
   1405 
   1406 <p>This is the &ldquo;numeric host addresses&rdquo; option.
   1407 Output all host addresses in dotted-quad numeric format rather than
   1408 converting to the canonical host names.
   1409 </p><hr>
   1410 <span id="ntpq-old_002drv"></span><div class="header">
   1411 <p>
   1412 Next: <a href="#ntpq-peers" accesskey="n" rel="next">ntpq peers</a>, Previous: <a href="#ntpq-numeric" accesskey="p" rel="prev">ntpq numeric</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1413 </div>
   1414 <span id="old_002drv-option"></span><h4 class="subsection">1.1.8 old-rv option</h4>
   1415 <span id="index-ntpq_002dold_002drv"></span>
   1416 
   1417 <p>This is the &ldquo;always output status line with readvar&rdquo; option.
   1418 By default, <code>ntpq</code> now suppresses the <code>associd=...</code>
   1419 line that precedes the output of <code>readvar</code>
   1420 (alias <code>rv</code>) when a single variable is requested, such as
   1421 <code>ntpq -c &quot;rv 0 offset&quot;</code>.
   1422 This option causes <code>ntpq</code> to include both lines of output
   1423 for a single-variable <code>readvar</code>.
   1424 Using an environment variable to
   1425 preset this option in a script will enable both older and
   1426 newer <code>ntpq</code> to behave identically in this regard.
   1427 </p><hr>
   1428 <span id="ntpq-peers"></span><div class="header">
   1429 <p>
   1430 Next: <a href="#ntpq-refid" accesskey="n" rel="next">ntpq refid</a>, Previous: <a href="#ntpq-old_002drv" accesskey="p" rel="prev">ntpq old-rv</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1431 </div>
   1432 <span id="peers-option-_0028_002dp_0029"></span><h4 class="subsection">1.1.9 peers option (-p)</h4>
   1433 <span id="index-ntpq_002dpeers"></span>
   1434 
   1435 <p>This is the &ldquo;print a list of the peers&rdquo; option.
   1436 </p>
   1437 <p>This option has some usage constraints.  It:
   1438 </p><ul>
   1439 <li> must not appear in combination with any of the following options:
   1440 interactive.
   1441 </li></ul>
   1442 
   1443 <p>Print a list of the peers known to the server as well as a summary
   1444 of their state. This is equivalent to the &rsquo;peers&rsquo; interactive command.
   1445 </p><hr>
   1446 <span id="ntpq-refid"></span><div class="header">
   1447 <p>
   1448 Next: <a href="#ntpq-unconnected" accesskey="n" rel="next">ntpq unconnected</a>, Previous: <a href="#ntpq-peers" accesskey="p" rel="prev">ntpq peers</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1449 </div>
   1450 <span id="refid-option-_0028_002dr_0029"></span><h4 class="subsection">1.1.10 refid option (-r)</h4>
   1451 <span id="index-ntpq_002drefid"></span>
   1452 
   1453 <p>This is the &ldquo;set default display type for s2+ refids&rdquo; option.
   1454 This option takes a keyword argument.
   1455 </p>
   1456 <p>This option has some usage constraints.  It:
   1457 </p><ul>
   1458 <li> This option takes a keyword as its argument.
   1459 The argument sets an enumeration value that can be tested by comparing the option value macro (OPT_VALUE_REFID).
   1460 The available keywords are:
   1461 <div class="example">
   1462 <pre class="example">    hash ipv4
   1463 </pre></div>
   1464 
   1465 <p>or their numeric equivalent.
   1466 </p></li></ul>
   1467 
   1468 <p>Set the default display format for S2+ refids.
   1469 </p><hr>
   1470 <span id="ntpq-unconnected"></span><div class="header">
   1471 <p>
   1472 Next: <a href="#ntpq-wide" accesskey="n" rel="next">ntpq wide</a>, Previous: <a href="#ntpq-refid" accesskey="p" rel="prev">ntpq refid</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1473 </div>
   1474 <span id="unconnected-option-_0028_002du_0029"></span><h4 class="subsection">1.1.11 unconnected option (-u)</h4>
   1475 <span id="index-ntpq_002dunconnected"></span>
   1476 
   1477 <p>This is the &ldquo;use unconnected udp to communicate with ntpd (default on windows)&rdquo; option.
   1478 Open an unconnected UDP association to ntpd (the default
   1479 on Windows).
   1480 </p><hr>
   1481 <span id="ntpq-wide"></span><div class="header">
   1482 <p>
   1483 Next: <a href="#ntpq-config" accesskey="n" rel="next">ntpq config</a>, Previous: <a href="#ntpq-unconnected" accesskey="p" rel="prev">ntpq unconnected</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1484 </div>
   1485 <span id="wide-option-_0028_002dw_0029"></span><h4 class="subsection">1.1.12 wide option (-w)</h4>
   1486 <span id="index-ntpq_002dwide"></span>
   1487 
   1488 <p>This is the &ldquo;display the full &rsquo;remote&rsquo; value&rdquo; option.
   1489 Display the full value of the &rsquo;remote&rsquo; value.  If this requires
   1490 more than 15 characters, display the full value, emit a newline,
   1491 and continue the data display properly indented on the next line.
   1492 </p>
   1493 
   1494 <hr>
   1495 <span id="ntpq-config"></span><div class="header">
   1496 <p>
   1497 Next: <a href="#ntpq-exit-status" accesskey="n" rel="next">ntpq exit status</a>, Previous: <a href="#ntpq-wide" accesskey="p" rel="prev">ntpq wide</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1498 </div>
   1499 <span id="presetting_002fconfiguring-ntpq"></span><h4 class="subsection">1.1.13 presetting/configuring ntpq</h4>
   1500 
   1501 <p>Any option that is not marked as <i>not presettable</i> may be preset by
   1502 loading values from configuration (&quot;rc&quot; or &quot;ini&quot;) files, and values from environment variables named <code>NTPQ</code> and <code>NTPQ_&lt;OPTION_NAME&gt;</code>.  <code>&lt;OPTION_NAME&gt;</code> must be one of
   1503 the options listed above in upper case and segmented with underscores.
   1504 The <code>NTPQ</code> variable will be tokenized and parsed like
   1505 the command line.  The remaining variables are tested for existence and their
   1506 values are treated like option arguments.
   1507 </p>
   1508 
   1509 <p><code>libopts</code> will search in 2 places for configuration files:
   1510 </p><ul>
   1511 <li> $HOME
   1512 </li><li> $PWD
   1513 </li></ul>
   1514 <p>The environment variables <code>HOME</code>, and <code>PWD</code>
   1515 are expanded and replaced when <samp>ntpq</samp> runs.
   1516 For any of these that are plain files, they are simply processed.
   1517 For any that are directories, then a file named <samp>.ntprc</samp> is searched for
   1518 within that directory and processed.
   1519 </p>
   1520 <p>Configuration files may be in a wide variety of formats.
   1521 The basic format is an option name followed by a value (argument) on the
   1522 same line.  Values may be separated from the option name with a colon,
   1523 equal sign or simply white space.  Values may be continued across multiple
   1524 lines by escaping the newline with a backslash.
   1525 </p>
   1526 <p>Multiple programs may also share the same initialization file.
   1527 Common options are collected at the top, followed by program specific
   1528 segments.  The segments are separated by lines like:
   1529 </p><div class="example">
   1530 <pre class="example">[NTPQ]
   1531 </pre></div>
   1532 <p>or by
   1533 </p><div class="example">
   1534 <pre class="example">&lt;?program ntpq&gt;
   1535 </pre></div>
   1536 <p>Do not mix these styles within one configuration file.
   1537 </p>
   1538 <p>Compound values and carefully constructed string values may also be
   1539 specified using XML syntax:
   1540 </p><div class="example">
   1541 <pre class="example">&lt;option-name&gt;
   1542    &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
   1543 &lt;/option-name&gt;
   1544 </pre></div>
   1545 <p>yielding an <code>option-name.sub-opt</code> string value of
   1546 </p><div class="example">
   1547 <pre class="example">&quot;...&lt;...&gt;...&quot;
   1548 </pre></div>
   1549 <p><code>AutoOpts</code> does not track suboptions.  You simply note that it is a
   1550 hierarchicly valued option.  <code>AutoOpts</code> does provide a means for searching
   1551 the associated name/value pair list (see: optionFindValue).
   1552 </p>
   1553 <p>The command line options relating to configuration and/or usage help are:
   1554 </p>
   1555 <span id="version-_0028_002d_0029"></span><h4 class="subsubheading">version (-)</h4>
   1556 
   1557 <p>Print the program version to standard out, optionally with licensing
   1558 information, then exit 0.  The optional argument specifies how much licensing
   1559 detail to provide.  The default is to print just the version.  The licensing information may be selected with an option argument.
   1560 Only the first letter of the argument is examined:
   1561 </p>
   1562 <dl compact="compact">
   1563 <dt>&lsquo;<samp>version</samp>&rsquo;</dt>
   1564 <dd><p>Only print the version.  This is the default.
   1565 </p></dd>
   1566 <dt>&lsquo;<samp>copyright</samp>&rsquo;</dt>
   1567 <dd><p>Name the copyright usage licensing terms.
   1568 </p></dd>
   1569 <dt>&lsquo;<samp>verbose</samp>&rsquo;</dt>
   1570 <dd><p>Print the full copyright usage licensing terms.
   1571 </p></dd>
   1572 </dl>
   1573 
   1574 <hr>
   1575 <span id="ntpq-exit-status"></span><div class="header">
   1576 <p>
   1577 Previous: <a href="#ntpq-config" accesskey="p" rel="prev">ntpq config</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
   1578 </div>
   1579 <span id="ntpq-exit-status-1"></span><h4 class="subsection">1.1.14 ntpq exit status</h4>
   1580 
   1581 <p>One of the following exit values will be returned:
   1582 </p><dl compact="compact">
   1583 <dt>&lsquo;<samp>0 (EXIT_SUCCESS)</samp>&rsquo;</dt>
   1584 <dd><p>Successful program execution.
   1585 </p></dd>
   1586 <dt>&lsquo;<samp>1 (EXIT_FAILURE)</samp>&rsquo;</dt>
   1587 <dd><p>The operation failed or the command syntax was not valid.
   1588 </p></dd>
   1589 <dt>&lsquo;<samp>66 (EX_NOINPUT)</samp>&rsquo;</dt>
   1590 <dd><p>A specified configuration file could not be loaded.
   1591 </p></dd>
   1592 <dt>&lsquo;<samp>70 (EX_SOFTWARE)</samp>&rsquo;</dt>
   1593 <dd><p>libopts had an internal operational error.  Please report
   1594 it to autogen-users (a] lists.sourceforge.net.  Thank you.
   1595 </p></dd>
   1596 </dl>
   1597 
   1598 <hr>
   1599 <span id="Usage"></span><div class="header">
   1600 <p>
   1601 Next: <a href="#Internal-Commands" accesskey="n" rel="next">Internal Commands</a>, Previous: <a href="#ntpq-Description" accesskey="p" rel="prev">ntpq Description</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
   1602 </div>
   1603 <span id="Usage-1"></span><h3 class="section">1.2 Usage</h3>
   1604 
   1605 <table>
   1606 <thead><tr><th width="23%">What</th><th width="23%">Default</th><th width="5%">Flag</th><th width="15%">Option</th></tr></thead>
   1607 <tr><td width="23%">configuration file</td><td width="23%"><code>/etc/ntp.conf</code></td><td width="5%"><code>-c</code></td><td width="15%"><code>conffile</code></td></tr>
   1608 <tr><td width="23%">frequency file</td><td width="23%">none</td><td width="5%"><code>-f</code></td><td width="15%"><code>driftfile</code></td></tr>
   1609 <tr><td width="23%">leapseconds file</td><td width="23%">none</td><td width="5%"></td><td width="15%"><code>leapfile</code></td></tr>
   1610 <tr><td width="23%">process ID file</td><td width="23%">none</td><td width="5%"><code>-p</code></td><td width="15%"><code>pidfile</code></td></tr>
   1611 <tr><td width="23%">log file</td><td width="23%">system log</td><td width="5%"><code>-l</code></td><td width="15%"><code>logfile</code></td></tr>
   1612 <tr><td width="23%">include file</td><td width="23%">none</td><td width="5%">none</td><td width="15%"><code>includefile</code></td></tr>
   1613 <tr><td width="23%">statistics path</td><td width="23%"><code>/var/NTP</code></td><td width="5%"><code>-s</code></td><td width="15%"><code>statsdir</code></td></tr>
   1614 <tr><td width="23%">keys path</td><td width="23%"><code>/usr/local/etc</code></td><td width="5%"><code>-k</code></td><td width="15%"><code>keysdir</code></td></tr>
   1615 </table>
   1616 
   1617 <hr>
   1618 <span id="Internal-Commands"></span><div class="header">
   1619 <p>
   1620 Next: <a href="#Control-Message-Commands" accesskey="n" rel="next">Control Message Commands</a>, Previous: <a href="#Usage" accesskey="p" rel="prev">Usage</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
   1621 </div>
   1622 <span id="Internal-Commands-2"></span><h3 class="section">1.3 Internal Commands</h3>
   1623 
   1624 <p>Interactive format commands consist of a keyword followed by zero to four arguments.  Only enough characters of the full keyword to uniquely identify the command need be typed.  The output of a command is normally sent to the standard output, but optionally the output of individual commands may be sent to a file by appending a <code>&gt;</code>, followed by a file name, to the command line.  A number of interactive format commands are executed entirely within the <code>ntpq</code> program itself and do not result in NTP mode-6 requests being sent to a server.  These are described following.
   1625 </p>
   1626 <dl compact="compact">
   1627 <dt><code><span id="help"></span><code>? [</code><kbd>command_keyword</kbd><code>]</code></code></dt>
   1628 <dt><code><code>help [</code><kbd>command_keyword</kbd><code>]</code></code></dt>
   1629 <dd><p>A <code>?</code> by itself will print a list of all the command keywords known to <code>ntpq</code>.  A <code>?</code> followed by a command keyword will print function and usage information about the command.
   1630 </p>
   1631 </dd>
   1632 <dt><code><span id="addvars"></span>&gt;<code>addvars <kbd>name</kbd> [ = <kbd>value</kbd>] [...]</code></code></dt>
   1633 <dt><code><code>rmvars <kbd>name</kbd> [...]</code></code></dt>
   1634 <dt><code><code>clearvars</code>&lt;/dt&gt;</code></dt>
   1635 <dd><p>The arguments to these commands consist of a list of items of the form
   1636 <code><kbd>name</kbd> = <kbd>value</kbd></code>, where the <code>= <kbd>value</kbd></code> is ignored,
   1637 and can be omitted in read requests.
   1638 <code>ntpq</code> maintains an internal list in which data to be included
   1639 in control messages can be assembled, and sent using the <code>readlist</code>
   1640 and <code>writelist</code> commands described below.
   1641 The <code>addvars</code> command allows variables and optional values
   1642 to be added to the list.
   1643 If more than one variable is to be added
   1644 the list should be comma-separated and not contain white space.
   1645 The <code>rmvars</code> command can be used to remove individual variables
   1646 from the list,
   1647 while the <code>clearlist</code> command removes all variables from the list.
   1648 </p>
   1649 </dd>
   1650 <dt><code><span id="cooked"></span><code>cooked</code></code></dt>
   1651 <dd><p>Display server messages in prettyprint format.
   1652 </p>
   1653 </dd>
   1654 <dt><code><span id="debug"></span><code>debug more | less | off</code></code></dt>
   1655 <dd><p>Turns internal query program debugging on and off.
   1656 </p>
   1657 </dd>
   1658 <dt><code><span id="delay"></span><code>delay <kbd>milliseconds</kbd></code></code></dt>
   1659 <dd><p>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 or between machines whose clocks are unsynchronized.  Actually the server does not now require timestamps in authenticated requests, so this command may be obsolete.
   1660 </p>
   1661 </dd>
   1662 <dt><code><span id="host"></span><code>host <kbd>name</kbd></code></code></dt>
   1663 <dd><p>Set the host to which future queries will be sent.
   1664 The name may be either a DNS name or a numeric address.
   1665 </p>
   1666 </dd>
   1667 <dt><code><span id="hostnames"></span><code>hostnames [yes | no]</code></code></dt>
   1668 <dd><p>If <code>yes</code> is specified, host names are printed in information displays.
   1669 If <code>no</code> is specified, numeric addresses are printed instead.
   1670 The default is <code>yes</code>,
   1671 unless modified using the command line <code>-n</code> switch.
   1672 </p>
   1673 </dd>
   1674 <dt><code><span id="keyid"></span><code>keyid <kbd>keyid</kbd></code></code></dt>
   1675 <dd><p>This command specifies the key number to be used
   1676 to authenticate configuration requests.
   1677 This must correspond to a key ID configured in <code>ntp.conf</code> for this purpose.
   1678 </p>
   1679 </dd>
   1680 <dt><code><span id="keytype"></span><code>keytype</code></code></dt>
   1681 <dd><p>Specify the digest algorithm to use for authenticated requests,
   1682 with default <code>MD5</code>.
   1683 If the OpenSSL library is installed,
   1684 digest can be be any message digest algorithm supported by the library.
   1685 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>.
   1686 </p>
   1687 </dd>
   1688 <dt><code><span id="ntpversion"></span><code>ntpversion 1 | 2 | 3 | 4</code></code></dt>
   1689 <dd><p>Sets the NTP version number which <code>ntpq</code> claims in packets.
   1690 Defaults to 2.
   1691 Note that mode-6 control messages (and modes, for that matter)
   1692 didn&rsquo;t exist in NTP version 1.
   1693 </p>
   1694 </dd>
   1695 <dt><code><span id="passwd"></span><code>passwd</code></code></dt>
   1696 <dd><p>This command prompts for a password to authenticate requests.
   1697 The password must correspond to the key ID configured in <code>ntp.conf</code> for this purpose.
   1698 </p>
   1699 </dd>
   1700 <dt><code><span id="quit"></span><code>quit</code></code></dt>
   1701 <dd><p>Exit <code>ntpq</code>.
   1702 </p>
   1703 </dd>
   1704 <dt><code><span id="raw"></span><code>raw</code></code></dt>
   1705 <dd><p>Display server messages as received and without reformatting.
   1706 </p>
   1707 </dd>
   1708 <dt><code><span id="timeout"></span><code>timeout <kbd>milliseconds</kbd></code></code></dt>
   1709 <dd><p>Specify a timeout period for responses to server queries.
   1710 The default is about 5000 milliseconds.
   1711 Note that since <code>ntpq</code> retries each query once after a timeout
   1712 the total waiting time for a timeout will be twice the timeout value set.
   1713 </p>
   1714 </dd>
   1715 </dl>
   1716 
   1717 <hr>
   1718 <span id="Control-Message-Commands"></span><div class="header">
   1719 <p>
   1720 Next: <a href="#Status-Words-and-Kiss-Codes" accesskey="n" rel="next">Status Words and Kiss Codes</a>, Previous: <a href="#Internal-Commands" accesskey="p" rel="prev">Internal Commands</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
   1721 </div>
   1722 <span id="Control-Message-Commands-2"></span><h3 class="section">1.4 Control Message Commands</h3>
   1723 
   1724 <p>Association IDs are used to identify system, peer and clock variables.
   1725 System variables are assigned an association ID of zero and system name space,
   1726 while each association is assigned a nonzero association ID and peer namespace.
   1727 Most control commands send a single mode-6 message to the server
   1728 and expect a single response message.
   1729 The exceptions are the <code>peers</code> command,
   1730 which sends a series of messages,
   1731 and the <code>mreadlist</code> and <code>mreadvar</code> commands,
   1732 which iterate over a range of associations.
   1733 </p>
   1734 <span id="as"></span><dl compact="compact">
   1735 <dt><code><code>associations</code></code></dt>
   1736 <dd><p>Display a list of mobilized associations in the form:
   1737 <br>
   1738 <code>ind assid status conf reach auth condition last_event cnt</code>
   1739 </p>
   1740 <table>
   1741 <thead><tr><th width="10%">Variable</th><th width="40%">Description</th></tr></thead>
   1742 <tr><td width="10%"><code>ind</code></td><td width="40%">index on this list</td></tr>
   1743 <tr><td width="10%"><code>assid</code></td><td width="40%">association ID</td></tr>
   1744 <tr><td width="10%"><code>status</code></td><td width="40%"><a href="decode.html#peer">peer status word</a></td></tr>
   1745 <tr><td width="10%"><code>conf</code></td><td width="40%"><code>yes</code>: persistent, <code>no</code>: ephemeral</td></tr>
   1746 <tr><td width="10%"><code>reach</code></td><td width="40%"><code>yes</code>: reachable, <code>no</code>: unreachable</td></tr>
   1747 <tr><td width="10%"><code>auth</code></td><td width="40%"><code>ok</code>, <code>yes</code>, <code>bad</code> and <code>none</code></td></tr>
   1748 <tr><td width="10%"><code>condition</code></td><td width="40%">selection status (see the <code>select</code> field of the <a href="decode.html#peer">peer status word</a>)</td></tr>
   1749 <tr><td width="10%"><code>last_event</code></td><td width="40%">event report (see the <code>event</code> field of the <a href="decode.html#peer">peer status word</a>)</td></tr>
   1750 <tr><td width="10%"><code>cnt</code>
   1751 event count (see the <code>count</code> field of the <a href="decode.html#peer">peer status word</a>)</td></tr>
   1752 </table>
   1753 
   1754 </dd>
   1755 <dt><code><span id="cv"></span>clockvar <kbd>assocID</kbd> [<kbd>name</kbd> [ = <kbd>value</kbd> [...]] [...]]</code></dt>
   1756 <dt><code>cv <kbd>assocID</kbd> [<kbd>name</kbd> [ = <kbd>value</kbd> [...] ][...]]</code></dt>
   1757 <dd><p>Display a list of &lsquo;clock variables&rsquo; for those associations supporting a reference clock.
   1758 </p>
   1759 </dd>
   1760 <dt><code><span id="g_t_003aconfig"></span>:config [...]</code></dt>
   1761 <dd><p>Send the remainder of the command line, including whitespace, to the server
   1762 as a run-time configuration command in the same format
   1763 as the configuration file.
   1764 This command is experimental until further notice and clarification.
   1765 Authentication is of course required.
   1766 </p>
   1767 </dd>
   1768 <dt><code><span id="config_002dfrom_002dfile"></span>config-from-file <kbd>filename</kbd></code></dt>
   1769 <dd><p>Send the each line of <kbd>filename</kbd> to the server as
   1770 run-time configuration commands in the same format as the configuration file.
   1771 This command is experimental until further notice and clarification.
   1772 Authentication is required.
   1773 </p>
   1774 </dd>
   1775 <dt><code><span id="ifstats"></span>ifstats</code></dt>
   1776 <dd><p>Display statistics for each local network address.
   1777 Authentication is required.
   1778 </p>
   1779 </dd>
   1780 <dt><code><span id="iostats"></span>iostats</code></dt>
   1781 <dd><p>Display network and reference clock I/O statistics.
   1782 </p>
   1783 </dd>
   1784 <dt><code><span id="kerninfo"></span>kerninfo</code></dt>
   1785 <dd><p>Display kernel loop and PPS statistics.
   1786 As with other ntpq output, times are in milliseconds.
   1787 The precision value displayed is in milliseconds as well,
   1788 unlike the precision system variable.
   1789 </p>
   1790 </dd>
   1791 <dt><code><span id="lassoc"></span>lassociations</code></dt>
   1792 <dd><p>Perform the same function as the associations command,
   1793 except display mobilized and unmobilized associations.
   1794 </p>
   1795 </dd>
   1796 <dt><code><span id="monstats"></span>monstats</code></dt>
   1797 <dd><p>Display monitor facility statistics.
   1798 </p>
   1799 </dd>
   1800 <dt><code><span id="mrulist"></span>mrulist [limited | kod | mincount=<kbd>count</kbd> | laddr=<kbd>localaddr</kbd> | sort=<kbd>sortorder</kbd> | resany=<kbd>hexmask</kbd> | resall=<kbd>hexmask</kbd>]</code></dt>
   1801 <dd><p>Obtain and print traffic counts collected and maintained by
   1802 the monitor facility.
   1803 With the exception of <code>sort=<kbd>sortorder</kbd></code>,
   1804 the options filter the list returned by <code>ntpd</code>.
   1805 The <code>limited</code> and <code>kod</code> options return only entries
   1806 representing client addresses from which the last packet received
   1807 triggered either discarding or a KoD response.
   1808 The <code>mincount=<kbd>count</kbd></code> option filters entries representing
   1809 less than <code><kbd>count</kbd></code> packets.
   1810 The <code>laddr=<kbd>localaddr</kbd></code> option filters entries for packets
   1811 received on any local address other than <code><kbd>localaddr</kbd></code>.
   1812 <code>resany=<kbd>hexmask</kbd></code> and <code>resall=<kbd>hexmask</kbd></code>
   1813 filter entries containing none or less than all, respectively,
   1814 of the bits in <code><kbd>hexmask</kbd></code>, which must begin with <code>0x</code>.
   1815 <br>
   1816 The <code><kbd>sortorder</kbd></code> defaults to <code>lstint</code> and may be any of
   1817 <code>addr</code>, <code>count</code>, <code>avgint</code>, <code>lstint</code>, or
   1818 any of those preceded by a minus sign (hyphen) to reverse the sort order.
   1819 The output columns are:
   1820 </p>
   1821 <table>
   1822 <thead><tr><th width="10%">Column</th><th width="40%">Description</th></tr></thead>
   1823 <tr><td width="10%"><code>lstint</code></td><td width="40%">Interval in s between the receipt of the most recent packet from this
   1824 address and the completion of the retrieval of the MRU list by <code>ntpq</code></td></tr>
   1825 <tr><td width="10%"><code>avgint</code></td><td width="40%">Average interval in s between packets from this address.</td></tr>
   1826 <tr><td width="10%"><code>rstr</code></td><td width="40%">Restriction flags associated with this address.
   1827 Most are copied unchanged from the matching <code>restrict</code> command,
   1828 however 0x400 (kod) and 0x20 (limited) flags are cleared unless
   1829 the last packet from this address triggered a rate control response.</td></tr>
   1830 <tr><td width="10%"><code>r</code></td><td width="40%">Rate control indicator, either a period, <code>L</code> or <code>K</code> for
   1831 no rate control response, rate limiting by discarding, or
   1832 rate limiting with a KoD response, respectively.</td></tr>
   1833 <tr><td width="10%"><code>m</code></td><td width="40%">Packet mode.</td></tr>
   1834 <tr><td width="10%"><code>v</code></td><td width="40%">Packet version number.</td></tr>
   1835 <tr><td width="10%"><code>count</code></td><td width="40%">Packets received from this address.</td></tr>
   1836 <tr><td width="10%"><code>rport</code></td><td width="40%">Source port of last packet from this address.</td></tr>
   1837 <tr><td width="10%"><code>remote address</code></td><td width="40%">DNS name, numeric address, or address followed by claimed DNS name which
   1838 could not be verified in parentheses.</td></tr>
   1839 </table>
   1840 
   1841 </dd>
   1842 <dt><code><span id="mreadvar"></span><code>mreadvar <kbd>assocID</kbd> <kbd>assocID</kbd> [ <kbd>variable_name</kbd> [ = <kbd>value</kbd>[ ... ]</code></code></dt>
   1843 <dt><code><span id="mrv"></span><code>mrv <kbd>assocID</kbd> <kbd>assocID</kbd> [ <kbd>variable_name</kbd> [ = <kbd>value</kbd>[ ... ]</code></code></dt>
   1844 <dd><p>Perform the same function as the <code>readvar</code> command,
   1845 except for a range of association IDs.
   1846 This range is determined from the association list cached by
   1847 the most recent <code>associations</code> command.
   1848 </p>
   1849 </dd>
   1850 <dt><code><span id="passoc"></span><code>passociations</code></code></dt>
   1851 <dd><p>Perform the same function as the <code>associations command</code>, except that
   1852 it uses previously stored data rather than making a new query.
   1853 </p>
   1854 </dd>
   1855 <dt><code><span id="pe"></span><code>peers</code></code></dt>
   1856 <dd><p>Display a list of peers in the form:
   1857 <br>
   1858 <code>[tally]remote refid st t when pool reach delay offset jitter</code>
   1859 </p>
   1860 <table>
   1861 <thead><tr><th width="10%">Variable</th><th width="20%">Description</th></tr></thead>
   1862 <tr><td width="10%"><code>[tally]</code></td><td width="20%">single-character code indicating current value of the <code>select</code> field
   1863 of the <a href="decode.html#peer">peer status word</a>.</td></tr>
   1864 <tr><td width="10%"><code>remote</code></td><td width="20%">host name (or IP number) of peer</td></tr>
   1865 <tr><td width="10%"><code>refid</code></td><td width="20%">association ID or <a href="decode.html#kiss">kiss code</a>.</td></tr>
   1866 <tr><td width="10%"><code>st</code></td><td width="20%">stratum</td></tr>
   1867 <tr><td width="10%"><code>t</code></td><td width="20%"><code>u</code>: unicast or manycast client,
   1868 <code>b</code>: broadcast or multicast client,
   1869 <code>l</code>: local (reference clock),
   1870 <code>s</code>: symmetric (peer),
   1871 <code>A</code>: manycast server,
   1872 <code>B</code>: broadcast server,
   1873 <code>M</code>: multicast server.</td></tr>
   1874 <tr><td width="10%"><code>when</code></td><td width="20%">sec/min/hr since last received packet</td></tr>
   1875 <tr><td width="10%"><code>poll</code></td><td width="20%">poll interval (log(2) s)</td></tr>
   1876 <tr><td width="10%"><code>reach</code></td><td width="20%">reach shift register (octal)</td></tr>
   1877 <tr><td width="10%"><code>delay</code></td><td width="20%">roundtrip delay</td></tr>
   1878 <tr><td width="10%"><code>offset</code></td><td width="20%">offset of server relative to this host</td></tr>
   1879 <tr><td width="10%"><code>jitter</code></td><td width="20%">jitter</td></tr>
   1880 </table>
   1881 
   1882 </dd>
   1883 <dt><code><span id="rv"></span>readvar <kbd>assocID</kbd> <kbd>name</kbd> [ = <kbd>value</kbd> ] [,...]</code></dt>
   1884 <dt><code>rv <kbd>assocID</kbd> [ <kbd>name</kbd> ] [,...]</code></dt>
   1885 <dd><p>Display the specified variables.
   1886 If <code><kbd>assocID</kbd></code> is zero,
   1887 the variables are from the &lsquo;system variables&rsquo; name space,
   1888 otherwise they are from the &lsquo;peer variables&rsquo; name space.
   1889 The <kbd>assocID</kbd> is required, as the same name can occur in both spaces.
   1890 If no <kbd>name</kbd> is included,
   1891 all operative variables in the name space are displayed.
   1892 In this case only, if the <code><kbd>assocID</kbd></code> is omitted, it is assumed zero.
   1893 Multiple names are specified with comma separators and without whitespace.
   1894 Note that time values are represented in milliseconds and
   1895 frequency values in parts-per-million (PPM).
   1896 Some NTP timestamps are represented in the format YYYYMMDDTTTT,
   1897 where YYYY is the year, MM the month of year, DD the day of month and
   1898 TTTT the time of day.
   1899 </p>
   1900 </dd>
   1901 <dt><code><span id="saveconfig"></span><code>saveconfig <kbd>filename</kbd></code></code></dt>
   1902 <dd><p>Write the current configuration, including any runtime modifications
   1903 given with <code>:config</code> or <code>config-from-file</code>,
   1904 to the ntpd host&rsquo;s file <kbd>filename</kbd>.
   1905 This command will be rejected by the server unless
   1906 <a href="miscopt.html#saveconfigdir">saveconfigdir</a>
   1907 appears in the <code>ntpd</code> configuration file.
   1908 <kbd>filename</kbd> can use <code>strftime()</code> format specifiers
   1909 to substitute the current date and time, for example,
   1910 <code>saveconfig ntp-%Y%m%d-%H%M%S.conf</code>.
   1911 The filename used is stored in system variable <code>savedconfig</code>.
   1912 Authentication is required.
   1913 </p>
   1914 </dd>
   1915 <dt><code><span id="writevar"></span>writevar <kbd>assocID</kbd> <kbd>name</kbd> = <kbd>value</kbd> [,...]</code></dt>
   1916 <dd><p>Write the specified variables.
   1917 If the <code><kbd>assocID</kbd></code> is zero, the variables are from the
   1918 &lsquo;system variables&rsquo; name space, otherwise they are from the
   1919 &lsquo;peer variables&rsquo; name	space.
   1920 The <code><kbd>assocID</kbd></code> is required,
   1921 as the same name can occur in both spaces.
   1922 </p>
   1923 </dd>
   1924 <dt><code><span id="sysinfo"></span><code>sysinfo</code></code></dt>
   1925 <dd><p>Display operational summary.
   1926 </p>
   1927 </dd>
   1928 <dt><code><span id="sysstats"></span><code>sysstats</code></code></dt>
   1929 <dd><p>Print statistics counters maintained in the protocol module.
   1930 </p>
   1931 </dd>
   1932 </dl>
   1933 
   1934 <hr>
   1935 <span id="Status-Words-and-Kiss-Codes"></span><div class="header">
   1936 <p>
   1937 Next: <a href="#System-Variables" accesskey="n" rel="next">System Variables</a>, Previous: <a href="#Control-Message-Commands" accesskey="p" rel="prev">Control Message Commands</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
   1938 </div>
   1939 <span id="Status-Words-and-Kiss-Codes-2"></span><h3 class="section">1.5 Status Words and Kiss Codes</h3>
   1940 
   1941 <p>The current state of the operating program is shown
   1942 in a set of status words maintained by the system
   1943 and each association separately.
   1944 These words are displayed in the <code>rv</code> and <code>as</code> commands
   1945 both in hexadecimal and decoded short tip strings.
   1946 The codes, tips and short explanations are on the
   1947 <a href="decode.html">Event Messages and Status Words</a> page.
   1948 The page also includes a list of system and peer messages,
   1949 the code for the latest of which is included in the status word.
   1950 </p>
   1951 <p>Information resulting from protocol machine state transitions
   1952 is displayed using an informal set of ASCII strings called
   1953 <a href="decode.html#kiss">kiss codes</a>.
   1954 The original purpose was for kiss-o&rsquo;-death (KoD) packets sent
   1955 by the server to advise the client of an unusual condition.
   1956 They are now displayed, when appropriate,
   1957 in the reference identifier field in various billboards.
   1958 </p>
   1959 <hr>
   1960 <span id="System-Variables"></span><div class="header">
   1961 <p>
   1962 Next: <a href="#Peer-Variables" accesskey="n" rel="next">Peer Variables</a>, Previous: <a href="#Status-Words-and-Kiss-Codes" accesskey="p" rel="prev">Status Words and Kiss Codes</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
   1963 </div>
   1964 <span id="System-Variables-2"></span><h3 class="section">1.6 System Variables</h3>
   1965 
   1966 <p>The following system variables appear in the <code>rv</code> billboard.
   1967 Not all variables are displayed in some configurations.
   1968 </p>
   1969 <table>
   1970 <thead><tr><th width="10%">Variable</th><th width="20%">Description</th></tr></thead>
   1971 <tr><td width="10%"><code>status</code></td><td width="20%"><a href="decode.html#sys">system status word</a></td></tr>
   1972 <tr><td width="10%"><code>version</code></td><td width="20%">NTP software version and build time</td></tr>
   1973 <tr><td width="10%"><code>processor</code></td><td width="20%">hardware platform and version</td></tr>
   1974 <tr><td width="10%"><code>system</code></td><td width="20%">operating system and version</td></tr>
   1975 <tr><td width="10%"><code>leap</code></td><td width="20%">leap warning indicator (0-3)</td></tr>
   1976 <tr><td width="10%"><code>stratum</code></td><td width="20%">stratum (1-15)</td></tr>
   1977 <tr><td width="10%"><code>precision</code></td><td width="20%">precision (log(2) s)</td></tr>
   1978 <tr><td width="10%"><code>rootdelay</code></td><td width="20%">total roundtrip delay to the primary reference clock</td></tr>
   1979 <tr><td width="10%"><code>rootdisp</code></td><td width="20%">total dispersion to the primary reference clock</td></tr>
   1980 <tr><td width="10%"><code>peer</code></td><td width="20%">system peer association ID</td></tr>
   1981 <tr><td width="10%"><code>tc</code>
   1982 time constant and poll exponent (log(2) s) (3-17)</td></tr>
   1983 <tr><td width="10%"><code>mintc</code>
   1984 minimum time constant (log(2) s) (3-10)</td></tr>
   1985 <tr><td width="10%"><code>clock</code></td><td width="20%">date and time of day</td></tr>
   1986 <tr><td width="10%"><code>refid</code>
   1987 reference ID or <a href="decode.html#kiss">kiss code</a></td></tr>
   1988 <tr><td width="10%"><code>reftime</code></td><td width="20%">reference time</td></tr>
   1989 <tr><td width="10%"><code>offset</code></td><td width="20%">combined offset of server relative to this host</td></tr>
   1990 <tr><td width="10%"><code>sys_jitter</code></td><td width="20%">combined system jitter</td></tr>
   1991 <tr><td width="10%"><code>frequency</code></td><td width="20%">frequency offset (PPM) relative to hardware clock</td></tr>
   1992 <tr><td width="10%"><code>clk_wander</code></td><td width="20%">clock frequency wander (PPM)</td></tr>
   1993 <tr><td width="10%"><code>clk_jitter</code></td><td width="20%">clock jitter</td></tr>
   1994 <tr><td width="10%"><code>tai</code></td><td width="20%">TAI-UTC offset (s)</td></tr>
   1995 <tr><td width="10%"><code>leapsec</code></td><td width="20%">NTP seconds when the next leap second is/was inserted</td></tr>
   1996 <tr><td width="10%"><code>expire</code></td><td width="20%">NTP seconds when the NIST leapseconds file expires</td></tr>
   1997 </table>
   1998 
   1999 <p>The jitter and wander statistics are exponentially-weighted RMS averages.
   2000 The system jitter is defined in the NTPv4 specification;
   2001 the clock jitter statistic is computed by the clock discipline module.
   2002 </p>
   2003 <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
   2004 additional system variables are displayed, including some or all of the
   2005 following, depending on the particular Autokey dance:
   2006 </p>
   2007 <table>
   2008 <thead><tr><th width="10%">Variable</th><th width="20%">Description</th></tr></thead>
   2009 <tr><td width="10%"><code>host</code></td><td width="20%">Autokey host name for this host</td></tr>
   2010 <tr><td width="10%"><code>ident</code></td><td width="20%">Autokey group name for this host</td></tr>
   2011 <tr><td width="10%"><code>flags</code></td><td width="20%">host flags  (see Autokey specification)</td></tr>
   2012 <tr><td width="10%"><code>digest</code></td><td width="20%">OpenSSL message digest algorithm</td></tr>
   2013 <tr><td width="10%"><code>signature</code></td><td width="20%">OpenSSL digest/signature scheme</td></tr>
   2014 <tr><td width="10%"><code>update</code></td><td width="20%">NTP seconds at last signature update</td></tr>
   2015 <tr><td width="10%"><code>cert</code></td><td width="20%">certificate subject, issuer and certificate flags</td></tr>
   2016 <tr><td width="10%"><code>until</code></td><td width="20%">NTP seconds when the certificate expires</td></tr>
   2017 </table>
   2018 
   2019 <hr>
   2020 <span id="Peer-Variables"></span><div class="header">
   2021 <p>
   2022 Next: <a href="#Clock-Variables" accesskey="n" rel="next">Clock Variables</a>, Previous: <a href="#System-Variables" accesskey="p" rel="prev">System Variables</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
   2023 </div>
   2024 <span id="Peer-Variables-2"></span><h3 class="section">1.7 Peer Variables</h3>
   2025 
   2026 <p>The following peer variables appear in the <code>rv</code> billboard
   2027 for each association.
   2028 Not all variables are displayed in some configurations.
   2029 </p>
   2030 <table>
   2031 <thead><tr><th width="10%">Variable</th><th width="20%">Description</th></tr></thead>
   2032 <tr><td width="10%"><code>associd</code></td><td width="20%">association ID</td></tr>
   2033 <tr><td width="10%"><code>status</code></td><td width="20%"><a href="decode.html#peer">peer status word</a></td></tr>
   2034 <tr><td width="10%"><code>srcadr</code></td><td width="20%">source (remote) IP address and port</td></tr>
   2035 <tr><td width="10%"><code>dstadr</code></td><td width="20%">destination (local) IP address and port</td></tr>
   2036 <tr><td width="10%"><code>leap</code></td><td width="20%">leap indicator (0-3)</td></tr>
   2037 <tr><td width="10%"><code>stratum</code></td><td width="20%">stratum (0-15)</td></tr>
   2038 <tr><td width="10%"><code>precision</code></td><td width="20%">precision (log(2) s)</td></tr>
   2039 <tr><td width="10%"><code>rootdelay</code></td><td width="20%">total roundtrip delay to the primary reference clock</td></tr>
   2040 <tr><td width="10%"><code>rootdisp</code></td><td width="20%">total root dispersion to the primary reference clock</td></tr>
   2041 <tr><td width="10%"><code>refid</code></td><td width="20%">reference ID or <a href="decode.html#kiss">kiss code</a></td></tr>
   2042 <tr><td width="10%"><code>reftime</code></td><td width="20%">reference time</td></tr>
   2043 <tr><td width="10%"><code>reach</code></td><td width="20%">reach register (octal)</td></tr>
   2044 <tr><td width="10%"><code>unreach</code></td><td width="20%">unreach counter</td></tr>
   2045 <tr><td width="10%"><code>hmode</code></td><td width="20%">host mode (1-6)</td></tr>
   2046 <tr><td width="10%"><code>pmode</code></td><td width="20%">peer mode (1-5)</td></tr>
   2047 <tr><td width="10%"><code>hpoll</code></td><td width="20%">host poll exponent (log(2) s) (3-17)</td></tr>
   2048 <tr><td width="10%"><code>ppoll</code></td><td width="20%">peer poll exponent (log(2) s) (3-17)</td></tr>
   2049 <tr><td width="10%"><code>headway</code></td><td width="20%">headway (see <a href="rate.html">Rate Management and the Kiss-o&rsquo;-Death Packet</a>)</td></tr>
   2050 <tr><td width="10%"><code>flash</code></td><td width="20%"><a href="decode.html#flash">flash status word</a></td></tr>
   2051 <tr><td width="10%"><code>offset</code></td><td width="20%">filter offset</td></tr>
   2052 <tr><td width="10%"><code>delay</code></td><td width="20%">filter delay</td></tr>
   2053 <tr><td width="10%"><code>dispersion</code></td><td width="20%">filter dispersion</td></tr>
   2054 <tr><td width="10%"><code>jitter</code></td><td width="20%">filter jitter</td></tr>
   2055 <tr><td width="10%"><code>ident</code></td><td width="20%">Autokey group name for this association</td></tr>
   2056 <tr><td width="10%"><code>bias</code></td><td width="20%">unicast/broadcast bias</td></tr>
   2057 <tr><td width="10%"><code>xleave</code></td><td width="20%">interleave delay (see <a href="xleave.html">NTP Interleaved Modes</a>)</td></tr>
   2058 </table>
   2059 
   2060 <p>The bias variable is calculated when the first broadcast packet is received
   2061 after the calibration volley.  It represents the offset of the broadcast
   2062 subgraph relative to the unicast subgraph.  The xleave variable appears
   2063 only the interleaved symmetric and interleaved modes.  It represents
   2064 the internal queuing, buffering and transmission delays for the preceding
   2065 packet.
   2066 </p>
   2067 <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
   2068 additional peer variables are displayed, including the following:
   2069 </p>
   2070 <table>
   2071 <thead><tr><th width="10%">Variable</th><th width="20%">Description</th></tr></thead>
   2072 <tr><td width="10%"><code>flags</code></td><td width="20%">peer flags (see Autokey specification)</td></tr>
   2073 <tr><td width="10%"><code>host</code></td><td width="20%">Autokey server name</td></tr>
   2074 <tr><td width="10%"><code>flags</code></td><td width="20%">peer flags (see Autokey specification)</td></tr>
   2075 <tr><td width="10%"><code>signature</code></td><td width="20%">OpenSSL digest/signature scheme</td></tr>
   2076 <tr><td width="10%"><code>initsequence</code></td><td width="20%">initial key ID</td></tr>
   2077 <tr><td width="10%"><code>initkey</code></td><td width="20%">initial key index</td></tr>
   2078 <tr><td width="10%"><code>timestamp</code></td><td width="20%">Autokey signature timestamp</td></tr>
   2079 </table>
   2080 
   2081 <hr>
   2082 <span id="Clock-Variables"></span><div class="header">
   2083 <p>
   2084 Previous: <a href="#Peer-Variables" accesskey="p" rel="prev">Peer Variables</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
   2085 </div>
   2086 <span id="Clock-Variables-2"></span><h3 class="section">1.8 Clock Variables</h3>
   2087 
   2088 <p>The following clock variables appear in the <code>cv</code> billboard for each association with a reference clock.  Not all variables are displayed in some configurations.
   2089 </p>
   2090 <table>
   2091 <thead><tr><th width="10%">Variable</th><th width="20%">Description</th></tr></thead>
   2092 <tr><td width="10%"><code>associd</code></td><td width="20%">association ID</td></tr>
   2093 <tr><td width="10%"><code>status</code></td><td width="20%"><a href="decode.html#clock">clock status word</a></td></tr>
   2094 <tr><td width="10%"><code>device</code></td><td width="20%">device description</td></tr>
   2095 <tr><td width="10%"><code>timecode</code></td><td width="20%">ASCII time code string (specific to device)</td></tr>
   2096 <tr><td width="10%"><code>poll</code></td><td width="20%">poll messages sent</td></tr>
   2097 <tr><td width="10%"><code>noreply</code></td><td width="20%">no reply</td></tr>
   2098 <tr><td width="10%"><code>badformat</code></td><td width="20%">bad format</td></tr>
   2099 <tr><td width="10%"><code>baddata</code></td><td width="20%">bad date or time</td></tr>
   2100 <tr><td width="10%"><code>fudgetime1</code></td><td width="20%">fudge time 1</td></tr>
   2101 <tr><td width="10%"><code>fudgetime2</code></td><td width="20%">fudge time 2</td></tr>
   2102 <tr><td width="10%"><code>stratum</code></td><td width="20%">driver stratum</td></tr>
   2103 <tr><td width="10%"><code>refid</code></td><td width="20%">driver reference ID</td></tr>
   2104 <tr><td width="10%"><code>flags</code></td><td width="20%">driver flags</td></tr>
   2105 </table>
   2106 <hr>
   2107 
   2108 
   2109 
   2110 </body>
   2111 </html>
   2112