ntpq.html revision 298695
1275970Scy<html lang="en"> 2275970Scy<head> 3275970Scy<title>ntpq: Network Time Protocol Query User's Manual</title> 4275970Scy<meta http-equiv="Content-Type" content="text/html"> 5275970Scy<meta name="description" content="ntpq: Network Time Protocol Query User's Manual"> 6275970Scy<meta name="generator" content="makeinfo 4.7"> 7275970Scy<link title="Top" rel="top" href="#Top"> 8275970Scy<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 9275970Scy<meta http-equiv="Content-Style-Type" content="text/css"> 10275970Scy<style type="text/css"><!-- 11275970Scy pre.display { font-family:inherit } 12275970Scy pre.format { font-family:inherit } 13275970Scy pre.smalldisplay { font-family:inherit; font-size:smaller } 14275970Scy pre.smallformat { font-family:inherit; font-size:smaller } 15275970Scy pre.smallexample { font-size:smaller } 16275970Scy pre.smalllisp { font-size:smaller } 17275970Scy span.sc { font-variant:small-caps } 18275970Scy span.roman { font-family: serif; font-weight: normal; } 19275970Scy--></style> 20275970Scy</head> 21275970Scy<body> 22275970Scy<h1 class="settitle">ntpq: Network Time Protocol Query User's Manual</h1> 23275970Scy <div class="shortcontents"> 24275970Scy<h2>Short Contents</h2> 25275970Scy<ul> 26275970Scy<a href="#Top">ntpq: Network Time Protocol Query User Manual</a> 27275970Scy</ul> 28275970Scy</div> 29275970Scy 30275970Scy 31275970Scy 32275970Scy<div class="node"> 33275970Scy<p><hr> 34275970Scy<a name="Top"></a>Next: <a rel="next" accesskey="n" href="#ntpq-Description">ntpq Description</a>, 35275970ScyPrevious: <a rel="previous" accesskey="p" href="#dir">(dir)</a>, 36275970ScyUp: <a rel="up" accesskey="u" href="#dir">(dir)</a> 37275970Scy<br> 38275970Scy</div> 39275970Scy 40275970Scy<h2 class="unnumbered">ntpq: Network Time Protocol Query User Manual</h2> 41275970Scy 42275970Scy<p>The <code>ntpq</code> utility program is used to 43275970Scymonitor the operational status 44275970Scyand determine the performance of 45275970Scy<code>ntpd</code>, the NTP daemon. 46275970Scy 47298695Sdelphij <p>This document applies to version 4.2.8p7 of <code>ntpq</code>. 48275970Scy 49275970Scy<ul class="menu"> 50275970Scy<li><a accesskey="1" href="#ntpq-Description">ntpq Description</a> 51275970Scy<li><a accesskey="2" href="#ntpq-Invocation">ntpq Invocation</a>: Invoking ntpq 52275970Scy<li><a accesskey="3" href="#Usage">Usage</a> 53275970Scy<li><a accesskey="4" href="#Internal-Commands">Internal Commands</a> 54275970Scy<li><a accesskey="5" href="#Control-Message-Commands">Control Message Commands</a> 55275970Scy<li><a accesskey="6" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a> 56275970Scy<li><a accesskey="7" href="#System-Variables">System Variables</a> 57275970Scy<li><a accesskey="8" href="#Peer-Variables">Peer Variables</a> 58275970Scy<li><a accesskey="9" href="#Clock-Variables">Clock Variables</a> 59275970Scy</ul> 60275970Scy 61275970Scy<div class="node"> 62275970Scy<p><hr> 63275970Scy<a name="ntpq-Description"></a>Next: <a rel="next" accesskey="n" href="#Usage">Usage</a>, 64275970ScyPrevious: <a rel="previous" accesskey="p" href="#Top">Top</a>, 65275970ScyUp: <a rel="up" accesskey="u" href="#Top">Top</a> 66275970Scy<br> 67275970Scy</div> 68275970Scy 69275970Scy<!-- node-name, next, previous, up --> 70275970Scy<h3 class="section">Description</h3> 71275970Scy 72275970Scy<p>The <code>ntpq</code> utility program is used to monitor NTP daemon <code>ntpd</code> operations and determine performance. 73275970ScyIt uses the standard NTP mode 6 control message formats defined in 74275970ScyAppendix B of the NTPv3 specification RFC1305. 75275970ScyThe same formats are used in NTPv4, although some of the variable names have changed and new ones added. 76275970ScyThe description on this page is for the NTPv4 variables. 77275970Scy 78275970Scy <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. 79275970Scy 80275970Scy <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. 81275970Scy 82275970Scy <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. 83275970Scy 84275970Scy <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. 85275970Scy 86275970Scy <p>For examples and usage, see the <a href="debug.html">NTP Debugging Techniques</a> page. 87275970Scy 88275970Scy<div class="node"> 89275970Scy<p><hr> 90275970Scy<a name="ntpq-Invocation"></a> 91275970Scy<br> 92275970Scy</div> 93275970Scy 94275970Scy<h3 class="section">Invoking ntpq</h3> 95275970Scy 96275970Scy<p><a name="index-ntpq-1"></a><a name="index-standard-NTP-query-program-2"></a> 97275970Scy 98275970Scy <p>The 99275970Scy<code>ntpq</code> 100275970Scyutility program is used to query NTP servers which 101275970Scyimplement the standard NTP mode 6 control message formats defined 102275970Scyin Appendix B of the NTPv3 specification RFC1305, requesting 103275970Scyinformation about current state and/or changes in that state. 104275970ScyThe same formats are used in NTPv4, although some of the 105275970Scyvariables have changed and new ones added. The description on this 106275970Scypage is for the NTPv4 variables. 107275970ScyThe program may be run either in interactive mode or controlled using 108275970Scycommand line arguments. 109275970ScyRequests to read and write arbitrary 110275970Scyvariables can be assembled, with raw and pretty-printed output 111275970Scyoptions being available. 112275970ScyThe 113275970Scy<code>ntpq</code> 114275970Scyutility can also obtain and print a 115275970Scylist of peers in a common format by sending multiple queries to the 116275970Scyserver. 117275970Scy 118275970Scy <p>If one or more request options is included on the command line 119275970Scywhen 120275970Scy<code>ntpq</code> 121275970Scyis executed, each of the requests will be sent 122275970Scyto the NTP servers running on each of the hosts given as command 123275970Scyline arguments, or on localhost by default. 124275970ScyIf no request options 125275970Scyare given, 126275970Scy<code>ntpq</code> 127275970Scywill attempt to read commands from the 128275970Scystandard input and execute these on the NTP server running on the 129275970Scyfirst host given on the command line, again defaulting to localhost 130275970Scywhen no other host is specified. 131275970ScyThe 132275970Scy<code>ntpq</code> 133275970Scyutility will prompt for 134275970Scycommands if the standard input is a terminal device. 135275970Scy 136275970Scy <p><code>ntpq</code> 137275970Scyuses NTP mode 6 packets to communicate with the 138275970ScyNTP server, and hence can be used to query any compatible server on 139275970Scythe network which permits it. 140275970ScyNote that since NTP is a UDP protocol 141275970Scythis communication will be somewhat unreliable, especially over 142275970Scylarge distances in terms of network topology. 143275970ScyThe 144275970Scy<code>ntpq</code> 145275970Scyutility makes 146275970Scyone attempt to retransmit requests, and will time requests out if 147275970Scythe remote host is not heard from within a suitable timeout 148275970Scytime. 149275970Scy 150275970Scy <p>Specifying a 151275970Scycommand line option other than 152275970Scy<code>-i</code> 153275970Scyor 154275970Scy<code>-n</code> 155275970Scywill 156275970Scycause the specified query (queries) to be sent to the indicated 157275970Scyhost(s) immediately. 158275970ScyOtherwise, 159275970Scy<code>ntpq</code> 160275970Scywill attempt to read 161275970Scyinteractive format commands from the standard input. 162275970Scy 163275970Scy<h5 class="subsubsection">Internal Commands</h5> 164275970Scy 165275970Scy<p>Interactive format commands consist of a keyword followed by zero 166275970Scyto four arguments. 167275970ScyOnly enough characters of the full keyword to 168275970Scyuniquely identify the command need be typed. 169275970Scy 170275970Scy <p>A 171275970Scynumber of interactive format commands are executed entirely within 172275970Scythe 173275970Scy<code>ntpq</code> 174275970Scyutility itself and do not result in NTP mode 6 175275970Scyrequests being sent to a server. 176275970ScyThese are described following. 177275970Scy <dl> 178275970Scy<dt><code>?</code> <code>[</code><kbd>command_keyword</kbd><code>]</code><br><dt><code>help</code> <code>[</code><kbd>command_keyword</kbd><code>]</code><dd>A 179275970Scy? 180275970Scyby itself will print a list of all the command 181275970Scykeywords known to this incarnation of 182275970Scy<code>ntpq</code> 183275970ScyA 184275970Scy? 185275970Scyfollowed by a command keyword will print function and usage 186275970Scyinformation about the command. 187275970ScyThis command is probably a better 188275970Scysource of information about 189275970Scy<code>ntpq</code> 190275970Scythan this manual 191275970Scypage. 192275970Scy<br><dt><code>addvars</code> <kbd>variable_name</kbd><code>[=value]</code> <code>...</code><br><dt><code>rmvars</code> <kbd>variable_name</kbd> <code>...</code><br><dt><code>clearvars</code><br><dt><code>showvars</code><dd>The data carried by NTP mode 6 messages consists of a list of 193275970Scyitems of the form 194275970Scyvariable_name=value, 195275970Scywhere the 196275970Scy=value 197275970Scyis ignored, and can be omitted, 198275970Scyin requests to the server to read variables. 199275970ScyThe 200275970Scy<code>ntpq</code> 201275970Scyutility maintains an internal list in which data to be included in control 202275970Scymessages can be assembled, and sent using the 203275970Scy<code>readlist</code> 204275970Scyand 205275970Scy<code>writelist</code> 206275970Scycommands described below. 207275970ScyThe 208275970Scy<code>addvars</code> 209275970Scycommand allows variables and their optional values to be added to 210275970Scythe list. 211275970ScyIf more than one variable is to be added, the list should 212275970Scybe comma-separated and not contain white space. 213275970ScyThe 214275970Scy<code>rmvars</code> 215275970Scycommand can be used to remove individual variables from the list, 216275970Scywhile the 217275970Scy<code>clearlist</code> 218275970Scycommand removes all variables from the 219275970Scylist. 220275970ScyThe 221275970Scy<code>showvars</code> 222275970Scycommand displays the current list of optional variables. 223275970Scy<br><dt><code>authenticate</code> <code>[yes | no]</code><dd>Normally 224275970Scy<code>ntpq</code> 225275970Scydoes not authenticate requests unless 226275970Scythey are write requests. 227275970ScyThe command 228275970Scyauthenticate yes 229275970Scycauses 230275970Scy<code>ntpq</code> 231275970Scyto send authentication with all requests it 232275970Scymakes. 233275970ScyAuthenticated requests causes some servers to handle 234275970Scyrequests slightly differently, and can occasionally melt the CPU in 235275970Scyfuzzballs if you turn authentication on before doing a 236275970Scy<code>peer</code> 237275970Scydisplay. 238275970ScyThe command 239275970Scyauthenticate 240275970Scycauses 241275970Scy<code>ntpq</code> 242275970Scyto display whether or not 243275970Scy<code>ntpq</code> 244275970Scyis currently autheinticating requests. 245275970Scy<br><dt><code>cooked</code><dd>Causes output from query commands to be "cooked", so that 246275970Scyvariables which are recognized by 247275970Scy<code>ntpq</code> 248275970Scywill have their 249275970Scyvalues reformatted for human consumption. 250275970ScyVariables which 251275970Scy<code>ntpq</code> 252275970Scythinks should have a decodable value but didn't are 253275970Scymarked with a trailing 254275970Scy?. 255275970Scy<br><dt><code>debug</code> <code>[more | less | off]</code><dd>With no argument, displays the current debug level. 256275970ScyOtherwise, the debug level is changed to the indicated level. 257275970Scy<br><dt><code>delay</code> <kbd>milliseconds</kbd><dd>Specify a time interval to be added to timestamps included in 258275970Scyrequests which require authentication. 259275970ScyThis is used to enable 260275970Scy(unreliable) server reconfiguration over long delay network paths 261275970Scyor between machines whose clocks are unsynchronized. 262275970ScyActually the 263275970Scyserver does not now require timestamps in authenticated requests, 264275970Scyso this command may be obsolete. 265275970Scy<br><dt><code>exit</code><dd>Exit 266275970Scy<code>ntpq</code> 267275970Scy<br><dt><code>host</code> <kbd>hostname</kbd><dd>Set the host to which future queries will be sent. 268275970Scy<kbd>hostname</kbd> 269275970Scymay be either a host name or a numeric address. 270275970Scy<br><dt><code>hostnames</code> <code>[yes | no]</code><dd>If 271275970Scy<code>yes</code> 272275970Scyis specified, host names are printed in 273275970Scyinformation displays. 274275970ScyIf 275275970Scy<code>no</code> 276275970Scyis specified, numeric 277275970Scyaddresses are printed instead. 278275970ScyThe default is 279275970Scy<code>yes</code>, 280275970Scyunless 281275970Scymodified using the command line 282275970Scy<code>-n</code> 283275970Scyswitch. 284275970Scy<br><dt><code>keyid</code> <kbd>keyid</kbd><dd>This command allows the specification of a key number to be 285275970Scyused to authenticate configuration requests. 286275970ScyThis must correspond 287285169Scyto the 288285169Scy<code>controlkey</code> 289285169Scykey number the server has been configured to use for this 290275970Scypurpose. 291275970Scy<br><dt><code>keytype</code> <code>[md5 | OpenSSLDigestType]</code><dd>Specify the type of key to use for authenticating requests. 292275970Scy<code>md5</code> 293275970Scyis alway supported. 294275970ScyIf 295275970Scy<code>ntpq</code> 296275970Scywas built with OpenSSL support, 297275970Scyany digest type supported by OpenSSL can also be provided. 298275970ScyIf no argument is given, the current 299275970Scy<code>keytype</code> 300275970Scyis displayed. 301275970Scy<br><dt><code>ntpversion</code> <code>[1 | 2 | 3 | 4]</code><dd>Sets the NTP version number which 302275970Scy<code>ntpq</code> 303275970Scyclaims in 304275970Scypackets. 305275970ScyDefaults to 3, and note that mode 6 control messages (and 306275970Scymodes, for that matter) didn't exist in NTP version 1. 307275970ScyThere appear 308275970Scyto be no servers left which demand version 1. 309275970ScyWith no argument, displays the current NTP version that will be used 310275970Scywhen communicating with servers. 311275970Scy<br><dt><code>passwd</code><dd>This command prompts you to type in a password (which will not 312275970Scybe echoed) which will be used to authenticate configuration 313275970Scyrequests. 314275970ScyThe password must correspond to the key configured for 315275970Scyuse by the NTP server for this purpose if such requests are to be 316275970Scysuccessful. 317275970Scy<code>poll</code> 318275970Scy<kbd>n</kbd> 319275970Scy<code>verbose</code> 320275970Scy<br><dt><code>quit</code><dd>Exit 321275970Scy<code>ntpq</code> 322275970Scy<br><dt><code>raw</code><dd>Causes all output from query commands is printed as received 323275970Scyfrom the remote server. 324275970ScyThe only formating/interpretation done on 325275970Scythe data is to transform nonascii data into a printable (but barely 326275970Scyunderstandable) form. 327275970Scy<br><dt><code>timeout</code> <kbd>milliseconds</kbd><dd>Specify a timeout period for responses to server queries. 328275970ScyThe 329275970Scydefault is about 5000 milliseconds. 330275970ScyNote that since 331275970Scy<code>ntpq</code> 332275970Scyretries each query once after a timeout, the total waiting time for 333275970Scya timeout will be twice the timeout value set. 334275970Scy<br><dt><code>version</code><dd>Print the version of the 335275970Scy<code>ntpq</code> 336275970Scyprogram. 337275970Scy</dl> 338275970Scy 339275970Scy<h5 class="subsubsection">Control Message Commands</h5> 340275970Scy 341275970Scy<p>Association IDs are used to identify system, peer and clock variables. 342275970ScySystem variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace. 343275970ScyMost control commands send a single mode-6 message to the server and expect a single response message. 344275970ScyThe exceptions are the 345275970Scy<code>peers</code> 346275970Scycommand, which sends a series of messages, 347275970Scyand the 348275970Scy<code>mreadlist</code> 349275970Scyand 350275970Scy<code>mreadvar</code> 351275970Scycommands, which iterate over a range of associations. 352275970Scy <dl> 353275970Scy<dt><code>associations</code><dd>Display a list of mobilized associations in the form: 354275970Scy <pre class="example"> ind assid status conf reach auth condition last_event cnt 355275970Scy </pre> 356275970Scy <dl> 357275970Scy<dt>Sy String Ta Sy Description<br><dt><code>ind</code> <code>Ta</code> <code>index</code> <code>on</code> <code>this</code> <code>list</code><br><dt><code>assid</code> <code>Ta</code> <code>association</code> <code>ID</code><br><dt><code>status</code> <code>Ta</code> <code>peer</code> <code>status</code> <code>word</code><br><dt><code>conf</code> <code>Ta</code> <code>yes</code>: <code>persistent,</code> <code>no</code>: <code>ephemeral</code><br><dt><code>reach</code> <code>Ta</code> <code>yes</code>: <code>reachable,</code> <code>no</code>: <code>unreachable</code><br><dt><code>auth</code> <code>Ta</code> <code>ok</code>, <code>yes</code>, <code>bad</code> <code>and</code> <code>none</code><br><dt><code>condition</code> <code>Ta</code> <code>selection</code> <code>status</code> <code>(see</code> <code>the</code> <code>select</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><br><dt><code>last_event</code> <code>Ta</code> <code>event</code> <code>report</code> <code>(see</code> <code>the</code> <code>event</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><br><dt><code>cnt</code> <code>Ta</code> <code>event</code> <code>count</code> <code>(see</code> <code>the</code> <code>count</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><dd></dl> 358275970Scy <br><dt><code>authinfo</code><dd>Display the authentication statistics. 359275970Scy<br><dt><code>clockvar</code> <kbd>assocID</kbd> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code> <code>[...]</code><br><dt><code>cv</code> <kbd>assocID</kbd> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code> <code>[...]</code><dd>Display a list of clock variables for those associations supporting a reference clock. 360275970Scy<br><dt><code>:config</code> <code>[...]</code><dd>Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required. 361275970Scy<br><dt><code>config-from-file</code> <kbd>filename</kbd><dd>Send the each line of 362275970Scy<kbd>filename</kbd> 363275970Scyto the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required. 364275970Scy<br><dt><code>ifstats</code><dd>Display statistics for each local network address. Authentication is required. 365275970Scy<br><dt><code>iostats</code><dd>Display network and reference clock I/O statistics. 366275970Scy<br><dt><code>kerninfo</code><dd>Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable. 367275970Scy<br><dt><code>lassociations</code><dd>Perform the same function as the associations command, except display mobilized and unmobilized associations. 368275970Scy<br><dt><code>lopeers</code> <code>[-4 | -6]</code><dd>Obtain and print a list of all peers and clients showing 369275970Scy<kbd>dstadr</kbd> 370275970Scy(associated with any given IP version). 371275970Scy<br><dt><code>lpeers</code> <code>[-4 | -6]</code><dd>Print a peer spreadsheet for the appropriate IP version(s). 372275970Scy<kbd>dstadr</kbd> 373275970Scy(associated with any given IP version). 374275970Scy<br><dt><code>monstats</code><dd>Display monitor facility statistics. 375275970Scy<br><dt><code>mrulist</code> <code>[limited | kod | mincount=</code><kbd>count</kbd><code> | laddr=</code><kbd>localaddr</kbd><code> | sort=</code><kbd>sortorder</kbd><code> | resany=</code><kbd>hexmask</kbd><code> | resall=</code><kbd>hexmask</kbd><code>]</code><dd>Obtain and print traffic counts collected and maintained by the monitor facility. 376275970ScyWith the exception of 377275970Scy<code>sort</code>=<kbd>sortorder</kbd>, 378275970Scythe options filter the list returned by 379275970Scy<code>ntpd.</code> 380275970ScyThe 381275970Scy<code>limited</code> 382275970Scyand 383275970Scy<code>kod</code> 384275970Scyoptions return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response. 385275970ScyThe 386275970Scy<code>mincount</code>=<kbd>count</kbd> 387275970Scyoption filters entries representing less than 388275970Scy<kbd>count</kbd> 389275970Scypackets. 390275970ScyThe 391275970Scy<code>laddr</code>=<kbd>localaddr</kbd> 392275970Scyoption filters entries for packets received on any local address other than 393275970Scy<kbd>localaddr</kbd>. 394275970Scy<code>resany</code>=<kbd>hexmask</kbd> 395275970Scyand 396275970Scy<code>resall</code>=<kbd>hexmask</kbd> 397275970Scyfilter entries containing none or less than all, respectively, of the bits in 398275970Scy<kbd>hexmask</kbd>, 399275970Scywhich must begin with 400275970Scy<code>0x</code>. 401275970ScyThe 402275970Scy<kbd>sortorder</kbd> 403275970Scydefaults to 404275970Scy<code>lstint</code> 405275970Scyand may be any of 406275970Scy<code>addr</code>, 407275970Scy<code>count</code>, 408275970Scy<code>avgint</code>, 409275970Scy<code>lstint</code>, 410275970Scyor any of those preceded by a minus sign (hyphen) to reverse the sort order. 411275970ScyThe output columns are: 412275970Scy <dl> 413275970Scy<dt>Column<dd>Description 414275970Scy<br><dt><code>lstint</code><dd>Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by 415275970Scy<code>ntpq</code> 416275970Scy<br><dt><code>avgint</code><dd>Average interval in s between packets from this address. 417275970Scy<br><dt><code>rstr</code><dd>Restriction flags associated with this address. 418275970ScyMost are copied unchanged from the matching 419275970Scy<code>restrict</code> 420275970Scycommand, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response. 421275970Scy<br><dt><code>r</code><dd>Rate control indicator, either 422275970Scya period, 423275970Scy<code>L</code> 424275970Scyor 425275970Scy<code>K</code> 426275970Scyfor no rate control response, 427275970Scyrate limiting by discarding, or rate limiting with a KoD response, respectively. 428275970Scy<br><dt><code>m</code><dd>Packet mode. 429275970Scy<br><dt><code>v</code><dd>Packet version number. 430275970Scy<br><dt><code>count</code><dd>Packets received from this address. 431275970Scy<br><dt><code>rport</code><dd>Source port of last packet from this address. 432275970Scy<br><dt><code>remote</code> <code>address</code><dd>DNS name, numeric address, or address followed by 433275970Scyclaimed DNS name which could not be verified in parentheses. 434275970Scy</dl> 435275970Scy <br><dt><code>mreadvar</code> <code>assocID</code> <code>assocID</code> <code>[</code><kbd>variable_name</kbd><code>[=</code><kbd>value</kbd><code>] ...]</code><br><dt><code>mrv</code> <code>assocID</code> <code>assocID</code> <code>[</code><kbd>variable_name</kbd><code>[=</code><kbd>value</kbd><code>] ...]</code><dd>Perform the same function as the 436275970Scy<code>readvar</code> 437275970Scycommand, except for a range of association IDs. 438275970ScyThis range is determined from the association list cached by the most recent 439275970Scy<code>associations</code> 440275970Scycommand. 441275970Scy<br><dt><code>opeers</code> <code>[-4 | -6]</code><dd>Obtain and print the old-style list of all peers and clients showing 442275970Scy<kbd>dstadr</kbd> 443275970Scy(associated with any given IP version), 444275970Scyrather than the 445275970Scy<kbd>refid</kbd>. 446275970Scy<br><dt><code>passociations</code><dd>Perform the same function as the 447275970Scy<code>associations</code> 448275970Scycommand, 449275970Scyexcept that it uses previously stored data rather than making a new query. 450275970Scy<br><dt><code>peers</code><dd>Display a list of peers in the form: 451275970Scy <pre class="example"> [tally]remote refid st t when pool reach delay offset jitter 452275970Scy </pre> 453275970Scy <dl> 454275970Scy<dt>Variable<dd>Description 455275970Scy<br><dt><code>[tally]</code><dd>single-character code indicating current value of the 456275970Scy<code>select</code> 457275970Scyfield of the 458275970Scy.Lk decode.html#peer "peer status word" 459275970Scy<br><dt><code>remote</code><dd>host name (or IP number) of peer. 460275970ScyThe value displayed will be truncated to 15 characters unless the 461275970Scy<code>-w</code> 462275970Scyflag is given, in which case the full value will be displayed 463275970Scyon the first line, 464275970Scyand the remaining data is displayed on the next line. 465275970Scy<br><dt><code>refid</code><dd>association ID or 466275970Scy.Lk decode.html#kiss "'kiss code" 467275970Scy<br><dt><code>st</code><dd>stratum 468275970Scy<br><dt><code>t</code><dd><code>u</code>: 469275970Scyunicast or manycast client, 470275970Scy<code>b</code>: 471275970Scybroadcast or multicast client, 472275970Scy<code>l</code>: 473275970Scylocal (reference clock), 474275970Scy<code>s</code>: 475275970Scysymmetric (peer), 476275970Scy<code>A</code>: 477275970Scymanycast server, 478275970Scy<code>B</code>: 479275970Scybroadcast server, 480275970Scy<code>M</code>: 481275970Scymulticast server 482275970Scy<br><dt><code>when</code><dd>sec/min/hr since last received packet 483275970Scy<br><dt><code>poll</code><dd>poll interval (log2 s) 484275970Scy<br><dt><code>reach</code><dd>reach shift register (octal) 485275970Scy<br><dt><code>delay</code><dd>roundtrip delay 486275970Scy<br><dt><code>offset</code><dd>offset of server relative to this host 487275970Scy<br><dt><code>jitter</code><dd>jitter 488275970Scy</dl> 489285169Scy <br><dt><code>apeers</code><dd>Display a list of peers in the form: 490285169Scy <pre class="example"> [tally]remote refid assid st t when pool reach delay offset jitter 491285169Scy </pre> 492285169Scy <p>where the output is just like the 493285169Scy<code>peers</code> 494285169Scycommand except that the 495285169Scy<code>refid</code> 496285169Scyis displayed in hex format and the association number is also displayed. 497285169Scy<br><dt><code>pstats</code> <kbd>assocID</kbd><dd>Show the statistics for the peer with the given 498275970Scy<kbd>assocID</kbd>. 499275970Scy<br><dt><code>readlist</code> <kbd>assocID</kbd><br><dt><code>rl</code> <kbd>assocID</kbd><dd>Read the system or peer variables included in the variable list. 500275970Scy<br><dt><code>readvar</code> <kbd>assocID</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code> <code>[, ...]</code><br><dt><code>rv</code> <kbd>assocID</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code> <code>[, ...]</code><dd>Display the specified variables. 501275970ScyIf 502275970Scy<kbd>assocID</kbd> 503275970Scyis zero, the variables are from the 504275970Scy<a href="#System-Variables">System Variables</a> 505275970Scyname space, otherwise they are from the 506275970Scy<a href="#Peer-Variables">Peer Variables</a> 507275970Scyname space. 508275970ScyThe 509275970Scy<kbd>assocID</kbd> 510275970Scyis required, as the same name can occur in both spaces. 511275970ScyIf no 512275970Scy<kbd>name</kbd> 513275970Scyis included, all operative variables in the name space are displayed. 514275970Scy 515275970Scy <p>In this case only, if the 516275970Scy<kbd>assocID</kbd> 517275970Scyis omitted, it is assumed zero. 518275970ScyMultiple names are specified with comma separators and without whitespace. 519275970ScyNote that time values are represented in milliseconds 520275970Scyand frequency values in parts-per-million (PPM). 521275970ScySome NTP timestamps are represented in the format 522275970ScyYYYYMMDDTTTT , 523275970Scywhere YYYY is the year, 524275970ScyMM the month of year, 525275970ScyDD the day of month and 526275970ScyTTTT the time of day. 527275970Scy<br><dt><code>reslist</code><dd>Show the access control (restrict) list for 528275970Scy<code>ntpq</code> 529275970Scy 530275970Scy <br><dt><code>saveconfig</code> <kbd>filename</kbd><dd>Write the current configuration, 531275970Scyincluding any runtime modifications given with 532275970Scy<code>:config</code> 533275970Scyor 534275970Scy<code>config-from-file</code>, 535275970Scyto the ntpd host's file 536275970Scy<kbd>filename</kbd>. 537275970ScyThis command will be rejected by the server unless 538275970Scy.Lk miscopt.html#saveconfigdir "saveconfigdir" 539275970Scyappears in the 540275970Scy<code>ntpd</code> 541275970Scyconfiguration file. 542275970Scy<kbd>filename</kbd> 543275970Scycan use 544275970Scy<code>strftime()</code> 545275970Scyformat specifies to substitute the current date and time, for example, 546275970Scy<code>q]saveconfig</code> <code>ntp-%Y%m%d-%H%M%S.confq]</code>. 547275970ScyThe filename used is stored in system variable 548275970Scy<code>savedconfig</code>. 549275970ScyAuthentication is required. 550275970Scy<br><dt><code>timerstats</code><dd>Display interval timer counters. 551275970Scy<br><dt><code>writelist</code> <kbd>assocID</kbd><dd>Write the system or peer variables included in the variable list. 552275970Scy<br><dt><code>writevar</code> <kbd>assocID</kbd> <kbd>name</kbd>=<kbd>value</kbd> <code>[, ...]</code><dd>Write the specified variables. 553275970ScyIf the 554275970Scy<kbd>assocID</kbd> 555275970Scyis zero, the variables are from the 556275970Scy<a href="#System-Variables">System Variables</a> 557275970Scyname space, otherwise they are from the 558275970Scy<a href="#Peer-Variables">Peer Variables</a> 559275970Scyname space. 560275970ScyThe 561275970Scy<kbd>assocID</kbd> 562275970Scyis required, as the same name can occur in both spaces. 563275970Scy<br><dt><code>sysinfo</code><dd>Display operational summary. 564275970Scy<br><dt><code>sysstats</code><dd>Print statistics counters maintained in the protocol module. 565275970Scy</dl> 566275970Scy 567275970Scy<h5 class="subsubsection">Status Words and Kiss Codes</h5> 568275970Scy 569275970Scy<p>The current state of the operating program is shown 570275970Scyin a set of status words 571275970Scymaintained by the system. 572275970ScyStatus information is also available on a per-association basis. 573275970ScyThese words are displayed in the 574275970Scy<code>rv</code> 575275970Scyand 576275970Scy<code>as</code> 577275970Scycommands both in hexadecimal and in decoded short tip strings. 578275970ScyThe codes, tips and short explanations are documented on the 579275970Scy.Lk decode.html "Event Messages and Status Words" 580275970Scypage. 581275970ScyThe page also includes a list of system and peer messages, 582275970Scythe code for the latest of which is included in the status word. 583275970Scy 584275970Scy <p>Information resulting from protocol machine state transitions 585275970Scyis displayed using an informal set of ASCII strings called 586275970Scy.Lk decode.html#kiss "kiss codes" . 587275970ScyThe original purpose was for kiss-o'-death (KoD) packets 588275970Scysent by the server to advise the client of an unusual condition. 589275970ScyThey are now displayed, when appropriate, 590275970Scyin the reference identifier field in various billboards. 591275970Scy 592275970Scy<h5 class="subsubsection">System Variables</h5> 593275970Scy 594275970Scy<p>The following system variables appear in the 595275970Scy<code>rv</code> 596275970Scybillboard. 597275970ScyNot all variables are displayed in some configurations. 598275970Scy <dl> 599275970Scy<dt>Variable<dd>Description 600275970Scy<br><dt><code>status</code><dd>.Lk decode.html#sys "system status word" 601275970Scy<br><dt><code>version</code><dd>NTP software version and build time 602275970Scy<br><dt><code>processor</code><dd>hardware platform and version 603275970Scy<br><dt><code>system</code><dd>operating system and version 604275970Scy<br><dt><code>leap</code><dd>leap warning indicator (0-3) 605275970Scy<br><dt><code>stratum</code><dd>stratum (1-15) 606275970Scy<br><dt><code>precision</code><dd>precision (log2 s) 607275970Scy<br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock 608275970Scy<br><dt><code>rootdisp</code><dd>total dispersion to the primary reference clock 609275970Scy<br><dt><code>peer</code><dd>system peer association ID 610275970Scy<br><dt><code>tc</code><dd>time constant and poll exponent (log2 s) (3-17) 611275970Scy<br><dt><code>mintc</code><dd>minimum time constant (log2 s) (3-10) 612275970Scy<br><dt><code>clock</code><dd>date and time of day 613275970Scy<br><dt><code>refid</code><dd>reference ID or 614275970Scy.Lk decode.html#kiss "kiss code" 615275970Scy<br><dt><code>reftime</code><dd>reference time 616275970Scy<br><dt><code>offset</code><dd>combined offset of server relative to this host 617275970Scy<br><dt><code>sys_jitter</code><dd>combined system jitter 618275970Scy<br><dt><code>frequency</code><dd>frequency offset (PPM) relative to hardware clock 619275970Scy<br><dt><code>clk_wander</code><dd>clock frequency wander (PPM) 620275970Scy<br><dt><code>clk_jitter</code><dd>clock jitter 621275970Scy<br><dt><code>tai</code><dd>TAI-UTC offset (s) 622275970Scy<br><dt><code>leapsec</code><dd>NTP seconds when the next leap second is/was inserted 623275970Scy<br><dt><code>expire</code><dd>NTP seconds when the NIST leapseconds file expires 624275970Scy</dl> 625275970Scy The jitter and wander statistics are exponentially-weighted RMS averages. 626275970ScyThe system jitter is defined in the NTPv4 specification; 627275970Scythe clock jitter statistic is computed by the clock discipline module. 628275970Scy 629275970Scy <p>When the NTPv4 daemon is compiled with the OpenSSL software library, 630275970Scyadditional system variables are displayed, 631275970Scyincluding some or all of the following, 632275970Scydepending on the particular Autokey dance: 633275970Scy 634275970Scy <dl> 635275970Scy<dt>Variable<dd>Description 636275970Scy<br><dt><code>host</code><dd>Autokey host name for this host 637275970Scy<br><dt><code>ident</code><dd>Autokey group name for this host 638275970Scy<br><dt><code>flags</code><dd>host flags (see Autokey specification) 639275970Scy<br><dt><code>digest</code><dd>OpenSSL message digest algorithm 640275970Scy<br><dt><code>signature</code><dd>OpenSSL digest/signature scheme 641275970Scy<br><dt><code>update</code><dd>NTP seconds at last signature update 642275970Scy<br><dt><code>cert</code><dd>certificate subject, issuer and certificate flags 643275970Scy<br><dt><code>until</code><dd>NTP seconds when the certificate expires 644275970Scy</dl> 645275970Scy 646275970Scy<h5 class="subsubsection">Peer Variables</h5> 647275970Scy 648275970Scy<p>The following peer variables appear in the 649275970Scy<code>rv</code> 650275970Scybillboard for each association. 651275970ScyNot all variables are displayed in some configurations. 652275970Scy 653275970Scy <dl> 654275970Scy<dt>Variable<dd>Description 655275970Scy<br><dt><code>associd</code><dd>association ID 656275970Scy<br><dt><code>status</code><dd>.Lk decode.html#peer "peer status word" 657275970Scy<br><dt><code>srcadr</code><dd>source (remote) IP address 658275970Scy<br><dt><code>srcport</code><dd>source (remote) port 659275970Scy<br><dt><code>dstadr</code><dd>destination (local) IP address 660275970Scy<br><dt><code>dstport</code><dd>destination (local) port 661275970Scy<br><dt><code>leap</code><dd>leap indicator (0-3) 662275970Scy<br><dt><code>stratum</code><dd>stratum (0-15) 663275970Scy<br><dt><code>precision</code><dd>precision (log2 s) 664275970Scy<br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock 665275970Scy<br><dt><code>rootdisp</code><dd>total root dispersion to the primary reference clock 666275970Scy<br><dt><code>refid</code><dd>reference ID or 667275970Scy.Lk decode.html#kiss "kiss code" 668275970Scy<br><dt><code>reftime</code><dd>reference time 669275970Scy<br><dt><code>reach</code><dd>reach register (octal) 670275970Scy<br><dt><code>unreach</code><dd>unreach counter 671275970Scy<br><dt><code>hmode</code><dd>host mode (1-6) 672275970Scy<br><dt><code>pmode</code><dd>peer mode (1-5) 673275970Scy<br><dt><code>hpoll</code><dd>host poll exponent (log2 s) (3-17) 674275970Scy<br><dt><code>ppoll</code><dd>peer poll exponent (log2 s) (3-17) 675275970Scy<br><dt><code>headway</code><dd>headway (see 676275970Scy.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" ) 677275970Scy<br><dt><code>flash</code><dd>.Lk decode.html#flash "flash status word" 678275970Scy<br><dt><code>offset</code><dd>filter offset 679275970Scy<br><dt><code>delay</code><dd>filter delay 680275970Scy<br><dt><code>dispersion</code><dd>filter dispersion 681275970Scy<br><dt><code>jitter</code><dd>filter jitter 682275970Scy<br><dt><code>ident</code><dd>Autokey group name for this association 683275970Scy<br><dt><code>bias</code><dd>unicast/broadcast bias 684275970Scy<br><dt><code>xleave</code><dd>interleave delay (see 685275970Scy.Lk xleave.html "NTP Interleaved Modes" ) 686275970Scy</dl> 687275970Scy The 688275970Scy<code>bias</code> 689275970Scyvariable is calculated when the first broadcast packet is received 690275970Scyafter the calibration volley. 691275970ScyIt represents the offset of the broadcast subgraph relative to the unicast subgraph. 692275970ScyThe 693275970Scy<code>xleave</code> 694275970Scyvariable appears only for the interleaved symmetric and interleaved modes. 695275970ScyIt represents the internal queuing, buffering and transmission delays 696275970Scyfor the preceding packet. 697275970Scy 698275970Scy <p>When the NTPv4 daemon is compiled with the OpenSSL software library, 699275970Scyadditional peer variables are displayed, including the following: 700275970Scy <dl> 701275970Scy<dt>Variable<dd>Description 702275970Scy<br><dt><code>flags</code><dd>peer flags (see Autokey specification) 703275970Scy<br><dt><code>host</code><dd>Autokey server name 704275970Scy<br><dt><code>flags</code><dd>peer flags (see Autokey specification) 705275970Scy<br><dt><code>signature</code><dd>OpenSSL digest/signature scheme 706275970Scy<br><dt><code>initsequence</code><dd>initial key ID 707275970Scy<br><dt><code>initkey</code><dd>initial key index 708275970Scy<br><dt><code>timestamp</code><dd>Autokey signature timestamp 709275970Scy</dl> 710275970Scy 711275970Scy<h5 class="subsubsection">Clock Variables</h5> 712275970Scy 713275970Scy<p>The following clock variables appear in the 714275970Scy<code>cv</code> 715275970Scybillboard for each association with a reference clock. 716275970ScyNot all variables are displayed in some configurations. 717275970Scy <dl> 718275970Scy<dt>Variable<dd>Description 719275970Scy<br><dt><code>associd</code><dd>association ID 720275970Scy<br><dt><code>status</code><dd>.Lk decode.html#clock "clock status word" 721275970Scy<br><dt><code>device</code><dd>device description 722275970Scy<br><dt><code>timecode</code><dd>ASCII time code string (specific to device) 723275970Scy<br><dt><code>poll</code><dd>poll messages sent 724275970Scy<br><dt><code>noreply</code><dd>no reply 725275970Scy<br><dt><code>badformat</code><dd>bad format 726275970Scy<br><dt><code>baddata</code><dd>bad date or time 727275970Scy<br><dt><code>fudgetime1</code><dd>fudge time 1 728275970Scy<br><dt><code>fudgetime2</code><dd>fudge time 2 729275970Scy<br><dt><code>stratum</code><dd>driver stratum 730275970Scy<br><dt><code>refid</code><dd>driver reference ID 731275970Scy<br><dt><code>flags</code><dd>driver flags 732275970Scy</dl> 733275970Scy 734275970Scy <p>This section was generated by <strong>AutoGen</strong>, 735275970Scyusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpq</code> program. 736275970ScyThis software is released under the NTP license, <http://ntp.org/license>. 737275970Scy 738275970Scy<ul class="menu"> 739275970Scy<li><a accesskey="1" href="#ntpq-usage">ntpq usage</a>: ntpq help/usage (<span class="option">--help</span>) 740275970Scy<li><a accesskey="2" href="#ntpq-ipv4">ntpq ipv4</a>: ipv4 option (-4) 741275970Scy<li><a accesskey="3" href="#ntpq-ipv6">ntpq ipv6</a>: ipv6 option (-6) 742275970Scy<li><a accesskey="4" href="#ntpq-command">ntpq command</a>: command option (-c) 743275970Scy<li><a accesskey="5" href="#ntpq-interactive">ntpq interactive</a>: interactive option (-i) 744275970Scy<li><a accesskey="6" href="#ntpq-numeric">ntpq numeric</a>: numeric option (-n) 745275970Scy<li><a accesskey="7" href="#ntpq-old_002drv">ntpq old-rv</a>: old-rv option 746275970Scy<li><a accesskey="8" href="#ntpq-peers">ntpq peers</a>: peers option (-p) 747298695Sdelphij<li><a accesskey="9" href="#ntpq-refid">ntpq refid</a>: refid option (-r) 748298695Sdelphij<li><a href="#ntpq-wide">ntpq wide</a>: wide option (-w) 749275970Scy<li><a href="#ntpq-config">ntpq config</a>: presetting/configuring ntpq 750275970Scy<li><a href="#ntpq-exit-status">ntpq exit status</a>: exit status 751275970Scy</ul> 752275970Scy 753275970Scy<div class="node"> 754275970Scy<p><hr> 755275970Scy<a name="ntpq-usage"></a>Next: <a rel="next" accesskey="n" href="#ntpq-ipv4">ntpq ipv4</a>, 756275970ScyUp: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> 757275970Scy<br> 758275970Scy</div> 759275970Scy 760275970Scy<h4 class="subsection">ntpq help/usage (<span class="option">--help</span>)</h4> 761275970Scy 762275970Scy<p><a name="index-ntpq-help-3"></a> 763275970ScyThis is the automatically generated usage text for ntpq. 764275970Scy 765275970Scy <p>The text printed is the same whether selected with the <code>help</code> option 766275970Scy(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print 767275970Scythe usage text by passing it through a pager program. 768275970Scy<code>more-help</code> is disabled on platforms without a working 769275970Scy<code>fork(2)</code> function. The <code>PAGER</code> environment variable is 770275970Scyused to select the program, defaulting to <span class="file">more</span>. Both will exit 771275970Scywith a status code of 0. 772275970Scy 773298695Sdelphij<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p6 774275970ScyUsage: ntpq [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...] 775275970Scy Flg Arg Option-Name Description 776275970Scy -4 no ipv4 Force IPv4 DNS name resolution 777275970Scy - prohibits the option 'ipv6' 778275970Scy -6 no ipv6 Force IPv6 DNS name resolution 779275970Scy - prohibits the option 'ipv4' 780275970Scy -c Str command run a command and exit 781275970Scy - may appear multiple times 782275970Scy -d no debug-level Increase debug verbosity level 783275970Scy - may appear multiple times 784275970Scy -D Num set-debug-level Set the debug verbosity level 785275970Scy - may appear multiple times 786275970Scy -i no interactive Force ntpq to operate in interactive mode 787275970Scy - prohibits these options: 788275970Scy command 789275970Scy peers 790275970Scy -n no numeric numeric host addresses 791275970Scy no old-rv Always output status line with readvar 792275970Scy -p no peers Print a list of the peers 793275970Scy - prohibits the option 'interactive' 794298695Sdelphij -r KWd refid Set default display type for S2+ refids 795275970Scy -w no wide Display the full 'remote' value 796275970Scy opt version output version information and exit 797275970Scy -? no help display extended usage information and exit 798275970Scy -! no more-help extended usage information passed thru pager 799275970Scy -> opt save-opts save the option state to a config file 800275970Scy -< Str load-opts load options from a config file 801275970Scy - disabled as '--no-load-opts' 802275970Scy - may appear multiple times 803275970Scy 804275970ScyOptions are specified by doubled hyphens and their name or by a single 805275970Scyhyphen and the flag character. 806275970Scy 807275970ScyThe following option preset mechanisms are supported: 808275970Scy - reading file $HOME/.ntprc 809275970Scy - reading file ./.ntprc 810275970Scy - examining environment variables named NTPQ_* 811275970Scy 812298695SdelphijThe valid "refid" option keywords are: 813298695Sdelphij hash ipv4 814298695Sdelphij or an integer from 0 through 1 815298695Sdelphij 816275970ScyPlease send bug reports to: <http://bugs.ntp.org, bugs@ntp.org> 817275970Scy</pre> 818275970Scy <div class="node"> 819275970Scy<p><hr> 820275970Scy<a name="ntpq-ipv4"></a>Next: <a rel="next" accesskey="n" href="#ntpq-ipv6">ntpq ipv6</a>, 821275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntpq-usage">ntpq usage</a>, 822275970ScyUp: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> 823275970Scy<br> 824275970Scy</div> 825275970Scy 826275970Scy<h4 class="subsection">ipv4 option (-4)</h4> 827275970Scy 828275970Scy<p><a name="index-ntpq_002dipv4-4"></a> 829275970ScyThis is the “force ipv4 dns name resolution” option. 830275970Scy 831275970Scy<p class="noindent">This option has some usage constraints. It: 832275970Scy <ul> 833275970Scy<li>must not appear in combination with any of the following options: 834275970Scyipv6. 835275970Scy</ul> 836275970Scy 837275970Scy <p>Force DNS resolution of following host names on the command line 838275970Scyto the IPv4 namespace. 839275970Scy<div class="node"> 840275970Scy<p><hr> 841275970Scy<a name="ntpq-ipv6"></a>Next: <a rel="next" accesskey="n" href="#ntpq-command">ntpq command</a>, 842275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntpq-ipv4">ntpq ipv4</a>, 843275970ScyUp: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> 844275970Scy<br> 845275970Scy</div> 846275970Scy 847275970Scy<h4 class="subsection">ipv6 option (-6)</h4> 848275970Scy 849275970Scy<p><a name="index-ntpq_002dipv6-5"></a> 850275970ScyThis is the “force ipv6 dns name resolution” option. 851275970Scy 852275970Scy<p class="noindent">This option has some usage constraints. It: 853275970Scy <ul> 854275970Scy<li>must not appear in combination with any of the following options: 855275970Scyipv4. 856275970Scy</ul> 857275970Scy 858275970Scy <p>Force DNS resolution of following host names on the command line 859275970Scyto the IPv6 namespace. 860275970Scy<div class="node"> 861275970Scy<p><hr> 862275970Scy<a name="ntpq-command"></a>Next: <a rel="next" accesskey="n" href="#ntpq-interactive">ntpq interactive</a>, 863275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntpq-ipv6">ntpq ipv6</a>, 864275970ScyUp: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> 865275970Scy<br> 866275970Scy</div> 867275970Scy 868275970Scy<h4 class="subsection">command option (-c)</h4> 869275970Scy 870275970Scy<p><a name="index-ntpq_002dcommand-6"></a> 871275970ScyThis is the “run a command and exit” option. 872275970ScyThis option takes a string argument <span class="file">cmd</span>. 873275970Scy 874275970Scy<p class="noindent">This option has some usage constraints. It: 875275970Scy <ul> 876275970Scy<li>may appear an unlimited number of times. 877275970Scy</ul> 878275970Scy 879275970Scy <p>The following argument is interpreted as an interactive format command 880275970Scyand is added to the list of commands to be executed on the specified 881275970Scyhost(s). 882275970Scy<div class="node"> 883275970Scy<p><hr> 884275970Scy<a name="ntpq-interactive"></a>Next: <a rel="next" accesskey="n" href="#ntpq-numeric">ntpq numeric</a>, 885275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntpq-command">ntpq command</a>, 886275970ScyUp: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> 887275970Scy<br> 888275970Scy</div> 889275970Scy 890275970Scy<h4 class="subsection">interactive option (-i)</h4> 891275970Scy 892275970Scy<p><a name="index-ntpq_002dinteractive-7"></a> 893275970ScyThis is the “force ntpq to operate in interactive mode” option. 894275970Scy 895275970Scy<p class="noindent">This option has some usage constraints. It: 896275970Scy <ul> 897275970Scy<li>must not appear in combination with any of the following options: 898275970Scycommand, peers. 899275970Scy</ul> 900275970Scy 901275970Scy <p>Force <code>ntpq</code> to operate in interactive mode. 902275970ScyPrompts will be written to the standard output and 903275970Scycommands read from the standard input. 904275970Scy<div class="node"> 905275970Scy<p><hr> 906275970Scy<a name="ntpq-numeric"></a>Next: <a rel="next" accesskey="n" href="#ntpq-old_002drv">ntpq old-rv</a>, 907275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntpq-interactive">ntpq interactive</a>, 908275970ScyUp: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> 909275970Scy<br> 910275970Scy</div> 911275970Scy 912275970Scy<h4 class="subsection">numeric option (-n)</h4> 913275970Scy 914275970Scy<p><a name="index-ntpq_002dnumeric-8"></a> 915275970ScyThis is the “numeric host addresses” option. 916275970ScyOutput all host addresses in dotted-quad numeric format rather than 917275970Scyconverting to the canonical host names. 918275970Scy<div class="node"> 919275970Scy<p><hr> 920275970Scy<a name="ntpq-old_002drv"></a>Next: <a rel="next" accesskey="n" href="#ntpq-peers">ntpq peers</a>, 921275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntpq-numeric">ntpq numeric</a>, 922275970ScyUp: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> 923275970Scy<br> 924275970Scy</div> 925275970Scy 926275970Scy<h4 class="subsection">old-rv option</h4> 927275970Scy 928275970Scy<p><a name="index-ntpq_002dold_002drv-9"></a> 929275970ScyThis is the “always output status line with readvar” option. 930275970ScyBy default, <code>ntpq</code> now suppresses the <code>associd=...</code> 931275970Scyline that precedes the output of <code>readvar</code> 932275970Scy(alias <code>rv</code>) when a single variable is requested, such as 933275970Scy<code>ntpq -c "rv 0 offset"</code>. 934275970ScyThis option causes <code>ntpq</code> to include both lines of output 935275970Scyfor a single-variable <code>readvar</code>. 936275970ScyUsing an environment variable to 937275970Scypreset this option in a script will enable both older and 938275970Scynewer <code>ntpq</code> to behave identically in this regard. 939275970Scy<div class="node"> 940275970Scy<p><hr> 941298695Sdelphij<a name="ntpq-peers"></a>Next: <a rel="next" accesskey="n" href="#ntpq-refid">ntpq refid</a>, 942275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntpq-old_002drv">ntpq old-rv</a>, 943275970ScyUp: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> 944275970Scy<br> 945275970Scy</div> 946275970Scy 947275970Scy<h4 class="subsection">peers option (-p)</h4> 948275970Scy 949275970Scy<p><a name="index-ntpq_002dpeers-10"></a> 950275970ScyThis is the “print a list of the peers” option. 951275970Scy 952275970Scy<p class="noindent">This option has some usage constraints. It: 953275970Scy <ul> 954275970Scy<li>must not appear in combination with any of the following options: 955275970Scyinteractive. 956275970Scy</ul> 957275970Scy 958275970Scy <p>Print a list of the peers known to the server as well as a summary 959275970Scyof their state. This is equivalent to the 'peers' interactive command. 960275970Scy<div class="node"> 961275970Scy<p><hr> 962298695Sdelphij<a name="ntpq-refid"></a>Next: <a rel="next" accesskey="n" href="#ntpq-wide">ntpq wide</a>, 963275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntpq-peers">ntpq peers</a>, 964275970ScyUp: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> 965275970Scy<br> 966275970Scy</div> 967275970Scy 968298695Sdelphij<h4 class="subsection">refid option (-r)</h4> 969298695Sdelphij 970298695Sdelphij<p><a name="index-ntpq_002drefid-11"></a> 971298695SdelphijThis is the “set default display type for s2+ refids” option. 972298695SdelphijThis option takes a keyword argument. 973298695Sdelphij 974298695Sdelphij<p class="noindent">This option has some usage constraints. It: 975298695Sdelphij <ul> 976298695Sdelphij<li>This option takes a keyword as its argument. 977298695SdelphijThe argument sets an enumeration value that can be tested by comparing the option value macro (OPT_VALUE_REFID). 978298695SdelphijThe available keywords are: 979298695Sdelphij <pre class="example"> hash ipv4 980298695Sdelphij </pre> 981298695Sdelphij <p>or their numeric equivalent.</ul> 982298695Sdelphij 983298695Sdelphij <p>Set the default display format for S2+ refids. 984298695Sdelphij<div class="node"> 985298695Sdelphij<p><hr> 986298695Sdelphij<a name="ntpq-wide"></a>Next: <a rel="next" accesskey="n" href="#ntpq-config">ntpq config</a>, 987298695SdelphijPrevious: <a rel="previous" accesskey="p" href="#ntpq-refid">ntpq refid</a>, 988298695SdelphijUp: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> 989298695Sdelphij<br> 990298695Sdelphij</div> 991298695Sdelphij 992275970Scy<h4 class="subsection">wide option (-w)</h4> 993275970Scy 994298695Sdelphij<p><a name="index-ntpq_002dwide-12"></a> 995275970ScyThis is the “display the full 'remote' value” option. 996275970ScyDisplay the full value of the 'remote' value. If this requires 997275970Scymore than 15 characters, display the full value, emit a newline, 998275970Scyand continue the data display properly indented on the next line. 999275970Scy 1000275970Scy<div class="node"> 1001275970Scy<p><hr> 1002275970Scy<a name="ntpq-config"></a>Next: <a rel="next" accesskey="n" href="#ntpq-exit-status">ntpq exit status</a>, 1003275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntpq-wide">ntpq wide</a>, 1004275970ScyUp: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> 1005275970Scy<br> 1006275970Scy</div> 1007275970Scy 1008275970Scy<h4 class="subsection">presetting/configuring ntpq</h4> 1009275970Scy 1010275970Scy<p>Any option that is not marked as <i>not presettable</i> may be preset by 1011275970Scyloading 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 1012275970Scythe options listed above in upper case and segmented with underscores. 1013275970ScyThe <code>NTPQ</code> variable will be tokenized and parsed like 1014275970Scythe command line. The remaining variables are tested for existence and their 1015275970Scyvalues are treated like option arguments. 1016275970Scy 1017275970Scy<p class="noindent"><code>libopts</code> will search in 2 places for configuration files: 1018275970Scy <ul> 1019275970Scy<li>$HOME 1020275970Scy<li>$PWD 1021275970Scy</ul> 1022275970Scy The environment variables <code>HOME</code>, and <code>PWD</code> 1023275970Scyare expanded and replaced when <span class="file">ntpq</span> runs. 1024275970ScyFor any of these that are plain files, they are simply processed. 1025275970ScyFor any that are directories, then a file named <span class="file">.ntprc</span> is searched for 1026275970Scywithin that directory and processed. 1027275970Scy 1028275970Scy <p>Configuration files may be in a wide variety of formats. 1029275970ScyThe basic format is an option name followed by a value (argument) on the 1030275970Scysame line. Values may be separated from the option name with a colon, 1031275970Scyequal sign or simply white space. Values may be continued across multiple 1032275970Scylines by escaping the newline with a backslash. 1033275970Scy 1034275970Scy <p>Multiple programs may also share the same initialization file. 1035275970ScyCommon options are collected at the top, followed by program specific 1036275970Scysegments. The segments are separated by lines like: 1037275970Scy<pre class="example"> [NTPQ] 1038275970Scy</pre> 1039275970Scy <p class="noindent">or by 1040275970Scy<pre class="example"> <?program ntpq> 1041275970Scy</pre> 1042275970Scy <p class="noindent">Do not mix these styles within one configuration file. 1043275970Scy 1044275970Scy <p>Compound values and carefully constructed string values may also be 1045275970Scyspecified using XML syntax: 1046275970Scy<pre class="example"> <option-name> 1047275970Scy <sub-opt>...&lt;...&gt;...</sub-opt> 1048275970Scy </option-name> 1049275970Scy</pre> 1050275970Scy <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of 1051275970Scy<pre class="example"> "...<...>..." 1052275970Scy</pre> 1053275970Scy <p><code>AutoOpts</code> does not track suboptions. You simply note that it is a 1054275970Scyhierarchicly valued option. <code>AutoOpts</code> does provide a means for searching 1055275970Scythe associated name/value pair list (see: optionFindValue). 1056275970Scy 1057275970Scy <p>The command line options relating to configuration and/or usage help are: 1058275970Scy 1059275970Scy<h5 class="subsubheading">version (-)</h5> 1060275970Scy 1061275970Scy<p>Print the program version to standard out, optionally with licensing 1062275970Scyinformation, then exit 0. The optional argument specifies how much licensing 1063275970Scydetail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument. 1064275970ScyOnly the first letter of the argument is examined: 1065275970Scy 1066275970Scy <dl> 1067275970Scy<dt><span class="samp">version</span><dd>Only print the version. This is the default. 1068275970Scy<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms. 1069275970Scy<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms. 1070275970Scy</dl> 1071275970Scy 1072275970Scy<div class="node"> 1073275970Scy<p><hr> 1074275970Scy<a name="ntpq-exit-status"></a>Previous: <a rel="previous" accesskey="p" href="#ntpq-config">ntpq config</a>, 1075275970ScyUp: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a> 1076275970Scy<br> 1077275970Scy</div> 1078275970Scy 1079275970Scy<h4 class="subsection">ntpq exit status</h4> 1080275970Scy 1081275970Scy<p>One of the following exit values will be returned: 1082275970Scy <dl> 1083275970Scy<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution. 1084275970Scy<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid. 1085275970Scy<br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded. 1086275970Scy<br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report 1087275970Scyit to autogen-users@lists.sourceforge.net. Thank you. 1088275970Scy</dl> 1089275970Scy 1090275970Scy<div class="node"> 1091275970Scy<p><hr> 1092275970Scy<a name="Usage"></a>Next: <a rel="next" accesskey="n" href="#Internal-Commands">Internal Commands</a>, 1093275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntpq-Description">ntpq Description</a>, 1094275970ScyUp: <a rel="up" accesskey="u" href="#Top">Top</a> 1095275970Scy<br> 1096275970Scy</div> 1097275970Scy 1098275970Scy<!-- node-name, next, previous, up --> 1099275970Scy<h3 class="section">Usage</h3> 1100275970Scy 1101275970Scy<p><table summary=""><tr align="left"><th valign="top" width="23%">What </th><th valign="top" width="23%">Default </th><th valign="top" width="5%">Flag </th><th valign="top" width="15%">Option 1102275970Scy<br></th></tr><tr align="left"><td valign="top" width="23%">configuration file 1103275970Scy</td><td valign="top" width="23%"><code>/etc/ntp.conf</code> 1104275970Scy</td><td valign="top" width="5%"><code>-c</code> 1105275970Scy</td><td valign="top" width="15%"><code>conffile</code> 1106275970Scy<br></td></tr><tr align="left"><td valign="top" width="23%">frequency file 1107275970Scy</td><td valign="top" width="23%">none 1108275970Scy</td><td valign="top" width="5%"><code>-f</code> 1109275970Scy</td><td valign="top" width="15%"><code>driftfile</code> 1110275970Scy<br></td></tr><tr align="left"><td valign="top" width="23%">leapseconds file 1111275970Scy</td><td valign="top" width="23%">none 1112275970Scy</td><td valign="top" width="5%"> 1113275970Scy</td><td valign="top" width="15%"><code>leapfile</code> 1114275970Scy<br></td></tr><tr align="left"><td valign="top" width="23%">process ID file 1115275970Scy</td><td valign="top" width="23%">none 1116275970Scy</td><td valign="top" width="5%"><code>-p</code> 1117275970Scy</td><td valign="top" width="15%"><code>pidfile</code> 1118275970Scy<br></td></tr><tr align="left"><td valign="top" width="23%">log file 1119275970Scy</td><td valign="top" width="23%">system log 1120275970Scy</td><td valign="top" width="5%"><code>-l</code> 1121275970Scy</td><td valign="top" width="15%"><code>logfile</code> 1122275970Scy<br></td></tr><tr align="left"><td valign="top" width="23%">include file 1123275970Scy</td><td valign="top" width="23%">none 1124275970Scy</td><td valign="top" width="5%">none 1125275970Scy</td><td valign="top" width="15%"><code>includefile</code> 1126275970Scy<br></td></tr><tr align="left"><td valign="top" width="23%">statistics path 1127275970Scy</td><td valign="top" width="23%"><code>/var/NTP</code> 1128275970Scy</td><td valign="top" width="5%"><code>-s</code> 1129275970Scy</td><td valign="top" width="15%"><code>statsdir</code> 1130275970Scy<br></td></tr><tr align="left"><td valign="top" width="23%">keys path 1131275970Scy</td><td valign="top" width="23%"><code>/usr/local/etc</code> 1132275970Scy</td><td valign="top" width="5%"><code>-k</code> 1133275970Scy</td><td valign="top" width="15%"><code>keysdir</code> 1134275970Scy<br></td></tr></table> 1135275970Scy 1136275970Scy<div class="node"> 1137275970Scy<p><hr> 1138275970Scy<a name="Internal-Commands"></a>Next: <a rel="next" accesskey="n" href="#Control-Message-Commands">Control Message Commands</a>, 1139275970ScyPrevious: <a rel="previous" accesskey="p" href="#Usage">Usage</a>, 1140275970ScyUp: <a rel="up" accesskey="u" href="#Top">Top</a> 1141275970Scy<br> 1142275970Scy</div> 1143275970Scy 1144275970Scy<!-- node-name, next, previous, up --> 1145275970Scy<h3 class="section">Internal Commands</h3> 1146275970Scy 1147275970Scy<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. 1148275970Scy 1149275970Scy <dl> 1150275970Scy<dt><code><a name="help"></a> ? [</code><kbd>command_keyword</kbd><code>]</code><dt><code>help [</code><kbd>command_keyword</kbd><code>]</code><dd>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. 1151275970Scy 1152275970Scy <br><dt><code><a name="addvars"></a> >addvars </code><kbd>name</kbd><code> [ = </code><kbd>value</kbd><code>] [...]</code><dt><code>rmvars </code><kbd>name</kbd><code> [...]</code><dt><code>clearvars</dt></code><dd>The arguments to these commands consist of a list of items of the form 1153275970Scy<kbd>name</kbd><code> = </code><kbd>value</kbd>, where the <code>= </code><kbd>value</kbd> is ignored, 1154275970Scyand can be omitted in read requests. 1155275970Scy<code>ntpq</code> maintains an internal list in which data to be included 1156275970Scyin control messages can be assembled, and sent using the <code>readlist</code> 1157275970Scyand <code>writelist</code> commands described below. 1158275970ScyThe <code>addvars</code> command allows variables and optional values 1159275970Scyto be added to the list. 1160275970ScyIf more than one variable is to be added 1161275970Scythe list should be comma-separated and not contain white space. 1162275970ScyThe <code>rmvars</code> command can be used to remove individual variables 1163275970Scyfrom the list, 1164275970Scywhile the <code>clearlist</code> command removes all variables from the list. 1165275970Scy 1166275970Scy <br><dt><code><a name="cooked"></a> cooked</code><dd>Display server messages in prettyprint format. 1167275970Scy 1168275970Scy <br><dt><code><a name="debug"></a> debug more | less | off</code><dd>Turns internal query program debugging on and off. 1169275970Scy 1170275970Scy <br><dt><code><a name="delay"></a> delay </code><kbd>milliseconds</kbd><dd>Specify a time interval to be added to timestamps included in requests which require authentication. This is used to enable (unreliable) server reconfiguration over long delay network paths or between machines whose clocks are unsynchronized. Actually the server does not now require timestamps in authenticated requests, so this command may be obsolete. 1171275970Scy 1172275970Scy <br><dt><code><a name="host"></a> host </code><kbd>name</kbd><dd>Set the host to which future queries will be sent. 1173275970ScyThe name may be either a DNS name or a numeric address. 1174275970Scy 1175275970Scy <br><dt><code><a name="hostnames"></a> hostnames [yes | no]</code><dd>If <code>yes</code> is specified, host names are printed in information displays. 1176275970ScyIf <code>no</code> is specified, numeric addresses are printed instead. 1177275970ScyThe default is <code>yes</code>, 1178275970Scyunless modified using the command line <code>-n</code> switch. 1179275970Scy 1180275970Scy <br><dt><code><a name="keyid"></a> keyid </code><kbd>keyid</kbd><dd>This command specifies the key number to be used 1181275970Scyto authenticate configuration requests. 1182275970ScyThis must correspond to a key ID configured in <code>ntp.conf</code> for this purpose. 1183275970Scy 1184275970Scy <br><dt><code><a name="keytype"></a> keytype</code><dd>Specify the digest algorithm to use for authenticated requests, 1185275970Scywith default <code>MD5</code>. 1186275970ScyIf the OpenSSL library is installed, 1187275970Scydigest can be be any message digest algorithm supported by the library. 1188275970ScyThe current selections are: <code>MD2</code>, <code>MD4</code>, <code>MD5</code>, <code>MDC2</code>, <code>RIPEMD160</code>, <code>SHA</code> and <code>SHA1</code>. 1189275970Scy 1190275970Scy <br><dt><code><a name="ntpversion"></a> ntpversion 1 | 2 | 3 | 4</code><dd>Sets the NTP version number which <code>ntpq</code> claims in packets. 1191275970ScyDefaults to 2. 1192275970ScyNote that mode-6 control messages (and modes, for that matter) 1193275970Scydidn't exist in NTP version 1. 1194275970Scy 1195275970Scy <br><dt><code><a name="passwd"></a> passwd</code><dd>This command prompts for a password to authenticate requests. 1196275970ScyThe password must correspond to the key ID configured in <code>ntp.conf</code> for this purpose. 1197275970Scy 1198275970Scy <br><dt><code><a name="quit"></a> quit</code><dd>Exit <code>ntpq</code>. 1199275970Scy 1200275970Scy <br><dt><code><a name="raw"></a> raw</code><dd>Display server messages as received and without reformatting. 1201275970Scy 1202275970Scy <br><dt><code><a name="timeout"></a> timeout </code><kbd>millseconds</kbd><dd>Specify a timeout period for responses to server queries. 1203275970ScyThe default is about 5000 milliseconds. 1204275970ScyNote that since <code>ntpq</code> retries each query once after a timeout 1205275970Scythe total waiting time for a timeout will be twice the timeout value set. 1206275970Scy 1207275970Scy </dl> 1208275970Scy 1209275970Scy<div class="node"> 1210275970Scy<p><hr> 1211275970Scy<a name="Control-Message-Commands"></a>Next: <a rel="next" accesskey="n" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>, 1212275970ScyPrevious: <a rel="previous" accesskey="p" href="#Internal-Commands">Internal Commands</a>, 1213275970ScyUp: <a rel="up" accesskey="u" href="#Top">Top</a> 1214275970Scy<br> 1215275970Scy</div> 1216275970Scy 1217275970Scy<!-- node-name, next, previous, up --> 1218275970Scy<h3 class="section">Control Message Commands</h3> 1219275970Scy 1220275970Scy<p>Association IDs are used to identify system, peer and clock variables. 1221275970ScySystem variables are assigned an association ID of zero and system name space, 1222275970Scywhile each association is assigned a nonzero association ID and peer namespace. 1223275970ScyMost control commands send a single mode-6 message to the server 1224275970Scyand expect a single response message. 1225275970ScyThe exceptions are the <code>peers</code> command, 1226275970Scywhich sends a series of messages, 1227275970Scyand the <code>mreadlist</code> and <code>mreadvar</code> commands, 1228275970Scywhich iterate over a range of associations. 1229275970Scy 1230275970Scy <p><a name="as"></a> 1231275970Scy <dl> 1232275970Scy<dt><code>associations</code><dd>Display a list of mobilized associations in the form: 1233275970Scy<br> 1234275970Scy<code>ind assid status conf reach auth condition last_event cnt</code> 1235275970Scy 1236275970Scy <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="40%">Description 1237275970Scy 1238275970Scy <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>ind</code> 1239275970Scy</td><td valign="top" width="40%">index on this list 1240275970Scy 1241275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>assid</code> 1242275970Scy</td><td valign="top" width="40%">association ID 1243275970Scy 1244275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code> 1245275970Scy</td><td valign="top" width="40%"><a href="decode.html#peer">peer status word</a> 1246275970Scy 1247275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>conf</code> 1248275970Scy</td><td valign="top" width="40%"><code>yes</code>: persistent, <code>no</code>: ephemeral 1249275970Scy 1250275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code> 1251275970Scy</td><td valign="top" width="40%"><code>yes</code>: reachable, <code>no</code>: unreachable 1252275970Scy 1253275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>auth</code> 1254275970Scy</td><td valign="top" width="40%"><code>ok</code>, <code>yes</code>, <code>bad</code> and <code>none</code> 1255275970Scy 1256275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>condition</code> 1257275970Scy</td><td valign="top" width="40%">selection status (see the <code>select</code> field of the <a href="decode.html#peer">peer status word</a>) 1258275970Scy 1259275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>last_event</code> 1260275970Scy</td><td valign="top" width="40%">event report (see the <code>event</code> field of the <a href="decode.html#peer">peer status word</a>) 1261275970Scy 1262275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>cnt</code> 1263275970Scyevent count (see the <code>count</code> field of the <a href="decode.html#peer">peer status word</a>) 1264275970Scy 1265275970Scy <br></td></tr></table> 1266275970Scy 1267275970Scy <br><dt><code><a name="cv"></a> clockvar </code><kbd>assocID</kbd><code> [</code><kbd>name</kbd><code> [ = </code><kbd>value</kbd><code> [...]] [...]]</code><dt><code>cv </code><kbd>assocID</kbd><code> [</code><kbd>name</kbd><code> [ = </code><kbd>value</kbd><code> [...] ][...]]</code><dd>Display a list of <a href="#clock">clock variables</a> for those associations supporting a reference clock. 1268275970Scy 1269275970Scy <br><dt><code><a name="_003aconfig"></a> :config [...]</code><dd>Send the remainder of the command line, including whitespace, to the server 1270275970Scyas a run-time configuration command in the same format 1271275970Scyas the configuration file. 1272275970ScyThis command is experimental until further notice and clarification. 1273275970ScyAuthentication is of course required. 1274275970Scy 1275275970Scy <br><dt><code><a name="config_002dfrom_002dfile"></a> config-from-file </code><kbd>filename</kbd><dd>Send the each line of <kbd>filename</kbd> to the server as 1276275970Scyrun-time configuration commands in the same format as the configuration file. 1277275970ScyThis command is experimental until further notice and clarification. 1278275970ScyAuthentication is required. 1279275970Scy 1280275970Scy <br><dt><code><a name="ifstats"></a> ifstats</code><dd>Display statistics for each local network address. 1281275970ScyAuthentication is required. 1282275970Scy 1283275970Scy <br><dt><code><a name="iostats"></a> iostats</code><dd>Display network and reference clock I/O statistics. 1284275970Scy 1285275970Scy <br><dt><code><a name="kerninfo"></a> kerninfo</code><dd>Display kernel loop and PPS statistics. 1286275970ScyAs with other ntpq output, times are in milliseconds. 1287275970ScyThe precision value displayed is in milliseconds as well, 1288275970Scyunlike the precision system variable. 1289275970Scy 1290275970Scy <br><dt><code><a name="lassoc"></a> lassociations</code><dd>Perform the same function as the associations command, 1291275970Scyexcept display mobilized and unmobilized associations. 1292275970Scy 1293275970Scy <br><dt><code><a name="monstats"></a> monstats</code><dd>Display monitor facility statistics. 1294275970Scy 1295275970Scy <br><dt><code><a name="mrulist"></a> mrulist [limited | kod | mincount=</code><kbd>count</kbd><code> | laddr=</code><kbd>localaddr</kbd><code> | sort=</code><kbd>sortorder</kbd><code> | resany=</code><kbd>hexmask</kbd><code> | resall=</code><kbd>hexmask</kbd><code>]</code><dd>Obtain and print traffic counts collected and maintained by 1296275970Scythe monitor facility. 1297275970ScyWith the exception of <code>sort=</code><kbd>sortorder</kbd>, 1298275970Scythe options filter the list returned by <code>ntpd</code>. 1299275970ScyThe <code>limited</code> and <code>kod</code> options return only entries 1300275970Scyrepresenting client addresses from which the last packet received 1301275970Scytriggered either discarding or a KoD response. 1302275970ScyThe <code>mincount=</code><kbd>count</kbd> option filters entries representing 1303275970Scyless than <kbd>count</kbd> packets. 1304275970ScyThe <code>laddr=</code><kbd>localaddr</kbd> option filters entries for packets 1305275970Scyreceived on any local address other than <kbd>localaddr</kbd>. 1306275970Scy<code>resany=</code><kbd>hexmask</kbd> and <code>resall=</code><kbd>hexmask</kbd> 1307275970Scyfilter entries containing none or less than all, respectively, 1308275970Scyof the bits in <kbd>hexmask</kbd>, which must begin with <code>0x</code>. 1309275970Scy<br> 1310275970ScyThe <kbd>sortorder</kbd> defaults to <code>lstint</code> and may be any of 1311275970Scy<code>addr</code>, <code>count</code>, <code>avgint</code>, <code>lstint</code>, or 1312275970Scyany of those preceded by a minus sign (hyphen) to reverse the sort order. 1313275970ScyThe output columns are: 1314275970Scy 1315275970Scy <p><table summary=""><tr align="left"><th valign="top" width="10%">Column </th><th valign="top" width="40%">Description 1316275970Scy 1317275970Scy <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>lstint</code> 1318275970Scy</td><td valign="top" width="40%"> 1319275970ScyInterval in s between the receipt of the most recent packet from this 1320275970Scyaddress and the completion of the retrieval of the MRU list by <code>ntpq</code> 1321275970Scy 1322275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>avgint</code> 1323275970Scy</td><td valign="top" width="40%"> 1324275970ScyAverage interval in s between packets from this address. 1325275970Scy 1326275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rstr</code> 1327275970Scy</td><td valign="top" width="40%"> 1328275970ScyRestriction flags associated with this address. 1329275970ScyMost are copied unchanged from the matching <code>restrict</code> command, 1330275970Scyhowever 0x400 (kod) and 0x20 (limited) flags are cleared unless 1331275970Scythe last packet from this address triggered a rate control response. 1332275970Scy 1333275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>r</code> 1334275970Scy</td><td valign="top" width="40%"> 1335275970ScyRate control indicator, either a period, <code>L</code> or <code>K</code> for 1336275970Scyno rate control response, rate limiting by discarding, or 1337275970Scyrate limiting with a KoD response, respectively. 1338275970Scy 1339275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>m</code> 1340275970Scy</td><td valign="top" width="40%"> 1341275970ScyPacket mode. 1342275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>v</code> 1343275970Scy</td><td valign="top" width="40%"> 1344275970ScyPacket version number. 1345275970Scy 1346275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>count</code> 1347275970Scy</td><td valign="top" width="40%"> 1348275970ScyPackets received from this address. 1349275970Scy 1350275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rport</code> 1351275970Scy</td><td valign="top" width="40%"> 1352275970ScySource port of last packet from this address. 1353275970Scy 1354275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>remote address</code> 1355275970Scy</td><td valign="top" width="40%"> 1356275970ScyDNS name, numeric address, or address followed by claimed DNS name which 1357275970Scycould not be verified in parentheses. 1358275970Scy 1359275970Scy <br></td></tr></table> 1360275970Scy 1361275970Scy <br><dt><code><a name="mreadvar"></a> mreadvar </code><kbd>assocID</kbd> <kbd>assocID</kbd><code> [ </code><kbd>variable_name</kbd><code> [ = </code><kbd>value</kbd><code>[ ... ]</code><dt><code><a name="mrv"></a> mrv </code><kbd>assocID</kbd> <kbd>assocID</kbd><code> [ </code><kbd>variable_name</kbd><code> [ = </code><kbd>value</kbd><code>[ ... ]</code><dd>Perform the same function as the <code>readvar</code> command, 1362275970Scyexcept for a range of association IDs. 1363275970ScyThis range is determined from the association list cached by 1364275970Scythe most recent <code>associations</code> command. 1365275970Scy 1366275970Scy <br><dt><code><a name="passoc"></a> passociations</code><dd>Perform the same function as the <code>associations command</code>, except that 1367275970Scyit uses previously stored data rather than making a new query. 1368275970Scy 1369275970Scy <br><dt><code><a name="pe"></a> peers</code><dd>Display a list of peers in the form: 1370275970Scy<br> 1371275970Scy<code>[tally]remote refid st t when pool reach delay offset jitter</code> 1372275970Scy 1373275970Scy <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description 1374275970Scy<br></th></tr><tr align="left"><td valign="top" width="10%"><code>[tally]</code> 1375275970Scy</td><td valign="top" width="20%"> 1376275970Scysingle-character code indicating current value of the <code>select</code> field 1377275970Scyof the <a href="decode.html#peer">peer status word</a>. 1378275970Scy 1379275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>remote</code> 1380275970Scy</td><td valign="top" width="20%"> 1381275970Scyhost name (or IP number) of peer 1382275970Scy 1383275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code> 1384275970Scy</td><td valign="top" width="20%"> 1385275970Scyassociation ID or <a href="decode.html#kiss">kiss code</a>. 1386275970Scy 1387275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>st</code> 1388275970Scy</td><td valign="top" width="20%"> 1389275970Scystratum 1390275970Scy 1391275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>t</code> 1392275970Scy</td><td valign="top" width="20%"> 1393275970Scy<code>u</code>: unicast or manycast client, 1394275970Scy<code>b</code>: broadcast or multicast client, 1395275970Scy<code>l</code>: local (reference clock), 1396275970Scy<code>s</code>: symmetric (peer), 1397275970Scy<code>A</code>: manycast server, 1398275970Scy<code>B</code>: broadcast server, 1399275970Scy<code>M</code>: multicast server. 1400275970Scy 1401275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>when</code> 1402275970Scy</td><td valign="top" width="20%"> 1403275970Scysec/min/hr since last received packet 1404275970Scy 1405275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>poll</code> 1406275970Scy</td><td valign="top" width="20%"> 1407275970Scypoll interval (log(2) s) 1408275970Scy 1409275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code> 1410275970Scy</td><td valign="top" width="20%"> 1411275970Scyreach shift register (octal) 1412275970Scy 1413275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>delay</code> 1414275970Scy</td><td valign="top" width="20%"> 1415275970Scyroundtrip delay 1416275970Scy 1417275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code> 1418275970Scy</td><td valign="top" width="20%"> 1419275970Scyoffset of server relative to this host 1420275970Scy 1421275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>jitter</code> 1422275970Scy</td><td valign="top" width="20%"> 1423275970Scyjitter 1424275970Scy 1425275970Scy <br></td></tr></table> 1426275970Scy 1427275970Scy <br><dt><code><a name="rv"></a> readvar </code><kbd>assocID</kbd> <kbd>name</kbd><code> [ = </code><kbd>value</kbd><code> ] [,...]</code><dt><code>rv </code><kbd>assocID</kbd><code> [ </code><kbd>name</kbd><code> ] [,...]</code><dd>Display the specified variables. 1428275970ScyIf <kbd>assocID</kbd> is zero, 1429275970Scythe variables are from the <a href="#system">system variables</a> name space, 1430275970Scyotherwise they are from the <a href="#peer">peer variables</a> name space. 1431275970ScyThe <kbd>assocID</kbd> is required, as the same name can occur in both spaces. 1432275970ScyIf no <kbd>name</kbd> is included, 1433275970Scyall operative variables in the name space are displayed. 1434275970ScyIn this case only, if the <kbd>assocID</kbd> is omitted, it is assumed zero. 1435275970ScyMultiple names are specified with comma separators and without whitespace. 1436275970ScyNote that time values are represented in milliseconds and 1437275970Scyfrequency values in parts-per-million (PPM). 1438275970ScySome NTP timestamps are represented in the format YYYYMMDDTTTT, 1439275970Scywhere YYYY is the year, MM the month of year, DD the day of month and 1440275970ScyTTTT the time of day. 1441275970Scy 1442275970Scy <br><dt><code><a name="saveconfig"></a> saveconfig </code><kbd>filename</kbd><dd>Write the current configuration, including any runtime modifications 1443275970Scygiven with <code>:config</code> or <code>config-from-file</code>, 1444275970Scyto the ntpd host's file <kbd>filename</kbd>. 1445275970ScyThis command will be rejected by the server unless 1446275970Scy<a href="miscopt.html#saveconfigdir">saveconfigdir</a> 1447275970Scyappears in the <code>ntpd</code> configuration file. 1448275970Scy<kbd>filename</kbd> can use <code>strftime()</code> format specifiers 1449275970Scyto substitute the current date and time, for example, 1450275970Scy<code>saveconfig ntp-%Y%m%d-%H%M%S.conf</code>. 1451275970ScyThe filename used is stored in system variable <code>savedconfig</code>. 1452275970ScyAuthentication is required. 1453275970Scy 1454275970Scy <br><dt><code><a name="writevar"></a> writevar </code><kbd>assocID</kbd> <kbd>name</kbd><code> = </code><kbd>value</kbd><code> [,...]</code><dd>Write the specified variables. 1455275970ScyIf the <kbd>assocID</kbd> is zero, the variables are from the 1456275970Scy<a href="#system">system variables</a> name space, otherwise they are from the 1457275970Scy<a href="#peer">peer variables</a> name space. 1458275970ScyThe <kbd>assocID</kbd> is required, 1459275970Scyas the same name can occur in both spaces. 1460275970Scy 1461275970Scy <br><dt><code><a name="sysinfo"></a> sysinfo</code><dd>Display operational summary. 1462275970Scy 1463275970Scy <br><dt><code><a name="sysstats"></a> sysstats</code><dd>Print statistics counters maintained in the protocol module. 1464275970Scy 1465275970Scy </dl> 1466275970Scy 1467275970Scy<div class="node"> 1468275970Scy<p><hr> 1469275970Scy<a name="Status-Words-and-Kiss-Codes"></a>Next: <a rel="next" accesskey="n" href="#System-Variables">System Variables</a>, 1470275970ScyPrevious: <a rel="previous" accesskey="p" href="#Control-Message-Commands">Control Message Commands</a>, 1471275970ScyUp: <a rel="up" accesskey="u" href="#Top">Top</a> 1472275970Scy<br> 1473275970Scy</div> 1474275970Scy 1475275970Scy<!-- node-name, next, previous, up --> 1476275970Scy<h3 class="section">Status Words and Kiss Codes</h3> 1477275970Scy 1478275970Scy<p>The current state of the operating program is shown 1479275970Scyin a set of status words maintained by the system 1480275970Scyand each association separately. 1481275970ScyThese words are displayed in the <code>rv</code> and <code>as</code> commands 1482275970Scyboth in hexadecimal and decoded short tip strings. 1483275970ScyThe codes, tips and short explanations are on the 1484275970Scy<a href="decode.html">Event Messages and Status Words</a> page. 1485275970ScyThe page also includes a list of system and peer messages, 1486275970Scythe code for the latest of which is included in the status word. 1487275970Scy 1488275970Scy <p>Information resulting from protocol machine state transitions 1489275970Scyis displayed using an informal set of ASCII strings called 1490275970Scy<a href="decode.html#kiss">kiss codes</a>. 1491275970ScyThe original purpose was for kiss-o'-death (KoD) packets sent 1492275970Scyby the server to advise the client of an unusual condition. 1493275970ScyThey are now displayed, when appropriate, 1494275970Scyin the reference identifier field in various billboards. 1495275970Scy 1496275970Scy<div class="node"> 1497275970Scy<p><hr> 1498275970Scy<a name="System-Variables"></a>Next: <a rel="next" accesskey="n" href="#Peer-Variables">Peer Variables</a>, 1499275970ScyPrevious: <a rel="previous" accesskey="p" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>, 1500275970ScyUp: <a rel="up" accesskey="u" href="#Top">Top</a> 1501275970Scy<br> 1502275970Scy</div> 1503275970Scy 1504275970Scy<!-- node-name, next, previous, up --> 1505275970Scy<h3 class="section">System Variables</h3> 1506275970Scy 1507275970Scy<p>The following system variables appear in the <code>rv</code> billboard. 1508275970ScyNot all variables are displayed in some configurations. 1509275970Scy 1510275970Scy <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description 1511275970Scy 1512275970Scy<p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>status</code> 1513275970Scy</td><td valign="top" width="20%"> 1514275970Scy<a href="decode.html#sys">system status word</a> 1515275970Scy 1516275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>version</code> 1517275970Scy</td><td valign="top" width="20%"> 1518275970ScyNTP software version and build time 1519275970Scy 1520275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>processor</code> 1521275970Scy</td><td valign="top" width="20%"> 1522275970Scyhardware platform and version 1523275970Scy 1524275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>system</code> 1525275970Scy</td><td valign="top" width="20%"> 1526275970Scyoperating system and version 1527275970Scy 1528275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leap</code> 1529275970Scy</td><td valign="top" width="20%"> 1530275970Scyleap warning indicator (0-3) 1531275970Scy 1532275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code> 1533275970Scy</td><td valign="top" width="20%"> 1534275970Scystratum (1-15) 1535275970Scy 1536275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>precision</code> 1537275970Scy</td><td valign="top" width="20%"> 1538275970Scyprecision (log(2) s) 1539275970Scy 1540275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdelay</code> 1541275970Scy</td><td valign="top" width="20%"> 1542275970Scytotal roundtrip delay to the primary reference clock 1543275970Scy 1544275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdisp</code> 1545275970Scy</td><td valign="top" width="20%"> 1546275970Scytotal dispersion to the primary reference clock 1547275970Scy 1548275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>peer</code> 1549275970Scy</td><td valign="top" width="20%"> 1550275970Scysystem peer association ID 1551275970Scy 1552275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>tc</code> 1553275970Scytime constant and poll exponent (log(2) s) (3-17) 1554275970Scy 1555275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>mintc</code> 1556275970Scyminimum time constant (log(2) s) (3-10) 1557275970Scy 1558275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clock</code> 1559275970Scy</td><td valign="top" width="20%"> 1560275970Scydate and time of day 1561275970Scy 1562275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code> 1563275970Scyreference ID or <a href="decode.html#kiss">kiss code</a> 1564275970Scy 1565275970Scy <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reftime</code> 1566275970Scy</td><td valign="top" width="20%"> 1567275970Scyreference time 1568275970Scy 1569275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code> 1570275970Scy</td><td valign="top" width="20%"> 1571275970Scycombined offset of server relative to this host 1572275970Scy 1573275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>sys_jitter</code> 1574275970Scy</td><td valign="top" width="20%"> 1575275970Scycombined system jitter 1576275970Scy 1577275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>frequency</code> 1578275970Scy</td><td valign="top" width="20%"> 1579275970Scyfrequency offset (PPM) relative to hardware clock 1580275970Scy 1581275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clk_wander</code> 1582275970Scy</td><td valign="top" width="20%"> 1583275970Scyclock frequency wander (PPM) 1584275970Scy 1585275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clk_jitter</code> 1586275970Scy</td><td valign="top" width="20%"> 1587275970Scyclock jitter 1588275970Scy 1589275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>tai</code> 1590275970Scy</td><td valign="top" width="20%"> 1591275970ScyTAI-UTC offset (s) 1592275970Scy 1593275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leapsec</code> 1594275970Scy</td><td valign="top" width="20%"> 1595275970ScyNTP seconds when the next leap second is/was inserted 1596275970Scy 1597275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>expire</code> 1598275970Scy</td><td valign="top" width="20%"> 1599275970ScyNTP seconds when the NIST leapseconds file expires 1600275970Scy 1601275970Scy <br></td></tr></table> 1602275970Scy 1603275970Scy <p>The jitter and wander statistics are exponentially-weighted RMS averages. 1604275970ScyThe system jitter is defined in the NTPv4 specification; 1605275970Scythe clock jitter statistic is computed by the clock discipline module. 1606275970Scy 1607275970Scy <p>When the NTPv4 daemon is compiled with the OpenSSL software library, 1608275970Scyadditional system variables are displayed, including some or all of the 1609275970Scyfollowing, depending on the particular Autokey dance: 1610275970Scy 1611275970Scy <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description 1612275970Scy 1613275970Scy<p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>host</code> 1614275970Scy</td><td valign="top" width="20%"> 1615275970ScyAutokey host name for this host 1616275970Scy 1617275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>ident</code> 1618275970Scy</td><td valign="top" width="20%"> 1619275970ScyAutokey group name for this host 1620275970Scy 1621275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code> 1622275970Scy</td><td valign="top" width="20%"> 1623275970Scyhost flags (see Autokey specification) 1624275970Scy 1625275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>digest</code> 1626275970Scy</td><td valign="top" width="20%"> 1627275970ScyOpenSSL message digest algorithm 1628275970Scy 1629275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>signature</code> 1630275970Scy</td><td valign="top" width="20%"> 1631275970ScyOpenSSL digest/signature scheme 1632275970Scy 1633275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>update</code> 1634275970Scy</td><td valign="top" width="20%"> 1635275970ScyNTP seconds at last signature update 1636275970Scy 1637275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>cert</code> 1638275970Scy</td><td valign="top" width="20%"> 1639275970Scycertificate subject, issuer and certificate flags 1640275970Scy 1641275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>until</code> 1642275970Scy</td><td valign="top" width="20%"> 1643275970ScyNTP seconds when the certificate expires 1644275970Scy 1645275970Scy <br></td></tr></table> 1646275970Scy 1647275970Scy<div class="node"> 1648275970Scy<p><hr> 1649275970Scy<a name="Peer-Variables"></a>Next: <a rel="next" accesskey="n" href="#Clock-Variables">Clock Variables</a>, 1650275970ScyPrevious: <a rel="previous" accesskey="p" href="#System-Variables">System Variables</a>, 1651275970ScyUp: <a rel="up" accesskey="u" href="#Top">Top</a> 1652275970Scy<br> 1653275970Scy</div> 1654275970Scy 1655275970Scy<!-- node-name, next, previous, up --> 1656275970Scy<h3 class="section">Peer Variables</h3> 1657275970Scy 1658275970Scy<p>The following peer variables appear in the <code>rv</code> billboard 1659275970Scyfor each association. 1660275970ScyNot all variables are displayed in some configurations. 1661275970Scy 1662275970Scy <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description 1663275970Scy 1664275970Scy<p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>associd</code> 1665275970Scy</td><td valign="top" width="20%"> 1666275970Scyassociation ID 1667275970Scy 1668275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code> 1669275970Scy</td><td valign="top" width="20%"> 1670275970Scy<a href="decode.html#peer">peer status word</a> 1671275970Scy 1672275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>srcadr</code> 1673275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>srcport</code> 1674275970Scy</td><td valign="top" width="20%"> 1675275970Scysource (remote) IP address and port 1676275970Scy 1677275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>dstadr</code> 1678275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>dstport</code> 1679275970Scy</td><td valign="top" width="20%"> 1680275970Scydestination (local) IP address and port 1681275970Scy 1682275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leap</code> 1683275970Scy</td><td valign="top" width="20%"> 1684275970Scyleap indicator (0-3) 1685275970Scy 1686275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code> 1687275970Scy</td><td valign="top" width="20%"> 1688275970Scystratum (0-15) 1689275970Scy 1690275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>precision</code> 1691275970Scy</td><td valign="top" width="20%"> 1692275970Scyprecision (log(2) s) 1693275970Scy 1694275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdelay</code> 1695275970Scy</td><td valign="top" width="20%"> 1696275970Scytotal roundtrip delay to the primary reference clock 1697275970Scy 1698275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdisp</code> 1699275970Scy</td><td valign="top" width="20%">total root dispersion to the primary reference clock 1700275970Scy 1701275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code> 1702275970Scy</td><td valign="top" width="20%"> 1703275970Scyreference ID or <a href="decode.html#kiss">kiss code</a> 1704275970Scy 1705275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reftime</code> 1706275970Scy</td><td valign="top" width="20%"> 1707275970Scyreference time 1708275970Scy 1709275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code> 1710275970Scy</td><td valign="top" width="20%"> 1711275970Scyreach register (octal) 1712275970Scy 1713275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>unreach</code> 1714275970Scy</td><td valign="top" width="20%"> 1715275970Scyunreach counter 1716275970Scy 1717275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>hmode</code> 1718275970Scy</td><td valign="top" width="20%"> 1719275970Scyhost mode (1-6) 1720275970Scy 1721275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>pmode</code> 1722275970Scy</td><td valign="top" width="20%"> 1723275970Scypeer mode (1-5) 1724275970Scy 1725275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>hpoll</code> 1726275970Scy</td><td valign="top" width="20%"> 1727275970Scyhost poll exponent (log(2) s) (3-17) 1728275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>ppoll</code> 1729275970Scy</td><td valign="top" width="20%"> 1730275970Scypeer poll exponent (log(2) s) (3-17) 1731275970Scy 1732275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>headway</code> 1733275970Scy</td><td valign="top" width="20%"> 1734275970Scyheadway (see <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a>) 1735275970Scy 1736275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flash</code> 1737275970Scy</td><td valign="top" width="20%"> 1738275970Scy<a href="decode.html#flash">flash status word</a> 1739275970Scy 1740275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code> 1741275970Scy</td><td valign="top" width="20%"> 1742275970Scyfilter offset 1743275970Scy 1744275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>delay</code> 1745275970Scy</td><td valign="top" width="20%"> 1746275970Scyfilter delay 1747275970Scy 1748275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>dispersion</code> 1749275970Scy</td><td valign="top" width="20%"> 1750275970Scyfilter dispersion 1751275970Scy 1752275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>jitter</code> 1753275970Scy</td><td valign="top" width="20%"> 1754275970Scyfilter jitter 1755275970Scy 1756275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>ident</code> 1757275970Scy</td><td valign="top" width="20%"> 1758275970ScyAutokey group name for this association 1759275970Scy 1760275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>bias</code> 1761275970Scy</td><td valign="top" width="20%"> 1762275970Scyunicast/broadcast bias 1763275970Scy 1764275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>xleave</code> 1765275970Scy</td><td valign="top" width="20%"> 1766275970Scyinterleave delay (see <a href="xleave.html">NTP Interleaved Modes</a>) 1767275970Scy 1768275970Scy <br></td></tr></table> 1769275970Scy 1770275970Scy <p>The bias variable is calculated when the first broadcast packet is received 1771275970Scyafter the calibration volley. It represents the offset of the broadcast 1772275970Scysubgraph relative to the unicast subgraph. The xleave variable appears 1773275970Scyonly the interleaved symmetric and interleaved modes. It represents 1774275970Scythe internal queuing, buffering and transmission delays for the preceding 1775275970Scypacket. 1776275970Scy 1777275970Scy <p>When the NTPv4 daemon is compiled with the OpenSSL software library, 1778275970Scyadditional peer variables are displayed, including the following: 1779275970Scy 1780275970Scy <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description 1781275970Scy 1782275970Scy<p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>flags</code> 1783275970Scy</td><td valign="top" width="20%"> 1784275970Scypeer flags (see Autokey specification) 1785275970Scy 1786275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>host</code> 1787275970Scy</td><td valign="top" width="20%"> 1788275970ScyAutokey server name 1789275970Scy 1790275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code> 1791275970Scy</td><td valign="top" width="20%"> 1792275970Scypeer flags (see Autokey specification) 1793275970Scy 1794275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>signature</code> 1795275970Scy</td><td valign="top" width="20%"> 1796275970ScyOpenSSL digest/signature scheme 1797275970Scy 1798275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>initsequence</code> 1799275970Scy</td><td valign="top" width="20%"> 1800275970Scyinitial key ID 1801275970Scy 1802275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>initkey</code> 1803275970Scy</td><td valign="top" width="20%"> 1804275970Scyinitial key index 1805275970Scy 1806275970Scy<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>timestamp</code> 1807275970Scy</td><td valign="top" width="20%"> 1808275970ScyAutokey signature timestamp 1809275970Scy 1810275970Scy <br></td></tr></table> 1811275970Scy 1812275970Scy<div class="node"> 1813275970Scy<p><hr> 1814275970Scy<a name="Clock-Variables"></a>Previous: <a rel="previous" accesskey="p" href="#Peer-Variables">Peer Variables</a>, 1815275970ScyUp: <a rel="up" accesskey="u" href="#Top">Top</a> 1816275970Scy<br> 1817275970Scy</div> 1818275970Scy 1819275970Scy<!-- node-name, next, previous, up --> 1820275970Scy<h3 class="section">Clock Variables</h3> 1821275970Scy 1822275970Scy<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. 1823275970Scy 1824275970Scy <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description 1825275970Scy<br></th></tr><tr align="left"><td valign="top" width="10%"><code>associd</code> 1826275970Scy</td><td valign="top" width="20%">association ID 1827275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code> 1828275970Scy</td><td valign="top" width="20%"><a href="decode.html#clock">clock status word</a> 1829275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>device</code> 1830275970Scy</td><td valign="top" width="20%">device description 1831275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>timecode</code> 1832275970Scy</td><td valign="top" width="20%">ASCII time code string (specific to device) 1833275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>poll</code> 1834275970Scy</td><td valign="top" width="20%">poll messages sent 1835275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>noreply</code> 1836275970Scy</td><td valign="top" width="20%">no reply 1837275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>badformat</code> 1838275970Scy</td><td valign="top" width="20%">bad format 1839275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>baddata</code> 1840275970Scy</td><td valign="top" width="20%">bad date or time 1841275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>fudgetime1</code> 1842275970Scy</td><td valign="top" width="20%">fudge time 1 1843275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>fudgetime2</code> 1844275970Scy</td><td valign="top" width="20%">fudge time 2 1845275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code> 1846275970Scy</td><td valign="top" width="20%">driver stratum 1847275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code> 1848275970Scy</td><td valign="top" width="20%">driver reference ID 1849275970Scy<br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code> 1850275970Scy</td><td valign="top" width="20%">driver flags 1851275970Scy <br></td></tr></table> 1852275970Scy 1853275970Scy</body></html> 1854275970Scy 1855