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.8p2 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.
287 to a key number the server has been configured to use for this
289 <br><dt><code>keytype</code> <code>[md5 | OpenSSLDigestType]</code><dd>Specify the type of key to use for authenticating requests.
294 was built with OpenSSL support,
295 any digest type supported by OpenSSL can also be provided.
296 If no argument is given, the current
299 <br><dt><code>ntpversion</code> <code>[1 | 2 | 3 | 4]</code><dd>Sets the NTP version number which
303 Defaults to 3, and note that mode 6 control messages (and
304 modes, for that matter) didn't exist in NTP version 1.
306 to be no servers left which demand version 1.
307 With no argument, displays the current NTP version that will be used
308 when communicating with servers.
309 <br><dt><code>passwd</code><dd>This command prompts you to type in a password (which will not
310 be echoed) which will be used to authenticate configuration
312 The password must correspond to the key configured for
313 use by the NTP server for this purpose if such requests are to be
318 <br><dt><code>quit</code><dd>Exit
320 <br><dt><code>raw</code><dd>Causes all output from query commands is printed as received
321 from the remote server.
322 The only formating/interpretation done on
323 the data is to transform nonascii data into a printable (but barely
324 understandable) form.
325 <br><dt><code>timeout</code> <kbd>milliseconds</kbd><dd>Specify a timeout period for responses to server queries.
327 default is about 5000 milliseconds.
330 retries each query once after a timeout, the total waiting time for
331 a timeout will be twice the timeout value set.
332 <br><dt><code>version</code><dd>Print the version of the
337 <h5 class="subsubsection">Control Message Commands</h5>
339 <p>Association IDs are used to identify system, peer and clock variables.
340 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.
341 Most control commands send a single mode-6 message to the server and expect a single response message.
342 The exceptions are the
344 command, which sends a series of messages,
346 <code>mreadlist</code>
348 <code>mreadvar</code>
349 commands, which iterate over a range of associations.
351 <dt><code>associations</code><dd>Display a list of mobilized associations in the form:
352 <pre class="example"> ind assid status conf reach auth condition last_event cnt
355 <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>
356 <br><dt><code>authinfo</code><dd>Display the authentication statistics.
357 <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.
358 <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.
359 <br><dt><code>config-from-file</code> <kbd>filename</kbd><dd>Send the each line of
361 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.
362 <br><dt><code>ifstats</code><dd>Display statistics for each local network address. Authentication is required.
363 <br><dt><code>iostats</code><dd>Display network and reference clock I/O statistics.
364 <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.
365 <br><dt><code>lassociations</code><dd>Perform the same function as the associations command, except display mobilized and unmobilized associations.
366 <br><dt><code>lopeers</code> <code>[-4 | -6]</code><dd>Obtain and print a list of all peers and clients showing
368 (associated with any given IP version).
369 <br><dt><code>lpeers</code> <code>[-4 | -6]</code><dd>Print a peer spreadsheet for the appropriate IP version(s).
371 (associated with any given IP version).
372 <br><dt><code>monstats</code><dd>Display monitor facility statistics.
373 <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.
374 With the exception of
375 <code>sort</code>=<kbd>sortorder</kbd>,
376 the options filter the list returned by
382 options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
384 <code>mincount</code>=<kbd>count</kbd>
385 option filters entries representing less than
389 <code>laddr</code>=<kbd>localaddr</kbd>
390 option filters entries for packets received on any local address other than
391 <kbd>localaddr</kbd>.
392 <code>resany</code>=<kbd>hexmask</kbd>
394 <code>resall</code>=<kbd>hexmask</kbd>
395 filter entries containing none or less than all, respectively, of the bits in
397 which must begin with
408 or any of those preceded by a minus sign (hyphen) to reverse the sort order.
409 The output columns are:
411 <dt>Column<dd>Description
412 <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
414 <br><dt><code>avgint</code><dd>Average interval in s between packets from this address.
415 <br><dt><code>rstr</code><dd>Restriction flags associated with this address.
416 Most are copied unchanged from the matching
417 <code>restrict</code>
418 command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
419 <br><dt><code>r</code><dd>Rate control indicator, either
424 for no rate control response,
425 rate limiting by discarding, or rate limiting with a KoD response, respectively.
426 <br><dt><code>m</code><dd>Packet mode.
427 <br><dt><code>v</code><dd>Packet version number.
428 <br><dt><code>count</code><dd>Packets received from this address.
429 <br><dt><code>rport</code><dd>Source port of last packet from this address.
430 <br><dt><code>remote</code> <code>address</code><dd>DNS name, numeric address, or address followed by
431 claimed DNS name which could not be verified in parentheses.
433 <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
435 command, except for a range of association IDs.
436 This range is determined from the association list cached by the most recent
437 <code>associations</code>
439 <br><dt><code>opeers</code> <code>[-4 | -6]</code><dd>Obtain and print the old-style list of all peers and clients showing
441 (associated with any given IP version),
444 <br><dt><code>passociations</code><dd>Perform the same function as the
445 <code>associations</code>
447 except that it uses previously stored data rather than making a new query.
448 <br><dt><code>peers</code><dd>Display a list of peers in the form:
449 <pre class="example"> [tally]remote refid st t when pool reach delay offset jitter
452 <dt>Variable<dd>Description
453 <br><dt><code>[tally]</code><dd>single-character code indicating current value of the
456 .Lk decode.html#peer "peer status word"
457 <br><dt><code>remote</code><dd>host name (or IP number) of peer.
458 The value displayed will be truncated to 15 characters unless the
460 flag is given, in which case the full value will be displayed
462 and the remaining data is displayed on the next line.
463 <br><dt><code>refid</code><dd>association ID or
464 .Lk decode.html#kiss "'kiss code"
465 <br><dt><code>st</code><dd>stratum
466 <br><dt><code>t</code><dd><code>u</code>:
467 unicast or manycast client,
469 broadcast or multicast client,
471 local (reference clock),
480 <br><dt><code>when</code><dd>sec/min/hr since last received packet
481 <br><dt><code>poll</code><dd>poll interval (log2 s)
482 <br><dt><code>reach</code><dd>reach shift register (octal)
483 <br><dt><code>delay</code><dd>roundtrip delay
484 <br><dt><code>offset</code><dd>offset of server relative to this host
485 <br><dt><code>jitter</code><dd>jitter
487 <br><dt><code>pstats</code> <kbd>assocID</kbd><dd>Show the statistics for the peer with the given
489 <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.
490 <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.
493 is zero, the variables are from the
494 <a href="#System-Variables">System Variables</a>
495 name space, otherwise they are from the
496 <a href="#Peer-Variables">Peer Variables</a>
500 is required, as the same name can occur in both spaces.
503 is included, all operative variables in the name space are displayed.
505 <p>In this case only, if the
507 is omitted, it is assumed zero.
508 Multiple names are specified with comma separators and without whitespace.
509 Note that time values are represented in milliseconds
510 and frequency values in parts-per-million (PPM).
511 Some NTP timestamps are represented in the format
513 where YYYY is the year,
514 MM the month of year,
515 DD the day of month and
516 TTTT the time of day.
517 <br><dt><code>reslist</code><dd>Show the access control (restrict) list for
520 <br><dt><code>saveconfig</code> <kbd>filename</kbd><dd>Write the current configuration,
521 including any runtime modifications given with
524 <code>config-from-file</code>,
525 to the ntpd host's file
527 This command will be rejected by the server unless
528 .Lk miscopt.html#saveconfigdir "saveconfigdir"
534 <code>strftime()</code>
535 format specifies to substitute the current date and time, for example,
536 <code>q]saveconfig</code> <code>ntp-%Y%m%d-%H%M%S.confq]</code>.
537 The filename used is stored in system variable
538 <code>savedconfig</code>.
539 Authentication is required.
540 <br><dt><code>timerstats</code><dd>Display interval timer counters.
541 <br><dt><code>writelist</code> <kbd>assocID</kbd><dd>Write the system or peer variables included in the variable list.
542 <br><dt><code>writevar</code> <kbd>assocID</kbd> <kbd>name</kbd>=<kbd>value</kbd> <code>[, ...]</code><dd>Write the specified variables.
545 is zero, the variables are from the
546 <a href="#System-Variables">System Variables</a>
547 name space, otherwise they are from the
548 <a href="#Peer-Variables">Peer Variables</a>
552 is required, as the same name can occur in both spaces.
553 <br><dt><code>sysinfo</code><dd>Display operational summary.
554 <br><dt><code>sysstats</code><dd>Print statistics counters maintained in the protocol module.
557 <h5 class="subsubsection">Status Words and Kiss Codes</h5>
559 <p>The current state of the operating program is shown
560 in a set of status words
561 maintained by the system.
562 Status information is also available on a per-association basis.
563 These words are displayed in the
567 commands both in hexadecimal and in decoded short tip strings.
568 The codes, tips and short explanations are documented on the
569 .Lk decode.html "Event Messages and Status Words"
571 The page also includes a list of system and peer messages,
572 the code for the latest of which is included in the status word.
574 <p>Information resulting from protocol machine state transitions
575 is displayed using an informal set of ASCII strings called
576 .Lk decode.html#kiss "kiss codes" .
577 The original purpose was for kiss-o'-death (KoD) packets
578 sent by the server to advise the client of an unusual condition.
579 They are now displayed, when appropriate,
580 in the reference identifier field in various billboards.
582 <h5 class="subsubsection">System Variables</h5>
584 <p>The following system variables appear in the
587 Not all variables are displayed in some configurations.
589 <dt>Variable<dd>Description
590 <br><dt><code>status</code><dd>.Lk decode.html#sys "system status word"
591 <br><dt><code>version</code><dd>NTP software version and build time
592 <br><dt><code>processor</code><dd>hardware platform and version
593 <br><dt><code>system</code><dd>operating system and version
594 <br><dt><code>leap</code><dd>leap warning indicator (0-3)
595 <br><dt><code>stratum</code><dd>stratum (1-15)
596 <br><dt><code>precision</code><dd>precision (log2 s)
597 <br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock
598 <br><dt><code>rootdisp</code><dd>total dispersion to the primary reference clock
599 <br><dt><code>peer</code><dd>system peer association ID
600 <br><dt><code>tc</code><dd>time constant and poll exponent (log2 s) (3-17)
601 <br><dt><code>mintc</code><dd>minimum time constant (log2 s) (3-10)
602 <br><dt><code>clock</code><dd>date and time of day
603 <br><dt><code>refid</code><dd>reference ID or
604 .Lk decode.html#kiss "kiss code"
605 <br><dt><code>reftime</code><dd>reference time
606 <br><dt><code>offset</code><dd>combined offset of server relative to this host
607 <br><dt><code>sys_jitter</code><dd>combined system jitter
608 <br><dt><code>frequency</code><dd>frequency offset (PPM) relative to hardware clock
609 <br><dt><code>clk_wander</code><dd>clock frequency wander (PPM)
610 <br><dt><code>clk_jitter</code><dd>clock jitter
611 <br><dt><code>tai</code><dd>TAI-UTC offset (s)
612 <br><dt><code>leapsec</code><dd>NTP seconds when the next leap second is/was inserted
613 <br><dt><code>expire</code><dd>NTP seconds when the NIST leapseconds file expires
615 The jitter and wander statistics are exponentially-weighted RMS averages.
616 The system jitter is defined in the NTPv4 specification;
617 the clock jitter statistic is computed by the clock discipline module.
619 <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
620 additional system variables are displayed,
621 including some or all of the following,
622 depending on the particular Autokey dance:
625 <dt>Variable<dd>Description
626 <br><dt><code>host</code><dd>Autokey host name for this host
627 <br><dt><code>ident</code><dd>Autokey group name for this host
628 <br><dt><code>flags</code><dd>host flags (see Autokey specification)
629 <br><dt><code>digest</code><dd>OpenSSL message digest algorithm
630 <br><dt><code>signature</code><dd>OpenSSL digest/signature scheme
631 <br><dt><code>update</code><dd>NTP seconds at last signature update
632 <br><dt><code>cert</code><dd>certificate subject, issuer and certificate flags
633 <br><dt><code>until</code><dd>NTP seconds when the certificate expires
636 <h5 class="subsubsection">Peer Variables</h5>
638 <p>The following peer variables appear in the
640 billboard for each association.
641 Not all variables are displayed in some configurations.
644 <dt>Variable<dd>Description
645 <br><dt><code>associd</code><dd>association ID
646 <br><dt><code>status</code><dd>.Lk decode.html#peer "peer status word"
647 <br><dt><code>srcadr</code><dd>source (remote) IP address
648 <br><dt><code>srcport</code><dd>source (remote) port
649 <br><dt><code>dstadr</code><dd>destination (local) IP address
650 <br><dt><code>dstport</code><dd>destination (local) port
651 <br><dt><code>leap</code><dd>leap indicator (0-3)
652 <br><dt><code>stratum</code><dd>stratum (0-15)
653 <br><dt><code>precision</code><dd>precision (log2 s)
654 <br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock
655 <br><dt><code>rootdisp</code><dd>total root dispersion to the primary reference clock
656 <br><dt><code>refid</code><dd>reference ID or
657 .Lk decode.html#kiss "kiss code"
658 <br><dt><code>reftime</code><dd>reference time
659 <br><dt><code>reach</code><dd>reach register (octal)
660 <br><dt><code>unreach</code><dd>unreach counter
661 <br><dt><code>hmode</code><dd>host mode (1-6)
662 <br><dt><code>pmode</code><dd>peer mode (1-5)
663 <br><dt><code>hpoll</code><dd>host poll exponent (log2 s) (3-17)
664 <br><dt><code>ppoll</code><dd>peer poll exponent (log2 s) (3-17)
665 <br><dt><code>headway</code><dd>headway (see
666 .Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
667 <br><dt><code>flash</code><dd>.Lk decode.html#flash "flash status word"
668 <br><dt><code>offset</code><dd>filter offset
669 <br><dt><code>delay</code><dd>filter delay
670 <br><dt><code>dispersion</code><dd>filter dispersion
671 <br><dt><code>jitter</code><dd>filter jitter
672 <br><dt><code>ident</code><dd>Autokey group name for this association
673 <br><dt><code>bias</code><dd>unicast/broadcast bias
674 <br><dt><code>xleave</code><dd>interleave delay (see
675 .Lk xleave.html "NTP Interleaved Modes" )
679 variable is calculated when the first broadcast packet is received
680 after the calibration volley.
681 It represents the offset of the broadcast subgraph relative to the unicast subgraph.
684 variable appears only for the interleaved symmetric and interleaved modes.
685 It represents the internal queuing, buffering and transmission delays
686 for the preceding packet.
688 <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
689 additional peer variables are displayed, including the following:
691 <dt>Variable<dd>Description
692 <br><dt><code>flags</code><dd>peer flags (see Autokey specification)
693 <br><dt><code>host</code><dd>Autokey server name
694 <br><dt><code>flags</code><dd>peer flags (see Autokey specification)
695 <br><dt><code>signature</code><dd>OpenSSL digest/signature scheme
696 <br><dt><code>initsequence</code><dd>initial key ID
697 <br><dt><code>initkey</code><dd>initial key index
698 <br><dt><code>timestamp</code><dd>Autokey signature timestamp
701 <h5 class="subsubsection">Clock Variables</h5>
703 <p>The following clock variables appear in the
705 billboard for each association with a reference clock.
706 Not all variables are displayed in some configurations.
708 <dt>Variable<dd>Description
709 <br><dt><code>associd</code><dd>association ID
710 <br><dt><code>status</code><dd>.Lk decode.html#clock "clock status word"
711 <br><dt><code>device</code><dd>device description
712 <br><dt><code>timecode</code><dd>ASCII time code string (specific to device)
713 <br><dt><code>poll</code><dd>poll messages sent
714 <br><dt><code>noreply</code><dd>no reply
715 <br><dt><code>badformat</code><dd>bad format
716 <br><dt><code>baddata</code><dd>bad date or time
717 <br><dt><code>fudgetime1</code><dd>fudge time 1
718 <br><dt><code>fudgetime2</code><dd>fudge time 2
719 <br><dt><code>stratum</code><dd>driver stratum
720 <br><dt><code>refid</code><dd>driver reference ID
721 <br><dt><code>flags</code><dd>driver flags
724 <p>This section was generated by <strong>AutoGen</strong>,
725 using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpq</code> program.
726 This software is released under the NTP license, <http://ntp.org/license>.
729 <li><a accesskey="1" href="#ntpq-usage">ntpq usage</a>: ntpq help/usage (<span class="option">--help</span>)
730 <li><a accesskey="2" href="#ntpq-ipv4">ntpq ipv4</a>: ipv4 option (-4)
731 <li><a accesskey="3" href="#ntpq-ipv6">ntpq ipv6</a>: ipv6 option (-6)
732 <li><a accesskey="4" href="#ntpq-command">ntpq command</a>: command option (-c)
733 <li><a accesskey="5" href="#ntpq-interactive">ntpq interactive</a>: interactive option (-i)
734 <li><a accesskey="6" href="#ntpq-numeric">ntpq numeric</a>: numeric option (-n)
735 <li><a accesskey="7" href="#ntpq-old_002drv">ntpq old-rv</a>: old-rv option
736 <li><a accesskey="8" href="#ntpq-peers">ntpq peers</a>: peers option (-p)
737 <li><a accesskey="9" href="#ntpq-wide">ntpq wide</a>: wide option (-w)
738 <li><a href="#ntpq-config">ntpq config</a>: presetting/configuring ntpq
739 <li><a href="#ntpq-exit-status">ntpq exit status</a>: exit status
744 <a name="ntpq-usage"></a>Next: <a rel="next" accesskey="n" href="#ntpq-ipv4">ntpq ipv4</a>,
745 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
749 <h4 class="subsection">ntpq help/usage (<span class="option">--help</span>)</h4>
751 <p><a name="index-ntpq-help-3"></a>
752 This is the automatically generated usage text for ntpq.
754 <p>The text printed is the same whether selected with the <code>help</code> option
755 (<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
756 the usage text by passing it through a pager program.
757 <code>more-help</code> is disabled on platforms without a working
758 <code>fork(2)</code> function. The <code>PAGER</code> environment variable is
759 used to select the program, defaulting to <span class="file">more</span>. Both will exit
760 with a status code of 0.
762 <pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p2-RC3
763 Usage: ntpq [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]
764 Flg Arg Option-Name Description
765 -4 no ipv4 Force IPv4 DNS name resolution
766 - prohibits the option 'ipv6'
767 -6 no ipv6 Force IPv6 DNS name resolution
768 - prohibits the option 'ipv4'
769 -c Str command run a command and exit
770 - may appear multiple times
771 -d no debug-level Increase debug verbosity level
772 - may appear multiple times
773 -D Num set-debug-level Set the debug verbosity level
774 - may appear multiple times
775 -i no interactive Force ntpq to operate in interactive mode
776 - prohibits these options:
779 -n no numeric numeric host addresses
780 no old-rv Always output status line with readvar
781 -p no peers Print a list of the peers
782 - prohibits the option 'interactive'
783 -w no wide Display the full 'remote' value
784 opt version output version information and exit
785 -? no help display extended usage information and exit
786 -! no more-help extended usage information passed thru pager
787 -> opt save-opts save the option state to a config file
788 -< Str load-opts load options from a config file
789 - disabled as '--no-load-opts'
790 - may appear multiple times
792 Options are specified by doubled hyphens and their name or by a single
793 hyphen and the flag character.
795 The following option preset mechanisms are supported:
796 - reading file $HOME/.ntprc
797 - reading file ./.ntprc
798 - examining environment variables named NTPQ_*
800 Please send bug reports to: <http://bugs.ntp.org, bugs@ntp.org>
804 <a name="ntpq-ipv4"></a>Next: <a rel="next" accesskey="n" href="#ntpq-ipv6">ntpq ipv6</a>,
805 Previous: <a rel="previous" accesskey="p" href="#ntpq-usage">ntpq usage</a>,
806 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
810 <h4 class="subsection">ipv4 option (-4)</h4>
812 <p><a name="index-ntpq_002dipv4-4"></a>
813 This is the “force ipv4 dns name resolution” option.
815 <p class="noindent">This option has some usage constraints. It:
817 <li>must not appear in combination with any of the following options:
821 <p>Force DNS resolution of following host names on the command line
822 to the IPv4 namespace.
825 <a name="ntpq-ipv6"></a>Next: <a rel="next" accesskey="n" href="#ntpq-command">ntpq command</a>,
826 Previous: <a rel="previous" accesskey="p" href="#ntpq-ipv4">ntpq ipv4</a>,
827 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
831 <h4 class="subsection">ipv6 option (-6)</h4>
833 <p><a name="index-ntpq_002dipv6-5"></a>
834 This is the “force ipv6 dns name resolution” option.
836 <p class="noindent">This option has some usage constraints. It:
838 <li>must not appear in combination with any of the following options:
842 <p>Force DNS resolution of following host names on the command line
843 to the IPv6 namespace.
846 <a name="ntpq-command"></a>Next: <a rel="next" accesskey="n" href="#ntpq-interactive">ntpq interactive</a>,
847 Previous: <a rel="previous" accesskey="p" href="#ntpq-ipv6">ntpq ipv6</a>,
848 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
852 <h4 class="subsection">command option (-c)</h4>
854 <p><a name="index-ntpq_002dcommand-6"></a>
855 This is the “run a command and exit” option.
856 This option takes a string argument <span class="file">cmd</span>.
858 <p class="noindent">This option has some usage constraints. It:
860 <li>may appear an unlimited number of times.
863 <p>The following argument is interpreted as an interactive format command
864 and is added to the list of commands to be executed on the specified
868 <a name="ntpq-interactive"></a>Next: <a rel="next" accesskey="n" href="#ntpq-numeric">ntpq numeric</a>,
869 Previous: <a rel="previous" accesskey="p" href="#ntpq-command">ntpq command</a>,
870 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
874 <h4 class="subsection">interactive option (-i)</h4>
876 <p><a name="index-ntpq_002dinteractive-7"></a>
877 This is the “force ntpq to operate in interactive mode” option.
879 <p class="noindent">This option has some usage constraints. It:
881 <li>must not appear in combination with any of the following options:
885 <p>Force <code>ntpq</code> to operate in interactive mode.
886 Prompts will be written to the standard output and
887 commands read from the standard input.
890 <a name="ntpq-numeric"></a>Next: <a rel="next" accesskey="n" href="#ntpq-old_002drv">ntpq old-rv</a>,
891 Previous: <a rel="previous" accesskey="p" href="#ntpq-interactive">ntpq interactive</a>,
892 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
896 <h4 class="subsection">numeric option (-n)</h4>
898 <p><a name="index-ntpq_002dnumeric-8"></a>
899 This is the “numeric host addresses” option.
900 Output all host addresses in dotted-quad numeric format rather than
901 converting to the canonical host names.
904 <a name="ntpq-old_002drv"></a>Next: <a rel="next" accesskey="n" href="#ntpq-peers">ntpq peers</a>,
905 Previous: <a rel="previous" accesskey="p" href="#ntpq-numeric">ntpq numeric</a>,
906 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
910 <h4 class="subsection">old-rv option</h4>
912 <p><a name="index-ntpq_002dold_002drv-9"></a>
913 This is the “always output status line with readvar” option.
914 By default, <code>ntpq</code> now suppresses the <code>associd=...</code>
915 line that precedes the output of <code>readvar</code>
916 (alias <code>rv</code>) when a single variable is requested, such as
917 <code>ntpq -c "rv 0 offset"</code>.
918 This option causes <code>ntpq</code> to include both lines of output
919 for a single-variable <code>readvar</code>.
920 Using an environment variable to
921 preset this option in a script will enable both older and
922 newer <code>ntpq</code> to behave identically in this regard.
925 <a name="ntpq-peers"></a>Next: <a rel="next" accesskey="n" href="#ntpq-wide">ntpq wide</a>,
926 Previous: <a rel="previous" accesskey="p" href="#ntpq-old_002drv">ntpq old-rv</a>,
927 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
931 <h4 class="subsection">peers option (-p)</h4>
933 <p><a name="index-ntpq_002dpeers-10"></a>
934 This is the “print a list of the peers” option.
936 <p class="noindent">This option has some usage constraints. It:
938 <li>must not appear in combination with any of the following options:
942 <p>Print a list of the peers known to the server as well as a summary
943 of their state. This is equivalent to the 'peers' interactive command.
946 <a name="ntpq-wide"></a>Next: <a rel="next" accesskey="n" href="#ntpq-config">ntpq config</a>,
947 Previous: <a rel="previous" accesskey="p" href="#ntpq-peers">ntpq peers</a>,
948 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
952 <h4 class="subsection">wide option (-w)</h4>
954 <p><a name="index-ntpq_002dwide-11"></a>
955 This is the “display the full 'remote' value” option.
956 Display the full value of the 'remote' value. If this requires
957 more than 15 characters, display the full value, emit a newline,
958 and continue the data display properly indented on the next line.
962 <a name="ntpq-config"></a>Next: <a rel="next" accesskey="n" href="#ntpq-exit-status">ntpq exit status</a>,
963 Previous: <a rel="previous" accesskey="p" href="#ntpq-wide">ntpq wide</a>,
964 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
968 <h4 class="subsection">presetting/configuring ntpq</h4>
970 <p>Any option that is not marked as <i>not presettable</i> may be preset by
971 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
972 the options listed above in upper case and segmented with underscores.
973 The <code>NTPQ</code> variable will be tokenized and parsed like
974 the command line. The remaining variables are tested for existence and their
975 values are treated like option arguments.
977 <p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
982 The environment variables <code>HOME</code>, and <code>PWD</code>
983 are expanded and replaced when <span class="file">ntpq</span> runs.
984 For any of these that are plain files, they are simply processed.
985 For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
986 within that directory and processed.
988 <p>Configuration files may be in a wide variety of formats.
989 The basic format is an option name followed by a value (argument) on the
990 same line. Values may be separated from the option name with a colon,
991 equal sign or simply white space. Values may be continued across multiple
992 lines by escaping the newline with a backslash.
994 <p>Multiple programs may also share the same initialization file.
995 Common options are collected at the top, followed by program specific
996 segments. The segments are separated by lines like:
997 <pre class="example"> [NTPQ]
999 <p class="noindent">or by
1000 <pre class="example"> <?program ntpq>
1002 <p class="noindent">Do not mix these styles within one configuration file.
1004 <p>Compound values and carefully constructed string values may also be
1005 specified using XML syntax:
1006 <pre class="example"> <option-name>
1007 <sub-opt>...&lt;...&gt;...</sub-opt>
1008 </option-name>
1010 <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
1011 <pre class="example"> "...<...>..."
1013 <p><code>AutoOpts</code> does not track suboptions. You simply note that it is a
1014 hierarchicly valued option. <code>AutoOpts</code> does provide a means for searching
1015 the associated name/value pair list (see: optionFindValue).
1017 <p>The command line options relating to configuration and/or usage help are:
1019 <h5 class="subsubheading">version (-)</h5>
1021 <p>Print the program version to standard out, optionally with licensing
1022 information, then exit 0. The optional argument specifies how much licensing
1023 detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
1024 Only the first letter of the argument is examined:
1027 <dt><span class="samp">version</span><dd>Only print the version. This is the default.
1028 <br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
1029 <br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
1034 <a name="ntpq-exit-status"></a>Previous: <a rel="previous" accesskey="p" href="#ntpq-config">ntpq config</a>,
1035 Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
1039 <h4 class="subsection">ntpq exit status</h4>
1041 <p>One of the following exit values will be returned:
1043 <dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
1044 <br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
1045 <br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded.
1046 <br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report
1047 it to autogen-users@lists.sourceforge.net. Thank you.
1052 <a name="Usage"></a>Next: <a rel="next" accesskey="n" href="#Internal-Commands">Internal Commands</a>,
1053 Previous: <a rel="previous" accesskey="p" href="#ntpq-Description">ntpq Description</a>,
1054 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1058 <!-- node-name, next, previous, up -->
1059 <h3 class="section">Usage</h3>
1061 <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
1062 <br></th></tr><tr align="left"><td valign="top" width="23%">configuration file
1063 </td><td valign="top" width="23%"><code>/etc/ntp.conf</code>
1064 </td><td valign="top" width="5%"><code>-c</code>
1065 </td><td valign="top" width="15%"><code>conffile</code>
1066 <br></td></tr><tr align="left"><td valign="top" width="23%">frequency file
1067 </td><td valign="top" width="23%">none
1068 </td><td valign="top" width="5%"><code>-f</code>
1069 </td><td valign="top" width="15%"><code>driftfile</code>
1070 <br></td></tr><tr align="left"><td valign="top" width="23%">leapseconds file
1071 </td><td valign="top" width="23%">none
1072 </td><td valign="top" width="5%">
1073 </td><td valign="top" width="15%"><code>leapfile</code>
1074 <br></td></tr><tr align="left"><td valign="top" width="23%">process ID file
1075 </td><td valign="top" width="23%">none
1076 </td><td valign="top" width="5%"><code>-p</code>
1077 </td><td valign="top" width="15%"><code>pidfile</code>
1078 <br></td></tr><tr align="left"><td valign="top" width="23%">log file
1079 </td><td valign="top" width="23%">system log
1080 </td><td valign="top" width="5%"><code>-l</code>
1081 </td><td valign="top" width="15%"><code>logfile</code>
1082 <br></td></tr><tr align="left"><td valign="top" width="23%">include file
1083 </td><td valign="top" width="23%">none
1084 </td><td valign="top" width="5%">none
1085 </td><td valign="top" width="15%"><code>includefile</code>
1086 <br></td></tr><tr align="left"><td valign="top" width="23%">statistics path
1087 </td><td valign="top" width="23%"><code>/var/NTP</code>
1088 </td><td valign="top" width="5%"><code>-s</code>
1089 </td><td valign="top" width="15%"><code>statsdir</code>
1090 <br></td></tr><tr align="left"><td valign="top" width="23%">keys path
1091 </td><td valign="top" width="23%"><code>/usr/local/etc</code>
1092 </td><td valign="top" width="5%"><code>-k</code>
1093 </td><td valign="top" width="15%"><code>keysdir</code>
1094 <br></td></tr></table>
1098 <a name="Internal-Commands"></a>Next: <a rel="next" accesskey="n" href="#Control-Message-Commands">Control Message Commands</a>,
1099 Previous: <a rel="previous" accesskey="p" href="#Usage">Usage</a>,
1100 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1104 <!-- node-name, next, previous, up -->
1105 <h3 class="section">Internal Commands</h3>
1107 <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.
1110 <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.
1112 <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
1113 <kbd>name</kbd><code> = </code><kbd>value</kbd>, where the <code>= </code><kbd>value</kbd> is ignored,
1114 and can be omitted in read requests.
1115 <code>ntpq</code> maintains an internal list in which data to be included
1116 in control messages can be assembled, and sent using the <code>readlist</code>
1117 and <code>writelist</code> commands described below.
1118 The <code>addvars</code> command allows variables and optional values
1119 to be added to the list.
1120 If more than one variable is to be added
1121 the list should be comma-separated and not contain white space.
1122 The <code>rmvars</code> command can be used to remove individual variables
1124 while the <code>clearlist</code> command removes all variables from the list.
1126 <br><dt><code><a name="cooked"></a> cooked</code><dd>Display server messages in prettyprint format.
1128 <br><dt><code><a name="debug"></a> debug more | less | off</code><dd>Turns internal query program debugging on and off.
1130 <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.
1132 <br><dt><code><a name="host"></a> host </code><kbd>name</kbd><dd>Set the host to which future queries will be sent.
1133 The name may be either a DNS name or a numeric address.
1135 <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.
1136 If <code>no</code> is specified, numeric addresses are printed instead.
1137 The default is <code>yes</code>,
1138 unless modified using the command line <code>-n</code> switch.
1140 <br><dt><code><a name="keyid"></a> keyid </code><kbd>keyid</kbd><dd>This command specifies the key number to be used
1141 to authenticate configuration requests.
1142 This must correspond to a key ID configured in <code>ntp.conf</code> for this purpose.
1144 <br><dt><code><a name="keytype"></a> keytype</code><dd>Specify the digest algorithm to use for authenticated requests,
1145 with default <code>MD5</code>.
1146 If the OpenSSL library is installed,
1147 digest can be be any message digest algorithm supported by the library.
1148 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>.
1150 <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.
1152 Note that mode-6 control messages (and modes, for that matter)
1153 didn't exist in NTP version 1.
1155 <br><dt><code><a name="passwd"></a> passwd</code><dd>This command prompts for a password to authenticate requests.
1156 The password must correspond to the key ID configured in <code>ntp.conf</code> for this purpose.
1158 <br><dt><code><a name="quit"></a> quit</code><dd>Exit <code>ntpq</code>.
1160 <br><dt><code><a name="raw"></a> raw</code><dd>Display server messages as received and without reformatting.
1162 <br><dt><code><a name="timeout"></a> timeout </code><kbd>millseconds</kbd><dd>Specify a timeout period for responses to server queries.
1163 The default is about 5000 milliseconds.
1164 Note that since <code>ntpq</code> retries each query once after a timeout
1165 the total waiting time for a timeout will be twice the timeout value set.
1171 <a name="Control-Message-Commands"></a>Next: <a rel="next" accesskey="n" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>,
1172 Previous: <a rel="previous" accesskey="p" href="#Internal-Commands">Internal Commands</a>,
1173 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1177 <!-- node-name, next, previous, up -->
1178 <h3 class="section">Control Message Commands</h3>
1180 <p>Association IDs are used to identify system, peer and clock variables.
1181 System variables are assigned an association ID of zero and system name space,
1182 while each association is assigned a nonzero association ID and peer namespace.
1183 Most control commands send a single mode-6 message to the server
1184 and expect a single response message.
1185 The exceptions are the <code>peers</code> command,
1186 which sends a series of messages,
1187 and the <code>mreadlist</code> and <code>mreadvar</code> commands,
1188 which iterate over a range of associations.
1190 <p><a name="as"></a>
1192 <dt><code>associations</code><dd>Display a list of mobilized associations in the form:
1194 <code>ind assid status conf reach auth condition last_event cnt</code>
1196 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="40%">Description
1198 <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>ind</code>
1199 </td><td valign="top" width="40%">index on this list
1201 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>assid</code>
1202 </td><td valign="top" width="40%">association ID
1204 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
1205 </td><td valign="top" width="40%"><a href="decode.html#peer">peer status word</a>
1207 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>conf</code>
1208 </td><td valign="top" width="40%"><code>yes</code>: persistent, <code>no</code>: ephemeral
1210 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
1211 </td><td valign="top" width="40%"><code>yes</code>: reachable, <code>no</code>: unreachable
1213 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>auth</code>
1214 </td><td valign="top" width="40%"><code>ok</code>, <code>yes</code>, <code>bad</code> and <code>none</code>
1216 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>condition</code>
1217 </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>)
1219 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>last_event</code>
1220 </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>)
1222 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>cnt</code>
1223 event count (see the <code>count</code> field of the <a href="decode.html#peer">peer status word</a>)
1225 <br></td></tr></table>
1227 <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.
1229 <br><dt><code><a name="_003aconfig"></a> :config [...]</code><dd>Send the remainder of the command line, including whitespace, to the server
1230 as a run-time configuration command in the same format
1231 as the configuration file.
1232 This command is experimental until further notice and clarification.
1233 Authentication is of course required.
1235 <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
1236 run-time configuration commands in the same format as the configuration file.
1237 This command is experimental until further notice and clarification.
1238 Authentication is required.
1240 <br><dt><code><a name="ifstats"></a> ifstats</code><dd>Display statistics for each local network address.
1241 Authentication is required.
1243 <br><dt><code><a name="iostats"></a> iostats</code><dd>Display network and reference clock I/O statistics.
1245 <br><dt><code><a name="kerninfo"></a> kerninfo</code><dd>Display kernel loop and PPS statistics.
1246 As with other ntpq output, times are in milliseconds.
1247 The precision value displayed is in milliseconds as well,
1248 unlike the precision system variable.
1250 <br><dt><code><a name="lassoc"></a> lassociations</code><dd>Perform the same function as the associations command,
1251 except display mobilized and unmobilized associations.
1253 <br><dt><code><a name="monstats"></a> monstats</code><dd>Display monitor facility statistics.
1255 <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
1256 the monitor facility.
1257 With the exception of <code>sort=</code><kbd>sortorder</kbd>,
1258 the options filter the list returned by <code>ntpd</code>.
1259 The <code>limited</code> and <code>kod</code> options return only entries
1260 representing client addresses from which the last packet received
1261 triggered either discarding or a KoD response.
1262 The <code>mincount=</code><kbd>count</kbd> option filters entries representing
1263 less than <kbd>count</kbd> packets.
1264 The <code>laddr=</code><kbd>localaddr</kbd> option filters entries for packets
1265 received on any local address other than <kbd>localaddr</kbd>.
1266 <code>resany=</code><kbd>hexmask</kbd> and <code>resall=</code><kbd>hexmask</kbd>
1267 filter entries containing none or less than all, respectively,
1268 of the bits in <kbd>hexmask</kbd>, which must begin with <code>0x</code>.
1270 The <kbd>sortorder</kbd> defaults to <code>lstint</code> and may be any of
1271 <code>addr</code>, <code>count</code>, <code>avgint</code>, <code>lstint</code>, or
1272 any of those preceded by a minus sign (hyphen) to reverse the sort order.
1273 The output columns are:
1275 <p><table summary=""><tr align="left"><th valign="top" width="10%">Column </th><th valign="top" width="40%">Description
1277 <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>lstint</code>
1278 </td><td valign="top" width="40%">
1279 Interval in s between the receipt of the most recent packet from this
1280 address and the completion of the retrieval of the MRU list by <code>ntpq</code>
1282 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>avgint</code>
1283 </td><td valign="top" width="40%">
1284 Average interval in s between packets from this address.
1286 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rstr</code>
1287 </td><td valign="top" width="40%">
1288 Restriction flags associated with this address.
1289 Most are copied unchanged from the matching <code>restrict</code> command,
1290 however 0x400 (kod) and 0x20 (limited) flags are cleared unless
1291 the last packet from this address triggered a rate control response.
1293 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>r</code>
1294 </td><td valign="top" width="40%">
1295 Rate control indicator, either a period, <code>L</code> or <code>K</code> for
1296 no rate control response, rate limiting by discarding, or
1297 rate limiting with a KoD response, respectively.
1299 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>m</code>
1300 </td><td valign="top" width="40%">
1302 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>v</code>
1303 </td><td valign="top" width="40%">
1304 Packet version number.
1306 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>count</code>
1307 </td><td valign="top" width="40%">
1308 Packets received from this address.
1310 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rport</code>
1311 </td><td valign="top" width="40%">
1312 Source port of last packet from this address.
1314 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>remote address</code>
1315 </td><td valign="top" width="40%">
1316 DNS name, numeric address, or address followed by claimed DNS name which
1317 could not be verified in parentheses.
1319 <br></td></tr></table>
1321 <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,
1322 except for a range of association IDs.
1323 This range is determined from the association list cached by
1324 the most recent <code>associations</code> command.
1326 <br><dt><code><a name="passoc"></a> passociations</code><dd>Perform the same function as the <code>associations command</code>, except that
1327 it uses previously stored data rather than making a new query.
1329 <br><dt><code><a name="pe"></a> peers</code><dd>Display a list of peers in the form:
1331 <code>[tally]remote refid st t when pool reach delay offset jitter</code>
1333 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1334 <br></th></tr><tr align="left"><td valign="top" width="10%"><code>[tally]</code>
1335 </td><td valign="top" width="20%">
1336 single-character code indicating current value of the <code>select</code> field
1337 of the <a href="decode.html#peer">peer status word</a>.
1339 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>remote</code>
1340 </td><td valign="top" width="20%">
1341 host name (or IP number) of peer
1343 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
1344 </td><td valign="top" width="20%">
1345 association ID or <a href="decode.html#kiss">kiss code</a>.
1347 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>st</code>
1348 </td><td valign="top" width="20%">
1351 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>t</code>
1352 </td><td valign="top" width="20%">
1353 <code>u</code>: unicast or manycast client,
1354 <code>b</code>: broadcast or multicast client,
1355 <code>l</code>: local (reference clock),
1356 <code>s</code>: symmetric (peer),
1357 <code>A</code>: manycast server,
1358 <code>B</code>: broadcast server,
1359 <code>M</code>: multicast server.
1361 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>when</code>
1362 </td><td valign="top" width="20%">
1363 sec/min/hr since last received packet
1365 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>poll</code>
1366 </td><td valign="top" width="20%">
1367 poll interval (log(2) s)
1369 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
1370 </td><td valign="top" width="20%">
1371 reach shift register (octal)
1373 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>delay</code>
1374 </td><td valign="top" width="20%">
1377 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
1378 </td><td valign="top" width="20%">
1379 offset of server relative to this host
1381 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>jitter</code>
1382 </td><td valign="top" width="20%">
1385 <br></td></tr></table>
1387 <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.
1388 If <kbd>assocID</kbd> is zero,
1389 the variables are from the <a href="#system">system variables</a> name space,
1390 otherwise they are from the <a href="#peer">peer variables</a> name space.
1391 The <kbd>assocID</kbd> is required, as the same name can occur in both spaces.
1392 If no <kbd>name</kbd> is included,
1393 all operative variables in the name space are displayed.
1394 In this case only, if the <kbd>assocID</kbd> is omitted, it is assumed zero.
1395 Multiple names are specified with comma separators and without whitespace.
1396 Note that time values are represented in milliseconds and
1397 frequency values in parts-per-million (PPM).
1398 Some NTP timestamps are represented in the format YYYYMMDDTTTT,
1399 where YYYY is the year, MM the month of year, DD the day of month and
1400 TTTT the time of day.
1402 <br><dt><code><a name="saveconfig"></a> saveconfig </code><kbd>filename</kbd><dd>Write the current configuration, including any runtime modifications
1403 given with <code>:config</code> or <code>config-from-file</code>,
1404 to the ntpd host's file <kbd>filename</kbd>.
1405 This command will be rejected by the server unless
1406 <a href="miscopt.html#saveconfigdir">saveconfigdir</a>
1407 appears in the <code>ntpd</code> configuration file.
1408 <kbd>filename</kbd> can use <code>strftime()</code> format specifiers
1409 to substitute the current date and time, for example,
1410 <code>saveconfig ntp-%Y%m%d-%H%M%S.conf</code>.
1411 The filename used is stored in system variable <code>savedconfig</code>.
1412 Authentication is required.
1414 <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.
1415 If the <kbd>assocID</kbd> is zero, the variables are from the
1416 <a href="#system">system variables</a> name space, otherwise they are from the
1417 <a href="#peer">peer variables</a> name space.
1418 The <kbd>assocID</kbd> is required,
1419 as the same name can occur in both spaces.
1421 <br><dt><code><a name="sysinfo"></a> sysinfo</code><dd>Display operational summary.
1423 <br><dt><code><a name="sysstats"></a> sysstats</code><dd>Print statistics counters maintained in the protocol module.
1429 <a name="Status-Words-and-Kiss-Codes"></a>Next: <a rel="next" accesskey="n" href="#System-Variables">System Variables</a>,
1430 Previous: <a rel="previous" accesskey="p" href="#Control-Message-Commands">Control Message Commands</a>,
1431 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1435 <!-- node-name, next, previous, up -->
1436 <h3 class="section">Status Words and Kiss Codes</h3>
1438 <p>The current state of the operating program is shown
1439 in a set of status words maintained by the system
1440 and each association separately.
1441 These words are displayed in the <code>rv</code> and <code>as</code> commands
1442 both in hexadecimal and decoded short tip strings.
1443 The codes, tips and short explanations are on the
1444 <a href="decode.html">Event Messages and Status Words</a> page.
1445 The page also includes a list of system and peer messages,
1446 the code for the latest of which is included in the status word.
1448 <p>Information resulting from protocol machine state transitions
1449 is displayed using an informal set of ASCII strings called
1450 <a href="decode.html#kiss">kiss codes</a>.
1451 The original purpose was for kiss-o'-death (KoD) packets sent
1452 by the server to advise the client of an unusual condition.
1453 They are now displayed, when appropriate,
1454 in the reference identifier field in various billboards.
1458 <a name="System-Variables"></a>Next: <a rel="next" accesskey="n" href="#Peer-Variables">Peer Variables</a>,
1459 Previous: <a rel="previous" accesskey="p" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>,
1460 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1464 <!-- node-name, next, previous, up -->
1465 <h3 class="section">System Variables</h3>
1467 <p>The following system variables appear in the <code>rv</code> billboard.
1468 Not all variables are displayed in some configurations.
1470 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1472 <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
1473 </td><td valign="top" width="20%">
1474 <a href="decode.html#sys">system status word</a>
1476 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>version</code>
1477 </td><td valign="top" width="20%">
1478 NTP software version and build time
1480 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>processor</code>
1481 </td><td valign="top" width="20%">
1482 hardware platform and version
1484 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>system</code>
1485 </td><td valign="top" width="20%">
1486 operating system and version
1488 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leap</code>
1489 </td><td valign="top" width="20%">
1490 leap warning indicator (0-3)
1492 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
1493 </td><td valign="top" width="20%">
1496 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>precision</code>
1497 </td><td valign="top" width="20%">
1498 precision (log(2) s)
1500 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdelay</code>
1501 </td><td valign="top" width="20%">
1502 total roundtrip delay to the primary reference clock
1504 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdisp</code>
1505 </td><td valign="top" width="20%">
1506 total dispersion to the primary reference clock
1508 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>peer</code>
1509 </td><td valign="top" width="20%">
1510 system peer association ID
1512 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>tc</code>
1513 time constant and poll exponent (log(2) s) (3-17)
1515 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>mintc</code>
1516 minimum time constant (log(2) s) (3-10)
1518 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clock</code>
1519 </td><td valign="top" width="20%">
1520 date and time of day
1522 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
1523 reference ID or <a href="decode.html#kiss">kiss code</a>
1525 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reftime</code>
1526 </td><td valign="top" width="20%">
1529 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
1530 </td><td valign="top" width="20%">
1531 combined offset of server relative to this host
1533 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>sys_jitter</code>
1534 </td><td valign="top" width="20%">
1535 combined system jitter
1537 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>frequency</code>
1538 </td><td valign="top" width="20%">
1539 frequency offset (PPM) relative to hardware clock
1541 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clk_wander</code>
1542 </td><td valign="top" width="20%">
1543 clock frequency wander (PPM)
1545 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clk_jitter</code>
1546 </td><td valign="top" width="20%">
1549 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>tai</code>
1550 </td><td valign="top" width="20%">
1553 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leapsec</code>
1554 </td><td valign="top" width="20%">
1555 NTP seconds when the next leap second is/was inserted
1557 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>expire</code>
1558 </td><td valign="top" width="20%">
1559 NTP seconds when the NIST leapseconds file expires
1561 <br></td></tr></table>
1563 <p>The jitter and wander statistics are exponentially-weighted RMS averages.
1564 The system jitter is defined in the NTPv4 specification;
1565 the clock jitter statistic is computed by the clock discipline module.
1567 <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
1568 additional system variables are displayed, including some or all of the
1569 following, depending on the particular Autokey dance:
1571 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1573 <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>host</code>
1574 </td><td valign="top" width="20%">
1575 Autokey host name for this host
1577 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>ident</code>
1578 </td><td valign="top" width="20%">
1579 Autokey group name for this host
1581 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
1582 </td><td valign="top" width="20%">
1583 host flags (see Autokey specification)
1585 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>digest</code>
1586 </td><td valign="top" width="20%">
1587 OpenSSL message digest algorithm
1589 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>signature</code>
1590 </td><td valign="top" width="20%">
1591 OpenSSL digest/signature scheme
1593 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>update</code>
1594 </td><td valign="top" width="20%">
1595 NTP seconds at last signature update
1597 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>cert</code>
1598 </td><td valign="top" width="20%">
1599 certificate subject, issuer and certificate flags
1601 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>until</code>
1602 </td><td valign="top" width="20%">
1603 NTP seconds when the certificate expires
1605 <br></td></tr></table>
1609 <a name="Peer-Variables"></a>Next: <a rel="next" accesskey="n" href="#Clock-Variables">Clock Variables</a>,
1610 Previous: <a rel="previous" accesskey="p" href="#System-Variables">System Variables</a>,
1611 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1615 <!-- node-name, next, previous, up -->
1616 <h3 class="section">Peer Variables</h3>
1618 <p>The following peer variables appear in the <code>rv</code> billboard
1619 for each association.
1620 Not all variables are displayed in some configurations.
1622 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1624 <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>associd</code>
1625 </td><td valign="top" width="20%">
1628 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
1629 </td><td valign="top" width="20%">
1630 <a href="decode.html#peer">peer status word</a>
1632 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>srcadr</code>
1633 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>srcport</code>
1634 </td><td valign="top" width="20%">
1635 source (remote) IP address and port
1637 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>dstadr</code>
1638 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>dstport</code>
1639 </td><td valign="top" width="20%">
1640 destination (local) IP address and port
1642 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leap</code>
1643 </td><td valign="top" width="20%">
1644 leap indicator (0-3)
1646 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
1647 </td><td valign="top" width="20%">
1650 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>precision</code>
1651 </td><td valign="top" width="20%">
1652 precision (log(2) s)
1654 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdelay</code>
1655 </td><td valign="top" width="20%">
1656 total roundtrip delay to the primary reference clock
1658 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdisp</code>
1659 </td><td valign="top" width="20%">total root dispersion to the primary reference clock
1661 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
1662 </td><td valign="top" width="20%">
1663 reference ID or <a href="decode.html#kiss">kiss code</a>
1665 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reftime</code>
1666 </td><td valign="top" width="20%">
1669 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
1670 </td><td valign="top" width="20%">
1671 reach register (octal)
1673 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>unreach</code>
1674 </td><td valign="top" width="20%">
1677 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>hmode</code>
1678 </td><td valign="top" width="20%">
1681 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>pmode</code>
1682 </td><td valign="top" width="20%">
1685 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>hpoll</code>
1686 </td><td valign="top" width="20%">
1687 host poll exponent (log(2) s) (3-17)
1688 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>ppoll</code>
1689 </td><td valign="top" width="20%">
1690 peer poll exponent (log(2) s) (3-17)
1692 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>headway</code>
1693 </td><td valign="top" width="20%">
1694 headway (see <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a>)
1696 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flash</code>
1697 </td><td valign="top" width="20%">
1698 <a href="decode.html#flash">flash status word</a>
1700 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
1701 </td><td valign="top" width="20%">
1704 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>delay</code>
1705 </td><td valign="top" width="20%">
1708 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>dispersion</code>
1709 </td><td valign="top" width="20%">
1712 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>jitter</code>
1713 </td><td valign="top" width="20%">
1716 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>ident</code>
1717 </td><td valign="top" width="20%">
1718 Autokey group name for this association
1720 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>bias</code>
1721 </td><td valign="top" width="20%">
1722 unicast/broadcast bias
1724 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>xleave</code>
1725 </td><td valign="top" width="20%">
1726 interleave delay (see <a href="xleave.html">NTP Interleaved Modes</a>)
1728 <br></td></tr></table>
1730 <p>The bias variable is calculated when the first broadcast packet is received
1731 after the calibration volley. It represents the offset of the broadcast
1732 subgraph relative to the unicast subgraph. The xleave variable appears
1733 only the interleaved symmetric and interleaved modes. It represents
1734 the internal queuing, buffering and transmission delays for the preceding
1737 <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
1738 additional peer variables are displayed, including the following:
1740 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1742 <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
1743 </td><td valign="top" width="20%">
1744 peer flags (see Autokey specification)
1746 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>host</code>
1747 </td><td valign="top" width="20%">
1750 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
1751 </td><td valign="top" width="20%">
1752 peer flags (see Autokey specification)
1754 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>signature</code>
1755 </td><td valign="top" width="20%">
1756 OpenSSL digest/signature scheme
1758 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>initsequence</code>
1759 </td><td valign="top" width="20%">
1762 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>initkey</code>
1763 </td><td valign="top" width="20%">
1766 <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>timestamp</code>
1767 </td><td valign="top" width="20%">
1768 Autokey signature timestamp
1770 <br></td></tr></table>
1774 <a name="Clock-Variables"></a>Previous: <a rel="previous" accesskey="p" href="#Peer-Variables">Peer Variables</a>,
1775 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1779 <!-- node-name, next, previous, up -->
1780 <h3 class="section">Clock Variables</h3>
1782 <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.
1784 <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1785 <br></th></tr><tr align="left"><td valign="top" width="10%"><code>associd</code>
1786 </td><td valign="top" width="20%">association ID
1787 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
1788 </td><td valign="top" width="20%"><a href="decode.html#clock">clock status word</a>
1789 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>device</code>
1790 </td><td valign="top" width="20%">device description
1791 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>timecode</code>
1792 </td><td valign="top" width="20%">ASCII time code string (specific to device)
1793 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>poll</code>
1794 </td><td valign="top" width="20%">poll messages sent
1795 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>noreply</code>
1796 </td><td valign="top" width="20%">no reply
1797 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>badformat</code>
1798 </td><td valign="top" width="20%">bad format
1799 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>baddata</code>
1800 </td><td valign="top" width="20%">bad date or time
1801 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>fudgetime1</code>
1802 </td><td valign="top" width="20%">fudge time 1
1803 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>fudgetime2</code>
1804 </td><td valign="top" width="20%">fudge time 2
1805 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
1806 </td><td valign="top" width="20%">driver stratum
1807 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
1808 </td><td valign="top" width="20%">driver reference ID
1809 <br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
1810 </td><td valign="top" width="20%">driver flags
1811 <br></td></tr></table>