3 <title>ntpq: Network Time Protocol Query User's Manual</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="ntpq: Network Time Protocol Query User's Manual">
6 <meta name="generator" content="makeinfo 4.7">
7 <link title="Top" rel="top" href="#Top">
8 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9 <meta http-equiv="Content-Style-Type" content="text/css">
10 <style type="text/css"><!--
11 pre.display { font-family:inherit }
12 pre.format { font-family:inherit }
13 pre.smalldisplay { font-family:inherit; font-size:smaller }
14 pre.smallformat { font-family:inherit; font-size:smaller }
15 pre.smallexample { font-size:smaller }
16 pre.smalllisp { font-size:smaller }
17 span.sc { font-variant:small-caps }
18 span.roman { font-family: serif; font-weight: normal; }
22 <h1 class="settitle">ntpq: Network Time Protocol Query User's Manual</h1>
23 <div class="shortcontents">
24 <h2>Short Contents</h2>
26 <a href="#Top">ntpq: Network Time Protocol Query User Manual</a>
34 <a name="Top"></a>Next: <a rel="next" accesskey="n" href="#ntpq-Description">ntpq Description</a>,
35 Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
36 Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
40 <h2 class="unnumbered">ntpq: Network Time Protocol Query User Manual</h2>
42 <p>The <code>ntpq</code> utility program is used to
43 monitor the operational status
44 and determine the performance of
45 <code>ntpd</code>, the NTP daemon.
47 <p>This document applies to version 4.2.8p6 of <code>ntpq</code>.
50 <li><a accesskey="1" href="#ntpq-Description">ntpq Description</a>
51 <li><a accesskey="2" href="#ntpq-Invocation">ntpq Invocation</a>: Invoking ntpq
52 <li><a accesskey="3" href="#Usage">Usage</a>
53 <li><a accesskey="4" href="#Internal-Commands">Internal Commands</a>
54 <li><a accesskey="5" href="#Control-Message-Commands">Control Message Commands</a>
55 <li><a accesskey="6" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>
56 <li><a accesskey="7" href="#System-Variables">System Variables</a>
57 <li><a accesskey="8" href="#Peer-Variables">Peer Variables</a>
58 <li><a accesskey="9" href="#Clock-Variables">Clock Variables</a>
63 <a name="ntpq-Description"></a>Next: <a rel="next" accesskey="n" href="#Usage">Usage</a>,
64 Previous: <a rel="previous" accesskey="p" href="#Top">Top</a>,
65 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
69 <!-- node-name, next, previous, up -->
70 <h3 class="section">Description</h3>
72 <p>The <code>ntpq</code> utility program is used to monitor NTP daemon <code>ntpd</code> operations and determine performance.
73 It uses the standard NTP mode 6 control message formats defined in
74 Appendix B of the NTPv3 specification RFC1305.
75 The same formats are used in NTPv4, although some of the variable names have changed and new ones added.
76 The description on this page is for the NTPv4 variables.
78 <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.
80 <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.
82 <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.
84 <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.
86 <p>For examples and usage, see the <a href="debug.html">NTP Debugging Techniques</a> page.
90 <a name="ntpq-Invocation"></a>
94 <h3 class="section">Invoking ntpq</h3>
96 <p><a name="index-ntpq-1"></a><a name="index-standard-NTP-query-program-2"></a>
100 utility program is used to query NTP servers which
101 implement the standard NTP mode 6 control message formats defined
102 in Appendix B of the NTPv3 specification RFC1305, requesting
103 information about current state and/or changes in that state.
104 The same formats are used in NTPv4, although some of the
105 variables have changed and new ones added. The description on this
106 page is for the NTPv4 variables.
107 The program may be run either in interactive mode or controlled using
108 command line arguments.
109 Requests to read and write arbitrary
110 variables can be assembled, with raw and pretty-printed output
111 options being available.
114 utility can also obtain and print a
115 list of peers in a common format by sending multiple queries to the
118 <p>If one or more request options is included on the command line
121 is executed, each of the requests will be sent
122 to the NTP servers running on each of the hosts given as command
123 line arguments, or on localhost by default.
124 If no request options
127 will attempt to read commands from the
128 standard input and execute these on the NTP server running on the
129 first host given on the command line, again defaulting to localhost
130 when no other host is specified.
133 utility will prompt for
134 commands if the standard input is a terminal device.
137 uses NTP mode 6 packets to communicate with the
138 NTP server, and hence can be used to query any compatible server on
139 the network which permits it.
140 Note that since NTP is a UDP protocol
141 this communication will be somewhat unreliable, especially over
142 large distances in terms of network topology.
146 one attempt to retransmit requests, and will time requests out if
147 the remote host is not heard from within a suitable timeout
151 command line option other than
156 cause the specified query (queries) to be sent to the indicated
161 interactive format commands from the standard input.
163 <h5 class="subsubsection">Internal Commands</h5>
165 <p>Interactive format commands consist of a keyword followed by zero
167 Only enough characters of the full keyword to
168 uniquely identify the command need be typed.
171 number of interactive format commands are executed entirely within
174 utility itself and do not result in NTP mode 6
175 requests being sent to a server.
176 These are described following.
178 <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
180 by itself will print a list of all the command
181 keywords known to this incarnation of
185 followed by a command keyword will print function and usage
186 information about the command.
187 This command is probably a better
188 source of information about
192 <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
197 is ignored, and can be omitted,
198 in requests to the server to read variables.
201 utility maintains an internal list in which data to be included in control
202 messages can be assembled, and sent using the
203 <code>readlist</code>
205 <code>writelist</code>
206 commands described below.
209 command allows variables and their optional values to be added to
211 If more than one variable is to be added, the list should
212 be comma-separated and not contain white space.
215 command can be used to remove individual variables from the list,
217 <code>clearlist</code>
218 command removes all variables from the
221 <code>showvars</code>
222 command displays the current list of optional variables.
223 <br><dt><code>authenticate</code> <code>[yes | no]</code><dd>Normally
225 does not authenticate requests unless
226 they are write requests.
231 to send authentication with all requests it
233 Authenticated requests causes some servers to handle
234 requests slightly differently, and can occasionally melt the CPU in
235 fuzzballs if you turn authentication on before doing a
242 to display whether or not
244 is currently autheinticating requests.
245 <br><dt><code>cooked</code><dd>Causes output from query commands to be "cooked", so that
246 variables which are recognized by
249 values reformatted for human consumption.
252 thinks should have a decodable value but didn't are
253 marked with a trailing
255 <br><dt><code>debug</code> <code>[more | less | off]</code><dd>With no argument, displays the current debug level.
256 Otherwise, the debug level is changed to the indicated level.
257 <br><dt><code>delay</code> <kbd>milliseconds</kbd><dd>Specify a time interval to be added to timestamps included in
258 requests which require authentication.
259 This is used to enable
260 (unreliable) server reconfiguration over long delay network paths
261 or between machines whose clocks are unsynchronized.
263 server does not now require timestamps in authenticated requests,
264 so this command may be obsolete.
265 <br><dt><code>exit</code><dd>Exit
267 <br><dt><code>host</code> <kbd>hostname</kbd><dd>Set the host to which future queries will be sent.
269 may be either a host name or a numeric address.
270 <br><dt><code>hostnames</code> <code>[yes | no]</code><dd>If
272 is specified, host names are printed in
273 information displays.
276 is specified, numeric
277 addresses are printed instead.
281 modified using the command line
284 <br><dt><code>keyid</code> <kbd>keyid</kbd><dd>This command allows the specification of a key number to be
285 used to authenticate configuration requests.
288 <code>controlkey</code>
289 key number the server has been configured to use for this
291 <br><dt><code>keytype</code> <code>[md5 | OpenSSLDigestType]</code><dd>Specify the type of key to use for authenticating requests.
296 was built with OpenSSL support,
297 any digest type supported by OpenSSL can also be provided.
298 If no argument is given, the current
301 <br><dt><code>ntpversion</code> <code>[1 | 2 | 3 | 4]</code><dd>Sets the NTP version number which
305 Defaults to 3, and note that mode 6 control messages (and
306 modes, for that matter) didn't exist in NTP version 1.
308 to be no servers left which demand version 1.
309 With no argument, displays the current NTP version that will be used
310 when communicating with servers.
311 <br><dt><code>passwd</code><dd>This command prompts you to type in a password (which will not
312 be echoed) which will be used to authenticate configuration
314 The password must correspond to the key configured for
315 use by the NTP server for this purpose if such requests are to be
320 <br><dt><code>quit</code><dd>Exit
322 <br><dt><code>raw</code><dd>Causes all output from query commands is printed as received
323 from the remote server.
324 The only formating/interpretation done on
325 the data is to transform nonascii data into a printable (but barely
326 understandable) form.
327 <br><dt><code>timeout</code> <kbd>milliseconds</kbd><dd>Specify a timeout period for responses to server queries.
329 default is about 5000 milliseconds.
332 retries each query once after a timeout, the total waiting time for
333 a timeout will be twice the timeout value set.
334 <br><dt><code>version</code><dd>Print the version of the
339 <h5 class="subsubsection">Control Message Commands</h5>
341 <p>Association IDs are used to identify system, peer and clock variables.
342 System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
343 Most control commands send a single mode-6 message to the server and expect a single response message.
344 The exceptions are the
346 command, which sends a series of messages,
348 <code>mreadlist</code>
350 <code>mreadvar</code>
351 commands, which iterate over a range of associations.
353 <dt><code>associations</code><dd>Display a list of mobilized associations in the form:
354 <pre class="example"> ind assid status conf reach auth condition last_event cnt
357 <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>
358 <br><dt><code>authinfo</code><dd>Display the authentication statistics.
359 <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.
360 <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.
361 <br><dt><code>config-from-file</code> <kbd>filename</kbd><dd>Send the each line of
363 to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
364 <br><dt><code>ifstats</code><dd>Display statistics for each local network address. Authentication is required.
365 <br><dt><code>iostats</code><dd>Display network and reference clock I/O statistics.
366 <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.
367 <br><dt><code>lassociations</code><dd>Perform the same function as the associations command, except display mobilized and unmobilized associations.
368 <br><dt><code>lopeers</code> <code>[-4 | -6]</code><dd>Obtain and print a list of all peers and clients showing
370 (associated with any given IP version).
371 <br><dt><code>lpeers</code> <code>[-4 | -6]</code><dd>Print a peer spreadsheet for the appropriate IP version(s).
373 (associated with any given IP version).
374 <br><dt><code>monstats</code><dd>Display monitor facility statistics.
375 <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.
376 With the exception of
377 <code>sort</code>=<kbd>sortorder</kbd>,
378 the options filter the list returned by
384 options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
386 <code>mincount</code>=<kbd>count</kbd>
387 option filters entries representing less than
391 <code>laddr</code>=<kbd>localaddr</kbd>
392 option filters entries for packets received on any local address other than
393 <kbd>localaddr</kbd>.
394 <code>resany</code>=<kbd>hexmask</kbd>
396 <code>resall</code>=<kbd>hexmask</kbd>
397 filter entries containing none or less than all, respectively, of the bits in
399 which must begin with
410 or any of those preceded by a minus sign (hyphen) to reverse the sort order.
411 The output columns are:
413 <dt>Column<dd>Description
414 <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
416 <br><dt><code>avgint</code><dd>Average interval in s between packets from this address.
417 <br><dt><code>rstr</code><dd>Restriction flags associated with this address.
418 Most are copied unchanged from the matching
419 <code>restrict</code>
420 command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
421 <br><dt><code>r</code><dd>Rate control indicator, either
426 for no rate control response,
427 rate limiting by discarding, or rate limiting with a KoD response, respectively.
428 <br><dt><code>m</code><dd>Packet mode.
429 <br><dt><code>v</code><dd>Packet version number.
430 <br><dt><code>count</code><dd>Packets received from this address.
431 <br><dt><code>rport</code><dd>Source port of last packet from this address.
432 <br><dt><code>remote</code> <code>address</code><dd>DNS name, numeric address, or address followed by
433 claimed DNS name which could not be verified in parentheses.
435 <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
437 command, except for a range of association IDs.
438 This range is determined from the association list cached by the most recent
439 <code>associations</code>
441 <br><dt><code>opeers</code> <code>[-4 | -6]</code><dd>Obtain and print the old-style list of all peers and clients showing
443 (associated with any given IP version),
446 <br><dt><code>passociations</code><dd>Perform the same function as the
447 <code>associations</code>
449 except that it uses previously stored data rather than making a new query.
450 <br><dt><code>peers</code><dd>Display a list of peers in the form:
451 <pre class="example"> [tally]remote refid st t when pool reach delay offset jitter
454 <dt>Variable<dd>Description
455 <br><dt><code>[tally]</code><dd>single-character code indicating current value of the
458 .Lk decode.html#peer "peer status word"
459 <br><dt><code>remote</code><dd>host name (or IP number) of peer.
460 The value displayed will be truncated to 15 characters unless the
462 flag is given, in which case the full value will be displayed
464 and the remaining data is displayed on the next line.
465 <br><dt><code>refid</code><dd>association ID or
466 .Lk decode.html#kiss "'kiss code"
467 <br><dt><code>st</code><dd>stratum
468 <br><dt><code>t</code><dd><code>u</code>:
469 unicast or manycast client,
471 broadcast or multicast client,
473 local (reference clock),
482 <br><dt><code>when</code><dd>sec/min/hr since last received packet
483 <br><dt><code>poll</code><dd>poll interval (log2 s)
484 <br><dt><code>reach</code><dd>reach shift register (octal)
485 <br><dt><code>delay</code><dd>roundtrip delay
486 <br><dt><code>offset</code><dd>offset of server relative to this host
487 <br><dt><code>jitter</code><dd>jitter
489 <br><dt><code>apeers</code><dd>Display a list of peers in the form:
490 <pre class="example"> [tally]remote refid assid st t when pool reach delay offset jitter
492 <p>where the output is just like the
494 command except that the
496 is displayed in hex format and the association number is also displayed.
497 <br><dt><code>pstats</code> <kbd>assocID</kbd><dd>Show the statistics for the peer with the given
499 <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.
500 <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.
503 is zero, the variables are from the
504 <a href="#System-Variables">System Variables</a>
505 name space, otherwise they are from the
506 <a href="#Peer-Variables">Peer Variables</a>
510 is required, as the same name can occur in both spaces.
513 is included, all operative variables in the name space are displayed.
515 <p>In this case only, if the
517 is omitted, it is assumed zero.
518 Multiple names are specified with comma separators and without whitespace.
519 Note that time values are represented in milliseconds
520 and frequency values in parts-per-million (PPM).
521 Some NTP timestamps are represented in the format
523 where YYYY is the year,
524 MM the month of year,
525 DD the day of month and
526 TTTT the time of day.
527 <br><dt><code>reslist</code><dd>Show the access control (restrict) list for
530 <br><dt><code>saveconfig</code> <kbd>filename</kbd><dd>Write the current configuration,
531 including any runtime modifications given with
534 <code>config-from-file</code>,
535 to the ntpd host's file
537 This command will be rejected by the server unless
538 .Lk miscopt.html#saveconfigdir "saveconfigdir"
544 <code>strftime()</code>
545 format specifies to substitute the current date and time, for example,
546 <code>q]saveconfig</code> <code>ntp-%Y%m%d-%H%M%S.confq]</code>.
547 The filename used is stored in system variable
548 <code>savedconfig</code>.
549 Authentication is required.
550 <br><dt><code>timerstats</code><dd>Display interval timer counters.
551 <br><dt><code>writelist</code> <kbd>assocID</kbd><dd>Write the system or peer variables included in the variable list.
552 <br><dt><code>writevar</code> <kbd>assocID</kbd> <kbd>name</kbd>=<kbd>value</kbd> <code>[, ...]</code><dd>Write the specified variables.
555 is zero, the variables are from the
556 <a href="#System-Variables">System Variables</a>
557 name space, otherwise they are from the
558 <a href="#Peer-Variables">Peer Variables</a>
562 is required, as the same name can occur in both spaces.
563 <br><dt><code>sysinfo</code><dd>Display operational summary.
564 <br><dt><code>sysstats</code><dd>Print statistics counters maintained in the protocol module.
567 <h5 class="subsubsection">Status Words and Kiss Codes</h5>
569 <p>The current state of the operating program is shown
570 in a set of status words
571 maintained by the system.
572 Status information is also available on a per-association basis.
573 These words are displayed in the
577 commands both in hexadecimal and in decoded short tip strings.
578 The codes, tips and short explanations are documented on the
579 .Lk decode.html "Event Messages and Status Words"
581 The page also includes a list of system and peer messages,
582 the code for the latest of which is included in the status word.
584 <p>Information resulting from protocol machine state transitions
585 is displayed using an informal set of ASCII strings called
586 .Lk decode.html#kiss "kiss codes" .
587 The original purpose was for kiss-o'-death (KoD) packets
588 sent by the server to advise the client of an unusual condition.
589 They are now displayed, when appropriate,
590 in the reference identifier field in various billboards.
592 <h5 class="subsubsection">System Variables</h5>
594 <p>The following system variables appear in the
597 Not all variables are displayed in some configurations.
599 <dt>Variable<dd>Description
600 <br><dt><code>status</code><dd>.Lk decode.html#sys "system status word"
601 <br><dt><code>version</code><dd>NTP software version and build time
602 <br><dt><code>processor</code><dd>hardware platform and version
603 <br><dt><code>system</code><dd>operating system and version
604 <br><dt><code>leap</code><dd>leap warning indicator (0-3)
605 <br><dt><code>stratum</code><dd>stratum (1-15)
606 <br><dt><code>precision</code><dd>precision (log2 s)
607 <br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock
608 <br><dt><code>rootdisp</code><dd>total dispersion to the primary reference clock
609 <br><dt><code>peer</code><dd>system peer association ID
610 <br><dt><code>tc</code><dd>time constant and poll exponent (log2 s) (3-17)
611 <br><dt><code>mintc</code><dd>minimum time constant (log2 s) (3-10)
612 <br><dt><code>clock</code><dd>date and time of day
613 <br><dt><code>refid</code><dd>reference ID or
614 .Lk decode.html#kiss "kiss code"
615 <br><dt><code>reftime</code><dd>reference time
616 <br><dt><code>offset</code><dd>combined offset of server relative to this host
617 <br><dt><code>sys_jitter</code><dd>combined system jitter
618 <br><dt><code>frequency</code><dd>frequency offset (PPM) relative to hardware clock
619 <br><dt><code>clk_wander</code><dd>clock frequency wander (PPM)
620 <br><dt><code>clk_jitter</code><dd>clock jitter
621 <br><dt><code>tai</code><dd>TAI-UTC offset (s)
622 <br><dt><code>leapsec</code><dd>NTP seconds when the next leap second is/was inserted
623 <br><dt><code>expire</code><dd>NTP seconds when the NIST leapseconds file expires
625 The jitter and wander statistics are exponentially-weighted RMS averages.
626 The system jitter is defined in the NTPv4 specification;
627 the clock jitter statistic is computed by the clock discipline module.
629 <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
630 additional system variables are displayed,
631 including some or all of the following,
632 depending on the particular Autokey dance:
635 <dt>Variable<dd>Description
636 <br><dt><code>host</code><dd>Autokey host name for this host
637 <br><dt><code>ident</code><dd>Autokey group name for this host
638 <br><dt><code>flags</code><dd>host flags (see Autokey specification)
639 <br><dt><code>digest</code><dd>OpenSSL message digest algorithm
640 <br><dt><code>signature</code><dd>OpenSSL digest/signature scheme
641 <br><dt><code>update</code><dd>NTP seconds at last signature update
642 <br><dt><code>cert</code><dd>certificate subject, issuer and certificate flags
643 <br><dt><code>until</code><dd>NTP seconds when the certificate expires
646 <h5 class="subsubsection">Peer Variables</h5>
648 <p>The following peer variables appear in the
650 billboard for each association.
651 Not all variables are displayed in some configurations.
654 <dt>Variable<dd>Description
655 <br><dt><code>associd</code><dd>association ID
656 <br><dt><code>status</code><dd>.Lk decode.html#peer "peer status word"
657 <br><dt><code>srcadr</code><dd>source (remote) IP address
658 <br><dt><code>srcport</code><dd>source (remote) port
659 <br><dt><code>dstadr</code><dd>destination (local) IP address
660 <br><dt><code>dstport</code><dd>destination (local) port
661 <br><dt><code>leap</code><dd>leap indicator (0-3)
662 <br><dt><code>stratum</code><dd>stratum (0-15)
663 <br><dt><code>precision</code><dd>precision (log2 s)
664 <br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock
665 <br><dt><code>rootdisp</code><dd>total root dispersion to the primary reference clock
666 <br><dt><code>refid</code><dd>reference ID or
667 .Lk decode.html#kiss "kiss code"
668 <br><dt><code>reftime</code><dd>reference time
669 <br><dt><code>reach</code><dd>reach register (octal)
670 <br><dt><code>unreach</code><dd>unreach counter
671 <br><dt><code>hmode</code><dd>host mode (1-6)
672 <br><dt><code>pmode</code><dd>peer mode (1-5)
673 <br><dt><code>hpoll</code><dd>host poll exponent (log2 s) (3-17)
674 <br><dt><code>ppoll</code><dd>peer poll exponent (log2 s) (3-17)
675 <br><dt><code>headway</code><dd>headway (see
676 .Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
677 <br><dt><code>flash</code><dd>.Lk decode.html#flash "flash status word"
678 <br><dt><code>offset</code><dd>filter offset
679 <br><dt><code>delay</code><dd>filter delay
680 <br><dt><code>dispersion</code><dd>filter dispersion
681 <br><dt><code>jitter</code><dd>filter jitter
682 <br><dt><code>ident</code><dd>Autokey group name for this association
683 <br><dt><code>bias</code><dd>unicast/broadcast bias
684 <br><dt><code>xleave</code><dd>interleave delay (see
685 .Lk xleave.html "NTP Interleaved Modes" )
689 variable is calculated when the first broadcast packet is received
690 after the calibration volley.
691 It represents the offset of the broadcast subgraph relative to the unicast subgraph.
694 variable appears only for the interleaved symmetric and interleaved modes.
695 It represents the internal queuing, buffering and transmission delays
696 for the preceding packet.
698 <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
699 additional peer variables are displayed, including the following:
701 <dt>Variable<dd>Description
702 <br><dt><code>flags</code><dd>peer flags (see Autokey specification)
703 <br><dt><code>host</code><dd>Autokey server name
704 <br><dt><code>flags</code><dd>peer flags (see Autokey specification)
705 <br><dt><code>signature</code><dd>OpenSSL digest/signature scheme
706 <br><dt><code>initsequence</code><dd>initial key ID
707 <br><dt><code>initkey</code><dd>initial key index
708 <br><dt><code>timestamp</code><dd>Autokey signature timestamp
711 <h5 class="subsubsection">Clock Variables</h5>
713 <p>The following clock variables appear in the
715 billboard for each association with a reference clock.
716 Not all variables are displayed in some configurations.
718 <dt>Variable<dd>Description
719 <br><dt><code>associd</code><dd>association ID
720 <br><dt><code>status</code><dd>.Lk decode.html#clock "clock status word"
721 <br><dt><code>device</code><dd>device description
722 <br><dt><code>timecode</code><dd>ASCII time code string (specific to device)
723 <br><dt><code>poll</code><dd>poll messages sent
724 <br><dt><code>noreply</code><dd>no reply
725 <br><dt><code>badformat</code><dd>bad format
726 <br><dt><code>baddata</code><dd>bad date or time
727 <br><dt><code>fudgetime1</code><dd>fudge time 1
728 <br><dt><code>fudgetime2</code><dd>fudge time 2
729 <br><dt><code>stratum</code><dd>driver stratum
730 <br><dt><code>refid</code><dd>driver reference ID
731 <br><dt><code>flags</code><dd>driver flags
734 <p>This section was generated by <strong>AutoGen</strong>,
735 using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpq</code> program.
736 This software is released under the NTP license, <http://ntp.org/license>.
739 <li><a accesskey="1" href="#ntpq-usage">ntpq usage</a>: ntpq help/usage (<span class="option">--help</span>)
740 <li><a accesskey="2" href="#ntpq-ipv4">ntpq ipv4</a>: ipv4 option (-4)
741 <li><a accesskey="3" href="#ntpq-ipv6">ntpq ipv6</a>: ipv6 option (-6)
742 <li><a accesskey="4" href="#ntpq-command">ntpq command</a>: command option (-c)
743 <li><a accesskey="5" href="#ntpq-interactive">ntpq interactive</a>: interactive option (-i)
744 <li><a accesskey="6" href="#ntpq-numeric">ntpq numeric</a>: numeric option (-n)
745 <li><a accesskey="7" href="#ntpq-old_002drv">ntpq old-rv</a>: old-rv option
746 <li><a accesskey="8" href="#ntpq-peers">ntpq peers</a>: peers option (-p)
747 <li><a accesskey="9" href="#ntpq-wide">ntpq wide</a>: wide option (-w)
748 <li><a href="#ntpq-config">ntpq config</a>: presetting/configuring ntpq
749 <li><a href="#ntpq-exit-status">ntpq exit status</a>: exit status
754 <a name="ntpq-usage"></a>Next: <a rel="next" accesskey="n" href="#ntpq-ipv4">ntpq ipv4</a>,
755 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
759 <h4 class="subsection">ntpq help/usage (<span class="option">--help</span>)</h4>
761 <p><a name="index-ntpq-help-3"></a>
762 This is the automatically generated usage text for ntpq.
764 <p>The text printed is the same whether selected with the <code>help</code> option
765 (<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
766 the usage text by passing it through a pager program.
767 <code>more-help</code> is disabled on platforms without a working
768 <code>fork(2)</code> function. The <code>PAGER</code> environment variable is
769 used to select the program, defaulting to <span class="file">more</span>. Both will exit
770 with a status code of 0.
772 <pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p5
773 Usage: ntpq [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]
774 Flg Arg Option-Name Description
775 -4 no ipv4 Force IPv4 DNS name resolution
776 - prohibits the option 'ipv6'
777 -6 no ipv6 Force IPv6 DNS name resolution
778 - prohibits the option 'ipv4'
779 -c Str command run a command and exit
780 - may appear multiple times
781 -d no debug-level Increase debug verbosity level
782 - may appear multiple times
783 -D Num set-debug-level Set the debug verbosity level
784 - may appear multiple times
785 -i no interactive Force ntpq to operate in interactive mode
786 - prohibits these options:
789 -n no numeric numeric host addresses
790 no old-rv Always output status line with readvar
791 -p no peers Print a list of the peers
792 - prohibits the option 'interactive'
793 -w no wide Display the full 'remote' value
794 opt version output version information and exit
795 -? no help display extended usage information and exit
796 -! no more-help extended usage information passed thru pager
797 -> opt save-opts save the option state to a config file
798 -< Str load-opts load options from a config file
799 - disabled as '--no-load-opts'
800 - may appear multiple times
802 Options are specified by doubled hyphens and their name or by a single
803 hyphen and the flag character.
805 The following option preset mechanisms are supported:
806 - reading file $HOME/.ntprc
807 - reading file ./.ntprc
808 - examining environment variables named NTPQ_*
810 Please send bug reports to: <http://bugs.ntp.org, bugs@ntp.org>
814 <a name="ntpq-ipv4"></a>Next: <a rel="next" accesskey="n" href="#ntpq-ipv6">ntpq ipv6</a>,
815 Previous: <a rel="previous" accesskey="p" href="#ntpq-usage">ntpq usage</a>,
816 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
820 <h4 class="subsection">ipv4 option (-4)</h4>
822 <p><a name="index-ntpq_002dipv4-4"></a>
823 This is the “force ipv4 dns name resolution” option.
825 <p class="noindent">This option has some usage constraints. It:
827 <li>must not appear in combination with any of the following options:
831 <p>Force DNS resolution of following host names on the command line
832 to the IPv4 namespace.
835 <a name="ntpq-ipv6"></a>Next: <a rel="next" accesskey="n" href="#ntpq-command">ntpq command</a>,
836 Previous: <a rel="previous" accesskey="p" href="#ntpq-ipv4">ntpq ipv4</a>,
837 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
841 <h4 class="subsection">ipv6 option (-6)</h4>
843 <p><a name="index-ntpq_002dipv6-5"></a>
844 This is the “force ipv6 dns name resolution” option.
846 <p class="noindent">This option has some usage constraints. It:
848 <li>must not appear in combination with any of the following options:
852 <p>Force DNS resolution of following host names on the command line
853 to the IPv6 namespace.
856 <a name="ntpq-command"></a>Next: <a rel="next" accesskey="n" href="#ntpq-interactive">ntpq interactive</a>,
857 Previous: <a rel="previous" accesskey="p" href="#ntpq-ipv6">ntpq ipv6</a>,
858 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
862 <h4 class="subsection">command option (-c)</h4>
864 <p><a name="index-ntpq_002dcommand-6"></a>
865 This is the “run a command and exit” option.
866 This option takes a string argument <span class="file">cmd</span>.
868 <p class="noindent">This option has some usage constraints. It:
870 <li>may appear an unlimited number of times.
873 <p>The following argument is interpreted as an interactive format command
874 and is added to the list of commands to be executed on the specified
878 <a name="ntpq-interactive"></a>Next: <a rel="next" accesskey="n" href="#ntpq-numeric">ntpq numeric</a>,
879 Previous: <a rel="previous" accesskey="p" href="#ntpq-command">ntpq command</a>,
880 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
884 <h4 class="subsection">interactive option (-i)</h4>
886 <p><a name="index-ntpq_002dinteractive-7"></a>
887 This is the “force ntpq to operate in interactive mode” option.
889 <p class="noindent">This option has some usage constraints. It:
891 <li>must not appear in combination with any of the following options:
895 <p>Force <code>ntpq</code> to operate in interactive mode.
896 Prompts will be written to the standard output and
897 commands read from the standard input.
900 <a name="ntpq-numeric"></a>Next: <a rel="next" accesskey="n" href="#ntpq-old_002drv">ntpq old-rv</a>,
901 Previous: <a rel="previous" accesskey="p" href="#ntpq-interactive">ntpq interactive</a>,
902 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
906 <h4 class="subsection">numeric option (-n)</h4>
908 <p><a name="index-ntpq_002dnumeric-8"></a>
909 This is the “numeric host addresses” option.
910 Output all host addresses in dotted-quad numeric format rather than
911 converting to the canonical host names.
914 <a name="ntpq-old_002drv"></a>Next: <a rel="next" accesskey="n" href="#ntpq-peers">ntpq peers</a>,
915 Previous: <a rel="previous" accesskey="p" href="#ntpq-numeric">ntpq numeric</a>,
916 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
920 <h4 class="subsection">old-rv option</h4>
922 <p><a name="index-ntpq_002dold_002drv-9"></a>
923 This is the “always output status line with readvar” option.
924 By default, <code>ntpq</code> now suppresses the <code>associd=...</code>
925 line that precedes the output of <code>readvar</code>
926 (alias <code>rv</code>) when a single variable is requested, such as
927 <code>ntpq -c "rv 0 offset"</code>.
928 This option causes <code>ntpq</code> to include both lines of output
929 for a single-variable <code>readvar</code>.
930 Using an environment variable to
931 preset this option in a script will enable both older and
932 newer <code>ntpq</code> to behave identically in this regard.
935 <a name="ntpq-peers"></a>Next: <a rel="next" accesskey="n" href="#ntpq-wide">ntpq wide</a>,
936 Previous: <a rel="previous" accesskey="p" href="#ntpq-old_002drv">ntpq old-rv</a>,
937 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
941 <h4 class="subsection">peers option (-p)</h4>
943 <p><a name="index-ntpq_002dpeers-10"></a>
944 This is the “print a list of the peers” option.
946 <p class="noindent">This option has some usage constraints. It:
948 <li>must not appear in combination with any of the following options:
952 <p>Print a list of the peers known to the server as well as a summary
953 of their state. This is equivalent to the 'peers' interactive command.
956 <a name="ntpq-wide"></a>Next: <a rel="next" accesskey="n" href="#ntpq-config">ntpq config</a>,
957 Previous: <a rel="previous" accesskey="p" href="#ntpq-peers">ntpq peers</a>,
958 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
962 <h4 class="subsection">wide option (-w)</h4>
964 <p><a name="index-ntpq_002dwide-11"></a>
965 This is the “display the full 'remote' value” option.
966 Display the full value of the 'remote' value. If this requires
967 more than 15 characters, display the full value, emit a newline,
968 and continue the data display properly indented on the next line.
972 <a name="ntpq-config"></a>Next: <a rel="next" accesskey="n" href="#ntpq-exit-status">ntpq exit status</a>,
973 Previous: <a rel="previous" accesskey="p" href="#ntpq-wide">ntpq wide</a>,
974 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
978 <h4 class="subsection">presetting/configuring ntpq</h4>
980 <p>Any option that is not marked as <i>not presettable</i> may be preset by
981 loading 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
982 the options listed above in upper case and segmented with underscores.
983 The <code>NTPQ</code> variable will be tokenized and parsed like
984 the command line. The remaining variables are tested for existence and their
985 values are treated like option arguments.
987 <p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
992 The environment variables <code>HOME</code>, and <code>PWD</code>
993 are expanded and replaced when <span class="file">ntpq</span> runs.
994 For any of these that are plain files, they are simply processed.
995 For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
996 within that directory and processed.
998 <p>Configuration files may be in a wide variety of formats.
999 The basic format is an option name followed by a value (argument) on the
1000 same line. Values may be separated from the option name with a colon,
1001 equal sign or simply white space. Values may be continued across multiple
1002 lines by escaping the newline with a backslash.
1004 <p>Multiple programs may also share the same initialization file.
1005 Common options are collected at the top, followed by program specific
1006 segments. The segments are separated by lines like:
1007 <pre class="example"> [NTPQ]
1009 <p class="noindent">or by
1010 <pre class="example"> <?program ntpq>
1012 <p class="noindent">Do not mix these styles within one configuration file.
1014 <p>Compound values and carefully constructed string values may also be
1015 specified using XML syntax:
1016 <pre class="example"> <option-name>
1017 <sub-opt>...&lt;...&gt;...</sub-opt>
1018 </option-name>
1020 <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
1021 <pre class="example"> "...<...>..."
1023 <p><code>AutoOpts</code> does not track suboptions. You simply note that it is a
1024 hierarchicly valued option. <code>AutoOpts</code> does provide a means for searching
1025 the associated name/value pair list (see: optionFindValue).
1027 <p>The command line options relating to configuration and/or usage help are:
1029 <h5 class="subsubheading">version (-)</h5>
1031 <p>Print the program version to standard out, optionally with licensing
1032 information, then exit 0. The optional argument specifies how much licensing
1033 detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
1034 Only the first letter of the argument is examined:
1037 <dt><span class="samp">version</span><dd>Only print the version. This is the default.
1038 <br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
1039 <br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
1044 <a name="ntpq-exit-status"></a>Previous: <a rel="previous" accesskey="p" href="#ntpq-config">ntpq config</a>,
1045 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
1049 <h4 class="subsection">ntpq exit status</h4>
1051 <p>One of the following exit values will be returned:
1053 <dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
1054 <br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
1055 <br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded.
1056 <br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report
1057 it to autogen-users@lists.sourceforge.net. Thank you.
1062 <a name="Usage"></a>Next: <a rel="next" accesskey="n" href="#Internal-Commands">Internal Commands</a>,
1063 Previous: <a rel="previous" accesskey="p" href="#ntpq-Description">ntpq Description</a>,
1064 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1068 <!-- node-name, next, previous, up -->
1069 <h3 class="section">Usage</h3>
1071 <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
1072 <br></th></tr><tr align="left"><td valign="top" width="23%">configuration file
1073 </td><td valign="top" width="23%"><code>/etc/ntp.conf</code>
1074 </td><td valign="top" width="5%"><code>-c</code>
1075 </td><td valign="top" width="15%"><code>conffile</code>
1076 <br></td></tr><tr align="left"><td valign="top" width="23%">frequency file
1077 </td><td valign="top" width="23%">none
1078 </td><td valign="top" width="5%"><code>-f</code>
1079 </td><td valign="top" width="15%"><code>driftfile</code>
1080 <br></td></tr><tr align="left"><td valign="top" width="23%">leapseconds file
1081 </td><td valign="top" width="23%">none
1082 </td><td valign="top" width="5%">
1083 </td><td valign="top" width="15%"><code>leapfile</code>
1084 <br></td></tr><tr align="left"><td valign="top" width="23%">process ID file
1085 </td><td valign="top" width="23%">none
1086 </td><td valign="top" width="5%"><code>-p</code>
1087 </td><td valign="top" width="15%"><code>pidfile</code>
1088 <br></td></tr><tr align="left"><td valign="top" width="23%">log file
1089 </td><td valign="top" width="23%">system log
1090 </td><td valign="top" width="5%"><code>-l</code>
1091 </td><td valign="top" width="15%"><code>logfile</code>
1092 <br></td></tr><tr align="left"><td valign="top" width="23%">include file
1093 </td><td valign="top" width="23%">none
1094 </td><td valign="top" width="5%">none
1095 </td><td valign="top" width="15%"><code>includefile</code>
1096 <br></td></tr><tr align="left"><td valign="top" width="23%">statistics path
1097 </td><td valign="top" width="23%"><code>/var/NTP</code>
1098 </td><td valign="top" width="5%"><code>-s</code>
1099 </td><td valign="top" width="15%"><code>statsdir</code>
1100 <br></td></tr><tr align="left"><td valign="top" width="23%">keys path
1101 </td><td valign="top" width="23%"><code>/usr/local/etc</code>
1102 </td><td valign="top" width="5%"><code>-k</code>
1103 </td><td valign="top" width="15%"><code>keysdir</code>
1104 <br></td></tr></table>
1108 <a name="Internal-Commands"></a>Next: <a rel="next" accesskey="n" href="#Control-Message-Commands">Control Message Commands</a>,
1109 Previous: <a rel="previous" accesskey="p" href="#Usage">Usage</a>,
1110 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1114 <!-- node-name, next, previous, up -->
1115 <h3 class="section">Internal Commands</h3>
1117 <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.
1120 <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.
1122 <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
1123 <kbd>name</kbd><code> = </code><kbd>value</kbd>, where the <code>= </code><kbd>value</kbd> is ignored,
1124 and can be omitted in read requests.
1125 <code>ntpq</code> maintains an internal list in which data to be included
1126 in control messages can be assembled, and sent using the <code>readlist</code>
1127 and <code>writelist</code> commands described below.
1128 The <code>addvars</code> command allows variables and optional values
1129 to be added to the list.
1130 If more than one variable is to be added
1131 the list should be comma-separated and not contain white space.
1132 The <code>rmvars</code> command can be used to remove individual variables
1134 while the <code>clearlist</code> command removes all variables from the list.
1136 <br><dt><code><a name="cooked"></a> cooked</code><dd>Display server messages in prettyprint format.
1138 <br><dt><code><a name="debug"></a> debug more | less | off</code><dd>Turns internal query program debugging on and off.
1140 <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.
1142 <br><dt><code><a name="host"></a> host </code><kbd>name</kbd><dd>Set the host to which future queries will be sent.
1143 The name may be either a DNS name or a numeric address.
1145 <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.
1146 If <code>no</code> is specified, numeric addresses are printed instead.
1147 The default is <code>yes</code>,
1148 unless modified using the command line <code>-n</code> switch.
1150 <br><dt><code><a name="keyid"></a> keyid </code><kbd>keyid</kbd><dd>This command specifies the key number to be used
1151 to authenticate configuration requests.
1152 This must correspond to a key ID configured in <code>ntp.conf</code> for this purpose.
1154 <br><dt><code><a name="keytype"></a> keytype</code><dd>Specify the digest algorithm to use for authenticated requests,
1155 with default <code>MD5</code>.
1156 If the OpenSSL library is installed,
1157 digest can be be any message digest algorithm supported by the library.
1158 The current selections are: <code>MD2</code>, <code>MD4</code>, <code>MD5</code>, <code>MDC2</code>, <code>RIPEMD160</code>, <code>SHA</code> and <code>SHA1</code>.
1160 <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.
1162 Note that mode-6 control messages (and modes, for that matter)
1163 didn't exist in NTP version 1.
1165 <br><dt><code><a name="passwd"></a> passwd</code><dd>This command prompts for a password to authenticate requests.
1166 The password must correspond to the key ID configured in <code>ntp.conf</code> for this purpose.
1168 <br><dt><code><a name="quit"></a> quit</code><dd>Exit <code>ntpq</code>.
1170 <br><dt><code><a name="raw"></a> raw</code><dd>Display server messages as received and without reformatting.
1172 <br><dt><code><a name="timeout"></a> timeout </code><kbd>millseconds</kbd><dd>Specify a timeout period for responses to server queries.
1173 The default is about 5000 milliseconds.
1174 Note that since <code>ntpq</code> retries each query once after a timeout
1175 the total waiting time for a timeout will be twice the timeout value set.
1181 <a name="Control-Message-Commands"></a>Next: <a rel="next" accesskey="n" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>,
1182 Previous: <a rel="previous" accesskey="p" href="#Internal-Commands">Internal Commands</a>,
1183 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1187 <!-- node-name, next, previous, up -->
1188 <h3 class="section">Control Message Commands</h3>
1190 <p>Association IDs are used to identify system, peer and clock variables.
1191 System variables are assigned an association ID of zero and system name space,
1192 while each association is assigned a nonzero association ID and peer namespace.
1193 Most control commands send a single mode-6 message to the server
1194 and expect a single response message.
1195 The exceptions are the <code>peers</code> command,
1196 which sends a series of messages,
1197 and the <code>mreadlist</code> and <code>mreadvar</code> commands,
1198 which iterate over a range of associations.
1200 <p><a name="as"></a>
1202 <dt><code>associations</code><dd>Display a list of mobilized associations in the form:
1204 <code>ind assid status conf reach auth condition last_event cnt</code>
1206 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="40%">Description
1208 <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>ind</code>
1209 </td><td valign="top" width="40%">index on this list
1211 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>assid</code>
1212 </td><td valign="top" width="40%">association ID
1214 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
1215 </td><td valign="top" width="40%"><a href="decode.html#peer">peer status word</a>
1217 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>conf</code>
1218 </td><td valign="top" width="40%"><code>yes</code>: persistent, <code>no</code>: ephemeral
1220 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
1221 </td><td valign="top" width="40%"><code>yes</code>: reachable, <code>no</code>: unreachable
1223 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>auth</code>
1224 </td><td valign="top" width="40%"><code>ok</code>, <code>yes</code>, <code>bad</code> and <code>none</code>
1226 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>condition</code>
1227 </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>)
1229 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>last_event</code>
1230 </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>)
1232 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>cnt</code>
1233 event count (see the <code>count</code> field of the <a href="decode.html#peer">peer status word</a>)
1235 <br></td></tr></table>
1237 <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.
1239 <br><dt><code><a name="_003aconfig"></a> :config [...]</code><dd>Send the remainder of the command line, including whitespace, to the server
1240 as a run-time configuration command in the same format
1241 as the configuration file.
1242 This command is experimental until further notice and clarification.
1243 Authentication is of course required.
1245 <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
1246 run-time configuration commands in the same format as the configuration file.
1247 This command is experimental until further notice and clarification.
1248 Authentication is required.
1250 <br><dt><code><a name="ifstats"></a> ifstats</code><dd>Display statistics for each local network address.
1251 Authentication is required.
1253 <br><dt><code><a name="iostats"></a> iostats</code><dd>Display network and reference clock I/O statistics.
1255 <br><dt><code><a name="kerninfo"></a> kerninfo</code><dd>Display kernel loop and PPS statistics.
1256 As with other ntpq output, times are in milliseconds.
1257 The precision value displayed is in milliseconds as well,
1258 unlike the precision system variable.
1260 <br><dt><code><a name="lassoc"></a> lassociations</code><dd>Perform the same function as the associations command,
1261 except display mobilized and unmobilized associations.
1263 <br><dt><code><a name="monstats"></a> monstats</code><dd>Display monitor facility statistics.
1265 <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
1266 the monitor facility.
1267 With the exception of <code>sort=</code><kbd>sortorder</kbd>,
1268 the options filter the list returned by <code>ntpd</code>.
1269 The <code>limited</code> and <code>kod</code> options return only entries
1270 representing client addresses from which the last packet received
1271 triggered either discarding or a KoD response.
1272 The <code>mincount=</code><kbd>count</kbd> option filters entries representing
1273 less than <kbd>count</kbd> packets.
1274 The <code>laddr=</code><kbd>localaddr</kbd> option filters entries for packets
1275 received on any local address other than <kbd>localaddr</kbd>.
1276 <code>resany=</code><kbd>hexmask</kbd> and <code>resall=</code><kbd>hexmask</kbd>
1277 filter entries containing none or less than all, respectively,
1278 of the bits in <kbd>hexmask</kbd>, which must begin with <code>0x</code>.
1280 The <kbd>sortorder</kbd> defaults to <code>lstint</code> and may be any of
1281 <code>addr</code>, <code>count</code>, <code>avgint</code>, <code>lstint</code>, or
1282 any of those preceded by a minus sign (hyphen) to reverse the sort order.
1283 The output columns are:
1285 <p><table summary=""><tr align="left"><th valign="top" width="10%">Column </th><th valign="top" width="40%">Description
1287 <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>lstint</code>
1288 </td><td valign="top" width="40%">
1289 Interval in s between the receipt of the most recent packet from this
1290 address and the completion of the retrieval of the MRU list by <code>ntpq</code>
1292 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>avgint</code>
1293 </td><td valign="top" width="40%">
1294 Average interval in s between packets from this address.
1296 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rstr</code>
1297 </td><td valign="top" width="40%">
1298 Restriction flags associated with this address.
1299 Most are copied unchanged from the matching <code>restrict</code> command,
1300 however 0x400 (kod) and 0x20 (limited) flags are cleared unless
1301 the last packet from this address triggered a rate control response.
1303 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>r</code>
1304 </td><td valign="top" width="40%">
1305 Rate control indicator, either a period, <code>L</code> or <code>K</code> for
1306 no rate control response, rate limiting by discarding, or
1307 rate limiting with a KoD response, respectively.
1309 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>m</code>
1310 </td><td valign="top" width="40%">
1312 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>v</code>
1313 </td><td valign="top" width="40%">
1314 Packet version number.
1316 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>count</code>
1317 </td><td valign="top" width="40%">
1318 Packets received from this address.
1320 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rport</code>
1321 </td><td valign="top" width="40%">
1322 Source port of last packet from this address.
1324 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>remote address</code>
1325 </td><td valign="top" width="40%">
1326 DNS name, numeric address, or address followed by claimed DNS name which
1327 could not be verified in parentheses.
1329 <br></td></tr></table>
1331 <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,
1332 except for a range of association IDs.
1333 This range is determined from the association list cached by
1334 the most recent <code>associations</code> command.
1336 <br><dt><code><a name="passoc"></a> passociations</code><dd>Perform the same function as the <code>associations command</code>, except that
1337 it uses previously stored data rather than making a new query.
1339 <br><dt><code><a name="pe"></a> peers</code><dd>Display a list of peers in the form:
1341 <code>[tally]remote refid st t when pool reach delay offset jitter</code>
1343 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1344 <br></th></tr><tr align="left"><td valign="top" width="10%"><code>[tally]</code>
1345 </td><td valign="top" width="20%">
1346 single-character code indicating current value of the <code>select</code> field
1347 of the <a href="decode.html#peer">peer status word</a>.
1349 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>remote</code>
1350 </td><td valign="top" width="20%">
1351 host name (or IP number) of peer
1353 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
1354 </td><td valign="top" width="20%">
1355 association ID or <a href="decode.html#kiss">kiss code</a>.
1357 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>st</code>
1358 </td><td valign="top" width="20%">
1361 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>t</code>
1362 </td><td valign="top" width="20%">
1363 <code>u</code>: unicast or manycast client,
1364 <code>b</code>: broadcast or multicast client,
1365 <code>l</code>: local (reference clock),
1366 <code>s</code>: symmetric (peer),
1367 <code>A</code>: manycast server,
1368 <code>B</code>: broadcast server,
1369 <code>M</code>: multicast server.
1371 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>when</code>
1372 </td><td valign="top" width="20%">
1373 sec/min/hr since last received packet
1375 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>poll</code>
1376 </td><td valign="top" width="20%">
1377 poll interval (log(2) s)
1379 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
1380 </td><td valign="top" width="20%">
1381 reach shift register (octal)
1383 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>delay</code>
1384 </td><td valign="top" width="20%">
1387 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
1388 </td><td valign="top" width="20%">
1389 offset of server relative to this host
1391 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>jitter</code>
1392 </td><td valign="top" width="20%">
1395 <br></td></tr></table>
1397 <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.
1398 If <kbd>assocID</kbd> is zero,
1399 the variables are from the <a href="#system">system variables</a> name space,
1400 otherwise they are from the <a href="#peer">peer variables</a> name space.
1401 The <kbd>assocID</kbd> is required, as the same name can occur in both spaces.
1402 If no <kbd>name</kbd> is included,
1403 all operative variables in the name space are displayed.
1404 In this case only, if the <kbd>assocID</kbd> is omitted, it is assumed zero.
1405 Multiple names are specified with comma separators and without whitespace.
1406 Note that time values are represented in milliseconds and
1407 frequency values in parts-per-million (PPM).
1408 Some NTP timestamps are represented in the format YYYYMMDDTTTT,
1409 where YYYY is the year, MM the month of year, DD the day of month and
1410 TTTT the time of day.
1412 <br><dt><code><a name="saveconfig"></a> saveconfig </code><kbd>filename</kbd><dd>Write the current configuration, including any runtime modifications
1413 given with <code>:config</code> or <code>config-from-file</code>,
1414 to the ntpd host's file <kbd>filename</kbd>.
1415 This command will be rejected by the server unless
1416 <a href="miscopt.html#saveconfigdir">saveconfigdir</a>
1417 appears in the <code>ntpd</code> configuration file.
1418 <kbd>filename</kbd> can use <code>strftime()</code> format specifiers
1419 to substitute the current date and time, for example,
1420 <code>saveconfig ntp-%Y%m%d-%H%M%S.conf</code>.
1421 The filename used is stored in system variable <code>savedconfig</code>.
1422 Authentication is required.
1424 <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.
1425 If the <kbd>assocID</kbd> is zero, the variables are from the
1426 <a href="#system">system variables</a> name space, otherwise they are from the
1427 <a href="#peer">peer variables</a> name space.
1428 The <kbd>assocID</kbd> is required,
1429 as the same name can occur in both spaces.
1431 <br><dt><code><a name="sysinfo"></a> sysinfo</code><dd>Display operational summary.
1433 <br><dt><code><a name="sysstats"></a> sysstats</code><dd>Print statistics counters maintained in the protocol module.
1439 <a name="Status-Words-and-Kiss-Codes"></a>Next: <a rel="next" accesskey="n" href="#System-Variables">System Variables</a>,
1440 Previous: <a rel="previous" accesskey="p" href="#Control-Message-Commands">Control Message Commands</a>,
1441 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1445 <!-- node-name, next, previous, up -->
1446 <h3 class="section">Status Words and Kiss Codes</h3>
1448 <p>The current state of the operating program is shown
1449 in a set of status words maintained by the system
1450 and each association separately.
1451 These words are displayed in the <code>rv</code> and <code>as</code> commands
1452 both in hexadecimal and decoded short tip strings.
1453 The codes, tips and short explanations are on the
1454 <a href="decode.html">Event Messages and Status Words</a> page.
1455 The page also includes a list of system and peer messages,
1456 the code for the latest of which is included in the status word.
1458 <p>Information resulting from protocol machine state transitions
1459 is displayed using an informal set of ASCII strings called
1460 <a href="decode.html#kiss">kiss codes</a>.
1461 The original purpose was for kiss-o'-death (KoD) packets sent
1462 by the server to advise the client of an unusual condition.
1463 They are now displayed, when appropriate,
1464 in the reference identifier field in various billboards.
1468 <a name="System-Variables"></a>Next: <a rel="next" accesskey="n" href="#Peer-Variables">Peer Variables</a>,
1469 Previous: <a rel="previous" accesskey="p" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>,
1470 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1474 <!-- node-name, next, previous, up -->
1475 <h3 class="section">System Variables</h3>
1477 <p>The following system variables appear in the <code>rv</code> billboard.
1478 Not all variables are displayed in some configurations.
1480 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1482 <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
1483 </td><td valign="top" width="20%">
1484 <a href="decode.html#sys">system status word</a>
1486 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>version</code>
1487 </td><td valign="top" width="20%">
1488 NTP software version and build time
1490 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>processor</code>
1491 </td><td valign="top" width="20%">
1492 hardware platform and version
1494 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>system</code>
1495 </td><td valign="top" width="20%">
1496 operating system and version
1498 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leap</code>
1499 </td><td valign="top" width="20%">
1500 leap warning indicator (0-3)
1502 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
1503 </td><td valign="top" width="20%">
1506 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>precision</code>
1507 </td><td valign="top" width="20%">
1508 precision (log(2) s)
1510 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdelay</code>
1511 </td><td valign="top" width="20%">
1512 total roundtrip delay to the primary reference clock
1514 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdisp</code>
1515 </td><td valign="top" width="20%">
1516 total dispersion to the primary reference clock
1518 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>peer</code>
1519 </td><td valign="top" width="20%">
1520 system peer association ID
1522 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>tc</code>
1523 time constant and poll exponent (log(2) s) (3-17)
1525 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>mintc</code>
1526 minimum time constant (log(2) s) (3-10)
1528 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clock</code>
1529 </td><td valign="top" width="20%">
1530 date and time of day
1532 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
1533 reference ID or <a href="decode.html#kiss">kiss code</a>
1535 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reftime</code>
1536 </td><td valign="top" width="20%">
1539 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
1540 </td><td valign="top" width="20%">
1541 combined offset of server relative to this host
1543 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>sys_jitter</code>
1544 </td><td valign="top" width="20%">
1545 combined system jitter
1547 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>frequency</code>
1548 </td><td valign="top" width="20%">
1549 frequency offset (PPM) relative to hardware clock
1551 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clk_wander</code>
1552 </td><td valign="top" width="20%">
1553 clock frequency wander (PPM)
1555 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clk_jitter</code>
1556 </td><td valign="top" width="20%">
1559 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>tai</code>
1560 </td><td valign="top" width="20%">
1563 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leapsec</code>
1564 </td><td valign="top" width="20%">
1565 NTP seconds when the next leap second is/was inserted
1567 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>expire</code>
1568 </td><td valign="top" width="20%">
1569 NTP seconds when the NIST leapseconds file expires
1571 <br></td></tr></table>
1573 <p>The jitter and wander statistics are exponentially-weighted RMS averages.
1574 The system jitter is defined in the NTPv4 specification;
1575 the clock jitter statistic is computed by the clock discipline module.
1577 <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
1578 additional system variables are displayed, including some or all of the
1579 following, depending on the particular Autokey dance:
1581 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1583 <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>host</code>
1584 </td><td valign="top" width="20%">
1585 Autokey host name for this host
1587 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>ident</code>
1588 </td><td valign="top" width="20%">
1589 Autokey group name for this host
1591 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
1592 </td><td valign="top" width="20%">
1593 host flags (see Autokey specification)
1595 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>digest</code>
1596 </td><td valign="top" width="20%">
1597 OpenSSL message digest algorithm
1599 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>signature</code>
1600 </td><td valign="top" width="20%">
1601 OpenSSL digest/signature scheme
1603 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>update</code>
1604 </td><td valign="top" width="20%">
1605 NTP seconds at last signature update
1607 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>cert</code>
1608 </td><td valign="top" width="20%">
1609 certificate subject, issuer and certificate flags
1611 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>until</code>
1612 </td><td valign="top" width="20%">
1613 NTP seconds when the certificate expires
1615 <br></td></tr></table>
1619 <a name="Peer-Variables"></a>Next: <a rel="next" accesskey="n" href="#Clock-Variables">Clock Variables</a>,
1620 Previous: <a rel="previous" accesskey="p" href="#System-Variables">System Variables</a>,
1621 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1625 <!-- node-name, next, previous, up -->
1626 <h3 class="section">Peer Variables</h3>
1628 <p>The following peer variables appear in the <code>rv</code> billboard
1629 for each association.
1630 Not all variables are displayed in some configurations.
1632 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1634 <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>associd</code>
1635 </td><td valign="top" width="20%">
1638 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
1639 </td><td valign="top" width="20%">
1640 <a href="decode.html#peer">peer status word</a>
1642 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>srcadr</code>
1643 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>srcport</code>
1644 </td><td valign="top" width="20%">
1645 source (remote) IP address and port
1647 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>dstadr</code>
1648 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>dstport</code>
1649 </td><td valign="top" width="20%">
1650 destination (local) IP address and port
1652 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leap</code>
1653 </td><td valign="top" width="20%">
1654 leap indicator (0-3)
1656 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
1657 </td><td valign="top" width="20%">
1660 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>precision</code>
1661 </td><td valign="top" width="20%">
1662 precision (log(2) s)
1664 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdelay</code>
1665 </td><td valign="top" width="20%">
1666 total roundtrip delay to the primary reference clock
1668 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdisp</code>
1669 </td><td valign="top" width="20%">total root dispersion to the primary reference clock
1671 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
1672 </td><td valign="top" width="20%">
1673 reference ID or <a href="decode.html#kiss">kiss code</a>
1675 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reftime</code>
1676 </td><td valign="top" width="20%">
1679 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
1680 </td><td valign="top" width="20%">
1681 reach register (octal)
1683 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>unreach</code>
1684 </td><td valign="top" width="20%">
1687 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>hmode</code>
1688 </td><td valign="top" width="20%">
1691 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>pmode</code>
1692 </td><td valign="top" width="20%">
1695 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>hpoll</code>
1696 </td><td valign="top" width="20%">
1697 host poll exponent (log(2) s) (3-17)
1698 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>ppoll</code>
1699 </td><td valign="top" width="20%">
1700 peer poll exponent (log(2) s) (3-17)
1702 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>headway</code>
1703 </td><td valign="top" width="20%">
1704 headway (see <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a>)
1706 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flash</code>
1707 </td><td valign="top" width="20%">
1708 <a href="decode.html#flash">flash status word</a>
1710 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
1711 </td><td valign="top" width="20%">
1714 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>delay</code>
1715 </td><td valign="top" width="20%">
1718 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>dispersion</code>
1719 </td><td valign="top" width="20%">
1722 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>jitter</code>
1723 </td><td valign="top" width="20%">
1726 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>ident</code>
1727 </td><td valign="top" width="20%">
1728 Autokey group name for this association
1730 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>bias</code>
1731 </td><td valign="top" width="20%">
1732 unicast/broadcast bias
1734 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>xleave</code>
1735 </td><td valign="top" width="20%">
1736 interleave delay (see <a href="xleave.html">NTP Interleaved Modes</a>)
1738 <br></td></tr></table>
1740 <p>The bias variable is calculated when the first broadcast packet is received
1741 after the calibration volley. It represents the offset of the broadcast
1742 subgraph relative to the unicast subgraph. The xleave variable appears
1743 only the interleaved symmetric and interleaved modes. It represents
1744 the internal queuing, buffering and transmission delays for the preceding
1747 <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
1748 additional peer variables are displayed, including the following:
1750 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1752 <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
1753 </td><td valign="top" width="20%">
1754 peer flags (see Autokey specification)
1756 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>host</code>
1757 </td><td valign="top" width="20%">
1760 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
1761 </td><td valign="top" width="20%">
1762 peer flags (see Autokey specification)
1764 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>signature</code>
1765 </td><td valign="top" width="20%">
1766 OpenSSL digest/signature scheme
1768 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>initsequence</code>
1769 </td><td valign="top" width="20%">
1772 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>initkey</code>
1773 </td><td valign="top" width="20%">
1776 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>timestamp</code>
1777 </td><td valign="top" width="20%">
1778 Autokey signature timestamp
1780 <br></td></tr></table>
1784 <a name="Clock-Variables"></a>Previous: <a rel="previous" accesskey="p" href="#Peer-Variables">Peer Variables</a>,
1785 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1789 <!-- node-name, next, previous, up -->
1790 <h3 class="section">Clock Variables</h3>
1792 <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.
1794 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1795 <br></th></tr><tr align="left"><td valign="top" width="10%"><code>associd</code>
1796 </td><td valign="top" width="20%">association ID
1797 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
1798 </td><td valign="top" width="20%"><a href="decode.html#clock">clock status word</a>
1799 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>device</code>
1800 </td><td valign="top" width="20%">device description
1801 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>timecode</code>
1802 </td><td valign="top" width="20%">ASCII time code string (specific to device)
1803 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>poll</code>
1804 </td><td valign="top" width="20%">poll messages sent
1805 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>noreply</code>
1806 </td><td valign="top" width="20%">no reply
1807 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>badformat</code>
1808 </td><td valign="top" width="20%">bad format
1809 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>baddata</code>
1810 </td><td valign="top" width="20%">bad date or time
1811 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>fudgetime1</code>
1812 </td><td valign="top" width="20%">fudge time 1
1813 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>fudgetime2</code>
1814 </td><td valign="top" width="20%">fudge time 2
1815 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
1816 </td><td valign="top" width="20%">driver stratum
1817 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
1818 </td><td valign="top" width="20%">driver reference ID
1819 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
1820 </td><td valign="top" width="20%">driver flags
1821 <br></td></tr></table>