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