ntpq.html   [plain text]


<html lang="en">
<head>
<title>ntpq: Network Time Protocol Query User's Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="ntpq: Network Time Protocol Query User's Manual">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc { font-variant:small-caps }
  span.roman { font-family: serif; font-weight: normal; } 
--></style>
</head>
<body>
<h1 class="settitle">ntpq: Network Time Protocol Query User's Manual</h1>
  <div class="shortcontents">
<h2>Short Contents</h2>
<ul>
<a href="#Top">ntpq: Network Time Protocol Query User Manual</a>
</ul>
</div>



<div class="node">
<p><hr>
<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-Description">ntpq Description</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<br>
</div>

<h2 class="unnumbered">ntpq: Network Time Protocol Query User Manual</h2>

<p>The <code>ntpq</code> utility program is used to
monitor the operational status
and determine the performance of
<code>ntpd</code>, the NTP daemon.

  <p>This document applies to version 4.2.8p10 of <code>ntpq</code>.

<ul class="menu">
<li><a accesskey="1" href="#ntpq-Description">ntpq Description</a>
<li><a accesskey="2" href="#ntpq-Invocation">ntpq Invocation</a>:              Invoking ntpq
<li><a accesskey="3" href="#Usage">Usage</a>
<li><a accesskey="4" href="#Internal-Commands">Internal Commands</a>
<li><a accesskey="5" href="#Control-Message-Commands">Control Message Commands</a>
<li><a accesskey="6" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>
<li><a accesskey="7" href="#System-Variables">System Variables</a>
<li><a accesskey="8" href="#Peer-Variables">Peer Variables</a>
<li><a accesskey="9" href="#Clock-Variables">Clock Variables</a>
</ul>

<div class="node">
<p><hr>
<a name="ntpq-Description"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Usage">Usage</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<!-- node-name,  next,  previous,  up -->
<h3 class="section">Description</h3>

<p>The <code>ntpq</code> utility program is used to monitor NTP daemon <code>ntpd</code> operations and determine performance. 
It uses the standard NTP mode 6 control message formats defined in
Appendix B of the NTPv3 specification RFC1305. 
The same formats are used in NTPv4, although some of the variable names have changed and new ones added. 
The description on this page is for the NTPv4 variables.

  <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.

  <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.

  <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.

  <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.

  <p>For examples and usage, see the <a href="debug.html">NTP Debugging Techniques</a> page.

<div class="node">
<p><hr>
<a name="ntpq-Invocation"></a>
<br>
</div>

<h3 class="section">Invoking ntpq</h3>

<p><a name="index-ntpq-1"></a><a name="index-standard-NTP-query-program-2"></a>

  <p>The
<code>ntpq</code>
utility program is used to query NTP servers which
implement the standard NTP mode 6 control message formats defined
in Appendix B of the NTPv3 specification RFC1305, requesting
information about current state and/or changes in that state. 
The same formats are used in NTPv4, although some of the
variables have changed and new ones added. The description on this
page is for the NTPv4 variables. 
The program may 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>
utility can also obtain and print a
list of peers in a common format by sending multiple queries to the
server.

  <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. 
The
<code>ntpq</code>
utility will prompt for
commands if the standard input is a terminal device.

  <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. 
The
<code>ntpq</code>
utility makes
one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.

  <p>Specifying a
command line option other than
<code>-i</code>
or
<code>-n</code>
will
cause the specified query (queries) to be sent to the indicated
host(s) immediately. 
Otherwise,
<code>ntpq</code>
will attempt to read
interactive format commands from the standard input.

<h5 class="subsubsection">Internal Commands</h5>

<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.

  <p>A
number of interactive format commands are executed entirely within
the
<code>ntpq</code>
utility itself and do not result in NTP mode 6
requests being sent to a server. 
These are described following.
     <dl>
<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
? 
by itself will print a list of all the command
keywords known to this incarnation of
<code>ntpq</code>
A
? 
followed by a command keyword will print function and usage
information about the command. 
This command is probably a better
source of information about
<code>ntpq</code>
than this manual
page. 
<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
items of the form
variable_name=value,
where the
=value
is ignored, and can be omitted,
in requests to the server to read variables. 
The
<code>ntpq</code>
utility maintains an internal list in which data to be included in control
messages can be assembled, and sent using the
<code>readlist</code>
and
<code>writelist</code>
commands described below. 
The
<code>addvars</code>
command allows variables and their optional values to be added to
the list. 
If more than one variable is to be added, the list should
be comma-separated and not contain white space. 
The
<code>rmvars</code>
command can be used to remove individual variables from the list,
while the
<code>clearlist</code>
command removes all variables from the
list. 
The
<code>showvars</code>
command displays the current list of optional variables. 
<br><dt><code>authenticate</code> <code>[yes | no]</code><dd>Normally
<code>ntpq</code>
does not authenticate requests unless
they are write requests. 
The command
authenticate yes
causes
<code>ntpq</code>
to send authentication with all requests it
makes. 
Authenticated requests causes some servers to handle
requests slightly differently, and can occasionally melt the CPU in
fuzzballs if you turn authentication on before doing a
<code>peer</code>
display. 
The command
authenticate
causes
<code>ntpq</code>
to display whether or not
<code>ntpq</code>
is currently autheinticating requests. 
<br><dt><code>cooked</code><dd>Causes output from query commands to be "cooked", so that
variables which are recognized by
<code>ntpq</code>
will have their
values reformatted for human consumption. 
Variables which
<code>ntpq</code>
thinks should have a decodable value but didn't are
marked with a trailing
?. 
<br><dt><code>debug</code> <code>[more | less | off]</code><dd>With no argument, displays the current debug level. 
Otherwise, the debug level is changed to the indicated level. 
<br><dt><code>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. 
<br><dt><code>exit</code><dd>Exit
<code>ntpq</code>
<br><dt><code>host</code> <kbd>hostname</kbd><dd>Set the host to which future queries will be sent. 
<kbd>hostname</kbd>
may be either a host name or a numeric address. 
<br><dt><code>hostnames</code> <code>[yes | no]</code><dd>If
<code>yes</code>
is specified, host names are printed in
information displays. 
If
<code>no</code>
is specified, numeric
addresses are printed instead. 
The default is
<code>yes</code>,
unless
modified using the command line
<code>-n</code>
switch. 
<br><dt><code>keyid</code> <kbd>keyid</kbd><dd>This command allows the specification of a key number to be
used to authenticate configuration requests. 
This must correspond
to the
<code>controlkey</code>
key number the server has been configured to use for this
purpose. 
<br><dt><code>keytype</code> <code>[md5 | OpenSSLDigestType]</code><dd>Specify the type of key to use for authenticating requests. 
<code>md5</code>
is alway supported. 
If
<code>ntpq</code>
was built with OpenSSL support,
any digest type supported by OpenSSL can also be provided. 
If no argument is given, the current
<code>keytype</code>
is displayed. 
<br><dt><code>ntpversion</code> <code>[1 | 2 | 3 | 4]</code><dd>Sets the NTP version number which
<code>ntpq</code>
claims in
packets. 
Defaults to 3, and note that mode 6 control messages (and
modes, for that matter) didn't exist in NTP version 1. 
There appear
to be no servers left which demand version 1. 
With no argument, displays the current NTP version that will be used
when communicating with servers. 
<br><dt><code>passwd</code><dd>This command prompts you to type in a password (which will not
be echoed) which will be used to authenticate configuration
requests. 
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful. 
<code>poll</code>
<kbd>n</kbd>
<code>verbose</code>
<br><dt><code>quit</code><dd>Exit
<code>ntpq</code>
<br><dt><code>raw</code><dd>Causes all output from query commands is printed as received
from the remote server. 
The only formating/interpretation done on
the data is to transform nonascii data into a printable (but barely
understandable) form. 
<br><dt><code>timeout</code> <kbd>milliseconds</kbd><dd>Specify a timeout period for responses to server queries. 
The
default is about 5000 milliseconds. 
Note that since
<code>ntpq</code>
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set. 
<br><dt><code>version</code><dd>Print the version of the
<code>ntpq</code>
program. 
</dl>

<h5 class="subsubsection">Control Message Commands</h5>

<p>Association IDs are used to identify system, peer and clock variables. 
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. 
Most control commands send a single mode-6 message to the server and expect a single response message. 
The exceptions are the
<code>peers</code>
command, which sends a series of messages,
and the
<code>mreadlist</code>
and
<code>mreadvar</code>
commands, which iterate over a range of associations.
     <dl>
<dt><code>associations</code><dd>Display a list of mobilized associations in the form:
     <pre class="example">          ind assid status conf reach auth condition last_event cnt
     </pre>
          <dl>
<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>
     <br><dt><code>authinfo</code><dd>Display the authentication statistics. 
<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. 
<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. 
<br><dt><code>config-from-file</code> <kbd>filename</kbd><dd>Send the each line of
<kbd>filename</kbd>
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. 
<br><dt><code>ifstats</code><dd>Display statistics for each local network address. Authentication is required. 
<br><dt><code>iostats</code><dd>Display network and reference clock I/O statistics. 
<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. 
<br><dt><code>lassociations</code><dd>Perform the same function as the associations command, except display mobilized and unmobilized associations. 
<br><dt><code>lopeers</code> <code>[-4 | -6]</code><dd>Obtain and print a list of all peers and clients showing
<kbd>dstadr</kbd>
(associated with any given IP version). 
<br><dt><code>lpeers</code> <code>[-4 | -6]</code><dd>Print a peer spreadsheet for the appropriate IP version(s). 
<kbd>dstadr</kbd>
(associated with any given IP version). 
<br><dt><code>monstats</code><dd>Display monitor facility statistics. 
<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. 
With the exception of
<code>sort</code>=<kbd>sortorder</kbd>,
the options filter the list returned by
<code>ntpd.</code>
The
<code>limited</code>
and
<code>kod</code>
options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response. 
The
<code>mincount</code>=<kbd>count</kbd>
option filters entries representing less than
<kbd>count</kbd>
packets. 
The
<code>laddr</code>=<kbd>localaddr</kbd>
option filters entries for packets received on any local address other than
<kbd>localaddr</kbd>. 
<code>resany</code>=<kbd>hexmask</kbd>
and
<code>resall</code>=<kbd>hexmask</kbd>
filter entries containing none or less than all, respectively, of the bits in
<kbd>hexmask</kbd>,
which must begin with
<code>0x</code>. 
The
<kbd>sortorder</kbd>
defaults to
<code>lstint</code>
and may be any of
<code>addr</code>,
<code>count</code>,
<code>avgint</code>,
<code>lstint</code>,
or any of those preceded by a minus sign (hyphen) to reverse the sort order. 
The output columns are:
          <dl>
<dt>Column<dd>Description
<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
<code>ntpq</code>
<br><dt><code>avgint</code><dd>Average interval in s between packets from this address. 
<br><dt><code>rstr</code><dd>Restriction flags associated with this address. 
Most are copied unchanged from the matching
<code>restrict</code>
command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response. 
<br><dt><code>r</code><dd>Rate control indicator, either
a period,
<code>L</code>
or
<code>K</code>
for no rate control response,
rate limiting by discarding, or rate limiting with a KoD response, respectively. 
<br><dt><code>m</code><dd>Packet mode. 
<br><dt><code>v</code><dd>Packet version number. 
<br><dt><code>count</code><dd>Packets received from this address. 
<br><dt><code>rport</code><dd>Source port of last packet from this address. 
<br><dt><code>remote</code> <code>address</code><dd>DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses. 
</dl>
     <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
<code>readvar</code>
command, except for a range of association IDs. 
This range is determined from the association list cached by the most recent
<code>associations</code>
command. 
<br><dt><code>opeers</code> <code>[-4 | -6]</code><dd>Obtain and print the old-style list of all peers and clients showing
<kbd>dstadr</kbd>
(associated with any given IP version),
rather than the
<kbd>refid</kbd>. 
<br><dt><code>passociations</code><dd>Perform the same function as the
<code>associations</code>
command,
except that it uses previously stored data rather than making a new query. 
<br><dt><code>peers</code><dd>Display a list of peers in the form:
     <pre class="example">          [tally]remote refid st t when pool reach delay offset jitter
     </pre>
          <dl>
<dt>Variable<dd>Description
<br><dt><code>[tally]</code><dd>single-character code indicating current value of the
<code>select</code>
field of the
.Lk decode.html#peer "peer status word"
<br><dt><code>remote</code><dd>host name (or IP number) of peer. 
The value displayed will be truncated to 15 characters  unless the
<code>-w</code>
flag is given, in which case the full value will be displayed
on the first line,
and the remaining data is displayed on the next line. 
<br><dt><code>refid</code><dd>association ID or
.Lk decode.html#kiss "'kiss code"
<br><dt><code>st</code><dd>stratum
<br><dt><code>t</code><dd><code>u</code>:
unicast or manycast client,
<code>b</code>:
broadcast or multicast client,
<code>l</code>:
local (reference clock),
<code>s</code>:
symmetric (peer),
<code>A</code>:
manycast server,
<code>B</code>:
broadcast server,
<code>M</code>:
multicast server
<br><dt><code>when</code><dd>sec/min/hr since last received packet
<br><dt><code>poll</code><dd>poll interval (log2 s)
<br><dt><code>reach</code><dd>reach shift register (octal)
<br><dt><code>delay</code><dd>roundtrip delay
<br><dt><code>offset</code><dd>offset of server relative to this host
<br><dt><code>jitter</code><dd>jitter
</dl>
     <br><dt><code>apeers</code><dd>Display a list of peers in the form:
     <pre class="example">          [tally]remote refid assid st t when pool reach delay offset jitter
     </pre>
     <p>where the output is just like the
<code>peers</code>
command except that the
<code>refid</code>
is displayed in hex format and the association number is also displayed. 
<br><dt><code>pstats</code> <kbd>assocID</kbd><dd>Show the statistics for the peer with the given
<kbd>assocID</kbd>. 
<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. 
<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. 
If
<kbd>assocID</kbd>
is zero, the variables are from the
<a href="#System-Variables">System Variables</a>
name space, otherwise they are from the
<a href="#Peer-Variables">Peer Variables</a>
name space. 
The
<kbd>assocID</kbd>
is required, as the same name can occur in both spaces. 
If no
<kbd>name</kbd>
is included, all operative variables in the name space are displayed.

     <p>In this case only, if the
<kbd>assocID</kbd>
is omitted, it is assumed zero. 
Multiple names are specified with comma separators and without whitespace. 
Note that time values are represented in milliseconds
and frequency values in parts-per-million (PPM). 
Some NTP timestamps are represented in the format
YYYYMMDDTTTT ,
where YYYY is the year,
MM the month of year,
DD the day of month and
TTTT the time of day. 
<br><dt><code>reslist</code><dd>Show the access control (restrict) list for
<code>ntpq</code>

     <br><dt><code>saveconfig</code> <kbd>filename</kbd><dd>Write the current configuration,
including any runtime modifications given with
<code>:config</code>
or
<code>config-from-file</code>,
to the ntpd host's file
<kbd>filename</kbd>. 
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
<code>ntpd</code>
configuration file. 
<kbd>filename</kbd>
can use
<code>strftime()</code>
format specifies to substitute the current date and time, for example,
<code>q]saveconfig</code> <code>ntp-%Y%m%d-%H%M%S.confq]</code>. 
The filename used is stored in system variable
<code>savedconfig</code>. 
Authentication is required. 
<br><dt><code>timerstats</code><dd>Display interval timer counters. 
<br><dt><code>writelist</code> <kbd>assocID</kbd><dd>Write the system or peer variables included in the variable list. 
<br><dt><code>writevar</code> <kbd>assocID</kbd> <kbd>name</kbd>=<kbd>value</kbd> <code>[, ...]</code><dd>Write the specified variables. 
If the
<kbd>assocID</kbd>
is zero, the variables are from the
<a href="#System-Variables">System Variables</a>
name space, otherwise they are from the
<a href="#Peer-Variables">Peer Variables</a>
name space. 
The
<kbd>assocID</kbd>
is required, as the same name can occur in both spaces. 
<br><dt><code>sysinfo</code><dd>Display operational summary. 
<br><dt><code>sysstats</code><dd>Print statistics counters maintained in the protocol module. 
</dl>

<h5 class="subsubsection">Status Words and Kiss Codes</h5>

<p>The current state of the operating program is shown
in a set of status words
maintained by the system. 
Status information is also available on a per-association basis. 
These words are displayed in the
<code>rv</code>
and
<code>as</code>
commands both in hexadecimal and in decoded short tip strings. 
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
page. 
The page also includes a list of system and peer messages,
the code for the latest of which is included in the status word.

  <p>Information resulting from protocol machine state transitions
is displayed using an informal set of ASCII strings called
.Lk decode.html#kiss "kiss codes" . 
The original purpose was for kiss-o'-death (KoD) packets
sent by the server to advise the client of an unusual condition. 
They are now displayed, when appropriate,
in the reference identifier field in various billboards.

<h5 class="subsubsection">System Variables</h5>

<p>The following system variables appear in the
<code>rv</code>
billboard. 
Not all variables are displayed in some configurations.
     <dl>
<dt>Variable<dd>Description
<br><dt><code>status</code><dd>.Lk decode.html#sys "system status word"
<br><dt><code>version</code><dd>NTP software version and build time
<br><dt><code>processor</code><dd>hardware platform and version
<br><dt><code>system</code><dd>operating system and version
<br><dt><code>leap</code><dd>leap warning indicator (0-3)
<br><dt><code>stratum</code><dd>stratum (1-15)
<br><dt><code>precision</code><dd>precision (log2 s)
<br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock
<br><dt><code>rootdisp</code><dd>total dispersion to the primary reference clock
<br><dt><code>peer</code><dd>system peer association ID
<br><dt><code>tc</code><dd>time constant and poll exponent (log2 s) (3-17)
<br><dt><code>mintc</code><dd>minimum time constant (log2 s) (3-10)
<br><dt><code>clock</code><dd>date and time of day
<br><dt><code>refid</code><dd>reference ID or
.Lk decode.html#kiss "kiss code"
<br><dt><code>reftime</code><dd>reference time
<br><dt><code>offset</code><dd>combined  offset of server relative to this host
<br><dt><code>sys_jitter</code><dd>combined system jitter
<br><dt><code>frequency</code><dd>frequency offset (PPM) relative to hardware clock
<br><dt><code>clk_wander</code><dd>clock frequency wander (PPM)
<br><dt><code>clk_jitter</code><dd>clock jitter
<br><dt><code>tai</code><dd>TAI-UTC offset (s)
<br><dt><code>leapsec</code><dd>NTP seconds when the next leap second is/was inserted
<br><dt><code>expire</code><dd>NTP seconds when the NIST leapseconds file expires
</dl>
  The jitter and wander statistics are exponentially-weighted RMS averages. 
The system jitter is defined in the NTPv4 specification;
the clock jitter statistic is computed by the clock discipline module.

  <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
additional system variables are displayed,
including some or all of the following,
depending on the particular Autokey dance:

     <dl>
<dt>Variable<dd>Description
<br><dt><code>host</code><dd>Autokey host name for this host
<br><dt><code>ident</code><dd>Autokey group name for this host
<br><dt><code>flags</code><dd>host flags  (see Autokey specification)
<br><dt><code>digest</code><dd>OpenSSL message digest algorithm
<br><dt><code>signature</code><dd>OpenSSL digest/signature scheme
<br><dt><code>update</code><dd>NTP seconds at last signature update
<br><dt><code>cert</code><dd>certificate subject, issuer and certificate flags
<br><dt><code>until</code><dd>NTP seconds when the certificate expires
</dl>

<h5 class="subsubsection">Peer Variables</h5>

<p>The following peer variables appear in the
<code>rv</code>
billboard for each association. 
Not all variables are displayed in some configurations.

     <dl>
<dt>Variable<dd>Description
<br><dt><code>associd</code><dd>association ID
<br><dt><code>status</code><dd>.Lk decode.html#peer "peer status word"
<br><dt><code>srcadr</code><dd>source (remote) IP address
<br><dt><code>srcport</code><dd>source (remote) port
<br><dt><code>dstadr</code><dd>destination (local) IP address
<br><dt><code>dstport</code><dd>destination (local) port
<br><dt><code>leap</code><dd>leap indicator (0-3)
<br><dt><code>stratum</code><dd>stratum (0-15)
<br><dt><code>precision</code><dd>precision (log2 s)
<br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock
<br><dt><code>rootdisp</code><dd>total root dispersion to the primary reference clock
<br><dt><code>refid</code><dd>reference ID or
.Lk decode.html#kiss "kiss code"
<br><dt><code>reftime</code><dd>reference time
<br><dt><code>reach</code><dd>reach register (octal)
<br><dt><code>unreach</code><dd>unreach counter
<br><dt><code>hmode</code><dd>host mode (1-6)
<br><dt><code>pmode</code><dd>peer mode (1-5)
<br><dt><code>hpoll</code><dd>host poll exponent (log2 s) (3-17)
<br><dt><code>ppoll</code><dd>peer poll exponent (log2 s) (3-17)
<br><dt><code>headway</code><dd>headway (see
.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
<br><dt><code>flash</code><dd>.Lk decode.html#flash "flash status word"
<br><dt><code>offset</code><dd>filter offset
<br><dt><code>delay</code><dd>filter delay
<br><dt><code>dispersion</code><dd>filter dispersion
<br><dt><code>jitter</code><dd>filter jitter
<br><dt><code>ident</code><dd>Autokey group name for this association
<br><dt><code>bias</code><dd>unicast/broadcast bias
<br><dt><code>xleave</code><dd>interleave delay (see
.Lk xleave.html "NTP Interleaved Modes" )
</dl>
  The
<code>bias</code>
variable is calculated when the first broadcast packet is received
after the calibration volley. 
It represents the offset of the broadcast subgraph relative to the unicast subgraph. 
The
<code>xleave</code>
variable appears only for the interleaved symmetric and interleaved modes. 
It represents the internal queuing, buffering and transmission delays
for the preceding packet.

  <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
additional peer variables are displayed, including the following:
     <dl>
<dt>Variable<dd>Description
<br><dt><code>flags</code><dd>peer flags (see Autokey specification)
<br><dt><code>host</code><dd>Autokey server name
<br><dt><code>flags</code><dd>peer flags (see Autokey specification)
<br><dt><code>signature</code><dd>OpenSSL digest/signature scheme
<br><dt><code>initsequence</code><dd>initial key ID
<br><dt><code>initkey</code><dd>initial key index
<br><dt><code>timestamp</code><dd>Autokey signature timestamp
</dl>

<h5 class="subsubsection">Clock Variables</h5>

<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.
     <dl>
<dt>Variable<dd>Description
<br><dt><code>associd</code><dd>association ID
<br><dt><code>status</code><dd>.Lk decode.html#clock "clock status word"
<br><dt><code>device</code><dd>device description
<br><dt><code>timecode</code><dd>ASCII time code string (specific to device)
<br><dt><code>poll</code><dd>poll messages sent
<br><dt><code>noreply</code><dd>no reply
<br><dt><code>badformat</code><dd>bad format
<br><dt><code>baddata</code><dd>bad date or time
<br><dt><code>fudgetime1</code><dd>fudge time 1
<br><dt><code>fudgetime2</code><dd>fudge time 2
<br><dt><code>stratum</code><dd>driver stratum
<br><dt><code>refid</code><dd>driver reference ID
<br><dt><code>flags</code><dd>driver flags
</dl>

  <p>This section was generated by <strong>AutoGen</strong>,
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpq</code> program. 
This software is released under the NTP license, &lt;http://ntp.org/license&gt;.

<ul class="menu">
<li><a accesskey="1" href="#ntpq-usage">ntpq usage</a>:                   ntpq help/usage (<span class="option">--help</span>)
<li><a accesskey="2" href="#ntpq-ipv4">ntpq ipv4</a>:                    ipv4 option (-4)
<li><a accesskey="3" href="#ntpq-ipv6">ntpq ipv6</a>:                    ipv6 option (-6)
<li><a accesskey="4" href="#ntpq-command">ntpq command</a>:                 command option (-c)
<li><a accesskey="5" href="#ntpq-interactive">ntpq interactive</a>:             interactive option (-i)
<li><a accesskey="6" href="#ntpq-numeric">ntpq numeric</a>:                 numeric option (-n)
<li><a accesskey="7" href="#ntpq-old_002drv">ntpq old-rv</a>:                  old-rv option
<li><a accesskey="8" href="#ntpq-peers">ntpq peers</a>:                   peers option (-p)
<li><a accesskey="9" href="#ntpq-refid">ntpq refid</a>:                   refid option (-r)
<li><a href="#ntpq-wide">ntpq wide</a>:                    wide option (-w)
<li><a href="#ntpq-config">ntpq config</a>:                  presetting/configuring ntpq
<li><a href="#ntpq-exit-status">ntpq exit status</a>:             exit status
</ul>

<div class="node">
<p><hr>
<a name="ntpq-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-ipv4">ntpq ipv4</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<br>
</div>

<h4 class="subsection">ntpq help/usage (<span class="option">--help</span>)</h4>

<p><a name="index-ntpq-help-3"></a>
This is the automatically generated usage text for ntpq.

  <p>The text printed is the same whether selected with the <code>help</code> option
(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>).  <code>more-help</code> will print
the usage text by passing it through a pager program. 
<code>more-help</code> is disabled on platforms without a working
<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
used to select the program, defaulting to <span class="file">more</span>.  Both will exit
with a status code of 0.

<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p10-beta
Usage:  ntpq [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
  Flg Arg Option-Name    Description
   -4 no  ipv4           Force IPv4 DNS name resolution
                                - prohibits the option 'ipv6'
   -6 no  ipv6           Force IPv6 DNS name resolution
                                - prohibits the option 'ipv4'
   -c Str command        run a command and exit
                                - may appear multiple times
   -d no  debug-level    Increase debug verbosity level
                                - may appear multiple times
   -D Num set-debug-level Set the debug verbosity level
                                - may appear multiple times
   -i no  interactive    Force ntpq to operate in interactive mode
                                - prohibits these options:
                                command
                                peers
   -n no  numeric        numeric host addresses
      no  old-rv         Always output status line with readvar
   -p no  peers          Print a list of the peers
                                - prohibits the option 'interactive'
   -r KWd refid          Set default display type for S2+ refids
   -w no  wide           Display the full 'remote' value
      opt version        output version information and exit
   -? no  help           display extended usage information and exit
   -! no  more-help      extended usage information passed thru pager
   -&gt; opt save-opts      save the option state to a config file
   -&lt; Str load-opts      load options from a config file
                                - disabled as '--no-load-opts'
                                - may appear multiple times

Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.

The following option preset mechanisms are supported:
 - reading file $HOME/.ntprc
 - reading file ./.ntprc
 - examining environment variables named NTPQ_*

The valid "refid" option keywords are:
  hash ipv4
  or an integer from 0 through 1

Please send bug reports to:  &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
</pre>
  <div class="node">
<p><hr>
<a name="ntpq-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-ipv6">ntpq ipv6</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-usage">ntpq usage</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<br>
</div>

<h4 class="subsection">ipv4 option (-4)</h4>

<p><a name="index-ntpq_002dipv4-4"></a>
This is the &ldquo;force ipv4 dns name resolution&rdquo; option.

<p class="noindent">This option has some usage constraints.  It:
     <ul>
<li>must not appear in combination with any of the following options:
ipv6. 
</ul>

  <p>Force DNS resolution of following host names on the command line
to the IPv4 namespace. 
<div class="node">
<p><hr>
<a name="ntpq-ipv6"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-command">ntpq command</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-ipv4">ntpq ipv4</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<br>
</div>

<h4 class="subsection">ipv6 option (-6)</h4>

<p><a name="index-ntpq_002dipv6-5"></a>
This is the &ldquo;force ipv6 dns name resolution&rdquo; option.

<p class="noindent">This option has some usage constraints.  It:
     <ul>
<li>must not appear in combination with any of the following options:
ipv4. 
</ul>

  <p>Force DNS resolution of following host names on the command line
to the IPv6 namespace. 
<div class="node">
<p><hr>
<a name="ntpq-command"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-interactive">ntpq interactive</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-ipv6">ntpq ipv6</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<br>
</div>

<h4 class="subsection">command option (-c)</h4>

<p><a name="index-ntpq_002dcommand-6"></a>
This is the &ldquo;run a command and exit&rdquo; option. 
This option takes a string argument <span class="file">cmd</span>.

<p class="noindent">This option has some usage constraints.  It:
     <ul>
<li>may appear an unlimited number of times. 
</ul>

  <p>The following argument is interpreted as an interactive format command
and is added to the list of commands to be executed on the specified
host(s). 
<div class="node">
<p><hr>
<a name="ntpq-interactive"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-numeric">ntpq numeric</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-command">ntpq command</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<br>
</div>

<h4 class="subsection">interactive option (-i)</h4>

<p><a name="index-ntpq_002dinteractive-7"></a>
This is the &ldquo;force ntpq to operate in interactive mode&rdquo; option.

<p class="noindent">This option has some usage constraints.  It:
     <ul>
<li>must not appear in combination with any of the following options:
command, peers. 
</ul>

  <p>Force <code>ntpq</code> to operate in interactive mode. 
Prompts will be written to the standard output and
commands read from the standard input. 
<div class="node">
<p><hr>
<a name="ntpq-numeric"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-old_002drv">ntpq old-rv</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-interactive">ntpq interactive</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<br>
</div>

<h4 class="subsection">numeric option (-n)</h4>

<p><a name="index-ntpq_002dnumeric-8"></a>
This is the &ldquo;numeric host addresses&rdquo; option. 
Output all host addresses in dotted-quad numeric format rather than
converting to the canonical host names. 
<div class="node">
<p><hr>
<a name="ntpq-old_002drv"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-peers">ntpq peers</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-numeric">ntpq numeric</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<br>
</div>

<h4 class="subsection">old-rv option</h4>

<p><a name="index-ntpq_002dold_002drv-9"></a>
This is the &ldquo;always output status line with readvar&rdquo; option. 
By default, <code>ntpq</code> now suppresses the <code>associd=...</code>
line that precedes the output of <code>readvar</code>
(alias <code>rv</code>) when a single variable is requested, such as
<code>ntpq -c "rv 0 offset"</code>. 
This option causes <code>ntpq</code> to include both lines of output
for a single-variable <code>readvar</code>. 
Using an environment variable to
preset this option in a script will enable both older and
newer <code>ntpq</code> to behave identically in this regard. 
<div class="node">
<p><hr>
<a name="ntpq-peers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-refid">ntpq refid</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-old_002drv">ntpq old-rv</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<br>
</div>

<h4 class="subsection">peers option (-p)</h4>

<p><a name="index-ntpq_002dpeers-10"></a>
This is the &ldquo;print a list of the peers&rdquo; option.

<p class="noindent">This option has some usage constraints.  It:
     <ul>
<li>must not appear in combination with any of the following options:
interactive. 
</ul>

  <p>Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'peers' interactive command. 
<div class="node">
<p><hr>
<a name="ntpq-refid"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-wide">ntpq wide</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-peers">ntpq peers</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<br>
</div>

<h4 class="subsection">refid option (-r)</h4>

<p><a name="index-ntpq_002drefid-11"></a>
This is the &ldquo;set default display type for s2+ refids&rdquo; option. 
This option takes a keyword argument.

<p class="noindent">This option has some usage constraints.  It:
     <ul>
<li>This option takes a keyword as its argument. 
The argument sets an enumeration value that can be tested by comparing the option value macro (OPT_VALUE_REFID). 
The available keywords are:
     <pre class="example">             hash ipv4
    </pre>
     <p>or their numeric equivalent.</ul>

  <p>Set the default display format for S2+ refids. 
<div class="node">
<p><hr>
<a name="ntpq-wide"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-config">ntpq config</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-refid">ntpq refid</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<br>
</div>

<h4 class="subsection">wide option (-w)</h4>

<p><a name="index-ntpq_002dwide-12"></a>
This is the &ldquo;display the full 'remote' value&rdquo; option. 
Display the full value of the 'remote' value.  If this requires
more than 15 characters, display the full value, emit a newline,
and continue the data display properly indented on the next line.

<div class="node">
<p><hr>
<a name="ntpq-config"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-exit-status">ntpq exit status</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-wide">ntpq wide</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<br>
</div>

<h4 class="subsection">presetting/configuring ntpq</h4>

<p>Any option that is not marked as <i>not presettable</i> may be preset by
loading values from configuration ("rc" or "ini") files, and values from environment variables named <code>NTPQ</code> and <code>NTPQ_&lt;OPTION_NAME&gt;</code>.  <code>&lt;OPTION_NAME&gt;</code> must be one of
the options listed above in upper case and segmented with underscores. 
The <code>NTPQ</code> variable will be tokenized and parsed like
the command line.  The remaining variables are tested for existence and their
values are treated like option arguments.

<p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
     <ul>
<li>$HOME
<li>$PWD
</ul>
  The environment variables <code>HOME</code>, and <code>PWD</code>
are expanded and replaced when <span class="file">ntpq</span> runs. 
For any of these that are plain files, they are simply processed. 
For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
within that directory and processed.

  <p>Configuration files may be in a wide variety of formats. 
The basic format is an option name followed by a value (argument) on the
same line.  Values may be separated from the option name with a colon,
equal sign or simply white space.  Values may be continued across multiple
lines by escaping the newline with a backslash.

  <p>Multiple programs may also share the same initialization file. 
Common options are collected at the top, followed by program specific
segments.  The segments are separated by lines like:
<pre class="example">    [NTPQ]
</pre>
  <p class="noindent">or by
<pre class="example">    &lt;?program ntpq&gt;
</pre>
  <p class="noindent">Do not mix these styles within one configuration file.

  <p>Compound values and carefully constructed string values may also be
specified using XML syntax:
<pre class="example">    &lt;option-name&gt;
       &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
    &lt;/option-name&gt;
</pre>
  <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
<pre class="example">    "...&lt;...&gt;..."
</pre>
  <p><code>AutoOpts</code> does not track suboptions.  You simply note that it is a
hierarchicly valued option.  <code>AutoOpts</code> does provide a means for searching
the associated name/value pair list (see: optionFindValue).

  <p>The command line options relating to configuration and/or usage help are:

<h5 class="subsubheading">version (-)</h5>

<p>Print the program version to standard out, optionally with licensing
information, then exit 0.  The optional argument specifies how much licensing
detail to provide.  The default is to print just the version.  The licensing infomation may be selected with an option argument. 
Only the first letter of the argument is examined:

     <dl>
<dt><span class="samp">version</span><dd>Only print the version.  This is the default. 
<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms. 
<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms. 
</dl>

<div class="node">
<p><hr>
<a name="ntpq-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-config">ntpq config</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<br>
</div>

<h4 class="subsection">ntpq exit status</h4>

<p>One of the following exit values will be returned:
     <dl>
<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution. 
<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid. 
<br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded. 
<br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error.  Please report
it to autogen-users@lists.sourceforge.net.  Thank you. 
</dl>

<div class="node">
<p><hr>
<a name="Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Internal-Commands">Internal Commands</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-Description">ntpq Description</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<!-- node-name,  next,  previous,  up -->
<h3 class="section">Usage</h3>

<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
<br></th></tr><tr align="left"><td valign="top" width="23%">configuration file
</td><td valign="top" width="23%"><code>/etc/ntp.conf</code>
</td><td valign="top" width="5%"><code>-c</code>
</td><td valign="top" width="15%"><code>conffile</code>
<br></td></tr><tr align="left"><td valign="top" width="23%">frequency file
</td><td valign="top" width="23%">none
</td><td valign="top" width="5%"><code>-f</code>
</td><td valign="top" width="15%"><code>driftfile</code>
<br></td></tr><tr align="left"><td valign="top" width="23%">leapseconds file
</td><td valign="top" width="23%">none
</td><td valign="top" width="5%">
</td><td valign="top" width="15%"><code>leapfile</code>
<br></td></tr><tr align="left"><td valign="top" width="23%">process ID file
</td><td valign="top" width="23%">none
</td><td valign="top" width="5%"><code>-p</code>
</td><td valign="top" width="15%"><code>pidfile</code>
<br></td></tr><tr align="left"><td valign="top" width="23%">log file
</td><td valign="top" width="23%">system log
</td><td valign="top" width="5%"><code>-l</code>
</td><td valign="top" width="15%"><code>logfile</code>
<br></td></tr><tr align="left"><td valign="top" width="23%">include file
</td><td valign="top" width="23%">none
</td><td valign="top" width="5%">none
</td><td valign="top" width="15%"><code>includefile</code>
<br></td></tr><tr align="left"><td valign="top" width="23%">statistics path
</td><td valign="top" width="23%"><code>/var/NTP</code>
</td><td valign="top" width="5%"><code>-s</code>
</td><td valign="top" width="15%"><code>statsdir</code>
<br></td></tr><tr align="left"><td valign="top" width="23%">keys path
</td><td valign="top" width="23%"><code>/usr/local/etc</code>
</td><td valign="top" width="5%"><code>-k</code>
</td><td valign="top" width="15%"><code>keysdir</code>
<br></td></tr></table>

<div class="node">
<p><hr>
<a name="Internal-Commands"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Control-Message-Commands">Control Message Commands</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Usage">Usage</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<!-- node-name,  next,  previous,  up -->
<h3 class="section">Internal Commands</h3>

<p>Interactive format commands consist of a keyword followed by zero to four arguments.  Only enough characters of the full keyword to uniquely identify the command need be typed.  The output of a command is normally sent to the standard output, but optionally the output of individual commands may be sent to a file by appending a <code>&gt;</code>, followed by a file name, to the command line.  A number of interactive format commands are executed entirely within the <code>ntpq</code> program itself and do not result in NTP mode-6 requests being sent to a server.  These are described following.

     <dl>
<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.

     <br><dt><code><a name="addvars"></a> &gt;addvars </code><kbd>name</kbd><code> [ = </code><kbd>value</kbd><code>] [...]</code><dt><code>rmvars </code><kbd>name</kbd><code> [...]</code><dt><code>clearvars&lt;/dt&gt;</code><dd>The arguments to these commands consist of a list of items of the form
<kbd>name</kbd><code> = </code><kbd>value</kbd>, where the <code>= </code><kbd>value</kbd> is ignored,
and can be omitted in read requests. 
<code>ntpq</code> maintains an internal list in which data to be included
in control messages can be assembled, and sent using the <code>readlist</code>
and <code>writelist</code> commands described below. 
The <code>addvars</code> command allows variables and optional values
to be added to the list. 
If more than one variable is to be added
the list should be comma-separated and not contain white space. 
The <code>rmvars</code> command can be used to remove individual variables
from the list,
while the <code>clearlist</code> command removes all variables from the list.

     <br><dt><code><a name="cooked"></a> cooked</code><dd>Display server messages in prettyprint format.

     <br><dt><code><a name="debug"></a> debug more | less | off</code><dd>Turns internal query program debugging on and off.

     <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.

     <br><dt><code><a name="host"></a> host </code><kbd>name</kbd><dd>Set the host to which future queries will be sent. 
The name may be either a DNS name or a numeric address.

     <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. 
If <code>no</code> is specified, numeric addresses are printed instead. 
The default is <code>yes</code>,
unless modified using the command line <code>-n</code> switch.

     <br><dt><code><a name="keyid"></a> keyid </code><kbd>keyid</kbd><dd>This command specifies the key number to be used
to authenticate configuration requests. 
This must correspond to a key ID configured in <code>ntp.conf</code> for this purpose.

     <br><dt><code><a name="keytype"></a> keytype</code><dd>Specify the digest algorithm to use for authenticated requests,
with default <code>MD5</code>. 
If the OpenSSL library is installed,
digest can be be any message digest algorithm supported by the library. 
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>.

     <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. 
Defaults to 2. 
Note that mode-6 control messages (and modes, for that matter)
didn't exist in NTP version 1.

     <br><dt><code><a name="passwd"></a> passwd</code><dd>This command prompts for a password to authenticate requests. 
The password must correspond to the key ID configured in <code>ntp.conf</code> for this purpose.

     <br><dt><code><a name="quit"></a> quit</code><dd>Exit <code>ntpq</code>.

     <br><dt><code><a name="raw"></a> raw</code><dd>Display server messages as received and without reformatting.

     <br><dt><code><a name="timeout"></a> timeout </code><kbd>millseconds</kbd><dd>Specify a timeout period for responses to server queries. 
The default is about 5000 milliseconds. 
Note that since <code>ntpq</code> retries each query once after a timeout
the total waiting time for a timeout will be twice the timeout value set.

  </dl>

<div class="node">
<p><hr>
<a name="Control-Message-Commands"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Internal-Commands">Internal Commands</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<!-- node-name,  next,  previous,  up -->
<h3 class="section">Control Message Commands</h3>

<p>Association IDs are used to identify system, peer and clock variables. 
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. 
Most control commands send a single mode-6 message to the server
and expect a single response message. 
The exceptions are the <code>peers</code> command,
which sends a series of messages,
and the <code>mreadlist</code> and <code>mreadvar</code> commands,
which iterate over a range of associations.

  <p><a name="as"></a>
     <dl>
<dt><code>associations</code><dd>Display a list of mobilized associations in the form:
<br>
<code>ind assid status conf reach auth condition last_event cnt</code>

     <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="40%">Description

     <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>ind</code>
</td><td valign="top" width="40%">index on this list

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>assid</code>
</td><td valign="top" width="40%">association ID

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
</td><td valign="top" width="40%"><a href="decode.html#peer">peer status word</a>

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>conf</code>
</td><td valign="top" width="40%"><code>yes</code>: persistent, <code>no</code>: ephemeral

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
</td><td valign="top" width="40%"><code>yes</code>: reachable, <code>no</code>: unreachable

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>auth</code>
</td><td valign="top" width="40%"><code>ok</code>, <code>yes</code>, <code>bad</code> and <code>none</code>

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>condition</code>
</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>)

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>last_event</code>
</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>)

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>cnt</code>
event count (see the <code>count</code> field of the <a href="decode.html#peer">peer status word</a>)

     <br></td></tr></table>

     <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.

     <br><dt><code><a name="_003aconfig"></a> :config [...]</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 the configuration file. 
This command is experimental until further notice and clarification. 
Authentication is of course required.

     <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
run-time configuration commands in the same format as the configuration file. 
This command is experimental until further notice and clarification. 
Authentication is required.

     <br><dt><code><a name="ifstats"></a> ifstats</code><dd>Display statistics for each local network address. 
Authentication is required.

     <br><dt><code><a name="iostats"></a> iostats</code><dd>Display network and reference clock I/O statistics.

     <br><dt><code><a name="kerninfo"></a> 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.

     <br><dt><code><a name="lassoc"></a> lassociations</code><dd>Perform the same function as the associations command,
except display mobilized and unmobilized associations.

     <br><dt><code><a name="monstats"></a> monstats</code><dd>Display monitor facility statistics.

     <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
the monitor facility. 
With the exception of <code>sort=</code><kbd>sortorder</kbd>,
the options filter the list returned by <code>ntpd</code>. 
The <code>limited</code> and <code>kod</code> options return only entries
representing client addresses from which the last packet received
triggered either discarding or a KoD response. 
The <code>mincount=</code><kbd>count</kbd> option filters entries representing
less than <kbd>count</kbd> packets. 
The <code>laddr=</code><kbd>localaddr</kbd> option filters entries for packets
received on any local address other than <kbd>localaddr</kbd>. 
<code>resany=</code><kbd>hexmask</kbd> and <code>resall=</code><kbd>hexmask</kbd>
filter entries containing none or less than all, respectively,
of the bits in <kbd>hexmask</kbd>, which must begin with <code>0x</code>. 
<br>
The <kbd>sortorder</kbd> defaults to <code>lstint</code> and may be any of
<code>addr</code>, <code>count</code>, <code>avgint</code>, <code>lstint</code>, or
any of those preceded by a minus sign (hyphen) to reverse the sort order. 
The output columns are:

     <p><table summary=""><tr align="left"><th valign="top" width="10%">Column </th><th valign="top" width="40%">Description

     <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>lstint</code>
</td><td valign="top" width="40%">
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 <code>ntpq</code>

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>avgint</code>
</td><td valign="top" width="40%">
Average interval in s between packets from this address.

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rstr</code>
</td><td valign="top" width="40%">
Restriction flags associated with this address. 
Most are copied unchanged from the matching <code>restrict</code> command,
however 0x400 (kod) and 0x20 (limited) flags are cleared unless
the last packet from this address triggered a rate control response.

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>r</code>
</td><td valign="top" width="40%">
Rate control indicator, either a period, <code>L</code> or <code>K</code> for
no rate control response, rate limiting by discarding, or
rate limiting with a KoD response, respectively.

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>m</code>
</td><td valign="top" width="40%">
Packet mode. 
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>v</code>
</td><td valign="top" width="40%">
Packet version number.

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>count</code>
</td><td valign="top" width="40%">
Packets received from this address.

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rport</code>
</td><td valign="top" width="40%">
Source port of last packet from this address.

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>remote address</code>
</td><td valign="top" width="40%">
DNS name, numeric address, or address followed by claimed DNS name which
could not be verified in parentheses.

     <br></td></tr></table>

     <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,
except for a range of association IDs. 
This range is determined from the association list cached by
the most recent <code>associations</code> command.

     <br><dt><code><a name="passoc"></a> passociations</code><dd>Perform the same function as the <code>associations command</code>, except that
it uses previously stored data rather than making a new query.

     <br><dt><code><a name="pe"></a> peers</code><dd>Display a list of peers in the form:
<br>
<code>[tally]remote refid st t when pool reach delay offset jitter</code>

     <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
<br></th></tr><tr align="left"><td valign="top" width="10%"><code>[tally]</code>
</td><td valign="top" width="20%">
single-character code indicating current value of the <code>select</code> field
of the <a href="decode.html#peer">peer status word</a>.

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>remote</code>
</td><td valign="top" width="20%">
host name (or IP number) of peer

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
</td><td valign="top" width="20%">
association ID or <a href="decode.html#kiss">kiss code</a>.

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>st</code>
</td><td valign="top" width="20%">
stratum

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>t</code>
</td><td valign="top" width="20%">
<code>u</code>: unicast or manycast client,
<code>b</code>: broadcast or multicast client,
<code>l</code>: local (reference clock),
<code>s</code>: symmetric (peer),
<code>A</code>: manycast server,
<code>B</code>: broadcast server,
<code>M</code>: multicast server.

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>when</code>
</td><td valign="top" width="20%">
sec/min/hr since last received packet

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>poll</code>
</td><td valign="top" width="20%">
poll interval (log(2) s)

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
</td><td valign="top" width="20%">
reach shift register (octal)

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>delay</code>
</td><td valign="top" width="20%">
roundtrip delay

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
</td><td valign="top" width="20%">
offset of server relative to this host

     <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>jitter</code>
</td><td valign="top" width="20%">
jitter

     <br></td></tr></table>

     <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. 
If <kbd>assocID</kbd> is zero,
the variables are from the <a href="#system">system variables</a> name space,
otherwise they are from the <a href="#peer">peer variables</a> name space. 
The <kbd>assocID</kbd> is required, as the same name can occur in both spaces. 
If no <kbd>name</kbd> is included,
all operative variables in the name space are displayed. 
In this case only, if the <kbd>assocID</kbd> is omitted, it is assumed zero. 
Multiple names are specified with comma separators and without whitespace. 
Note that time values are represented in milliseconds and
frequency values in parts-per-million (PPM). 
Some NTP timestamps are represented in the format YYYYMMDDTTTT,
where YYYY is the year, MM the month of year, DD the day of month and
TTTT the time of day.

     <br><dt><code><a name="saveconfig"></a> saveconfig </code><kbd>filename</kbd><dd>Write the current configuration, including any runtime modifications
given with <code>:config</code> or <code>config-from-file</code>,
to the ntpd host's file <kbd>filename</kbd>. 
This command will be rejected by the server unless
<a href="miscopt.html#saveconfigdir">saveconfigdir</a>
appears in the <code>ntpd</code> configuration file. 
<kbd>filename</kbd> can use <code>strftime()</code> format specifiers
to substitute the current date and time, for example,
<code>saveconfig ntp-%Y%m%d-%H%M%S.conf</code>. 
The filename used is stored in system variable <code>savedconfig</code>. 
Authentication is required.

     <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. 
If the <kbd>assocID</kbd> is zero, the variables are from the
<a href="#system">system variables</a> name space, otherwise they are from the
<a href="#peer">peer variables</a> name	space. 
The <kbd>assocID</kbd> is required,
as the same name can occur in both spaces.

     <br><dt><code><a name="sysinfo"></a> sysinfo</code><dd>Display operational summary.

     <br><dt><code><a name="sysstats"></a> sysstats</code><dd>Print statistics counters maintained in the protocol module.

  </dl>

<div class="node">
<p><hr>
<a name="Status-Words-and-Kiss-Codes"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#System-Variables">System Variables</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Control-Message-Commands">Control Message Commands</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<!-- node-name,  next,  previous,  up -->
<h3 class="section">Status Words and Kiss Codes</h3>

<p>The current state of the operating program is shown
in a set of status words maintained by the system
and each association separately. 
These words are displayed in the <code>rv</code> and <code>as</code> commands
both in hexadecimal and decoded short tip strings. 
The codes, tips and short explanations are on the
<a href="decode.html">Event Messages and Status Words</a> page. 
The page also includes a list of system and peer messages,
the code for the latest of which is included in the status word.

  <p>Information resulting from protocol machine state transitions
is displayed using an informal set of ASCII strings called
<a href="decode.html#kiss">kiss codes</a>. 
The original purpose was for kiss-o'-death (KoD) packets sent
by the server to advise the client of an unusual condition. 
They are now displayed, when appropriate,
in the reference identifier field in various billboards.

<div class="node">
<p><hr>
<a name="System-Variables"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Peer-Variables">Peer Variables</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<!-- node-name,  next,  previous,  up -->
<h3 class="section">System Variables</h3>

<p>The following system variables appear in the <code>rv</code> billboard. 
Not all variables are displayed in some configurations.

  <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description

<p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
</td><td valign="top" width="20%">
<a href="decode.html#sys">system status word</a>

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>version</code>
</td><td valign="top" width="20%">
NTP software version and build time

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>processor</code>
</td><td valign="top" width="20%">
hardware platform and version

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>system</code>
</td><td valign="top" width="20%">
operating system and version

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leap</code>
</td><td valign="top" width="20%">
leap warning indicator (0-3)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
</td><td valign="top" width="20%">
stratum (1-15)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>precision</code>
</td><td valign="top" width="20%">
precision (log(2) s)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdelay</code>
</td><td valign="top" width="20%">
total roundtrip delay to the primary reference clock

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdisp</code>
</td><td valign="top" width="20%">
total dispersion to the primary reference clock

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>peer</code>
</td><td valign="top" width="20%">
system peer association ID

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>tc</code>
time constant and poll exponent (log(2) s) (3-17)

  <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>mintc</code>
minimum time constant (log(2) s) (3-10)

  <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clock</code>
</td><td valign="top" width="20%">
date and time of day

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
reference ID or <a href="decode.html#kiss">kiss code</a>

  <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reftime</code>
</td><td valign="top" width="20%">
reference time

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
</td><td valign="top" width="20%">
combined offset of server relative to this host

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>sys_jitter</code>
</td><td valign="top" width="20%">
combined system jitter

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>frequency</code>
</td><td valign="top" width="20%">
frequency offset (PPM) relative to hardware clock

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clk_wander</code>
</td><td valign="top" width="20%">
clock frequency wander (PPM)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clk_jitter</code>
</td><td valign="top" width="20%">
clock jitter

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>tai</code>
</td><td valign="top" width="20%">
TAI-UTC offset (s)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leapsec</code>
</td><td valign="top" width="20%">
NTP seconds when the next leap second is/was inserted

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>expire</code>
</td><td valign="top" width="20%">
NTP seconds when the NIST leapseconds file expires

  <br></td></tr></table>

  <p>The jitter and wander statistics are exponentially-weighted RMS averages. 
The system jitter is defined in the NTPv4 specification;
the clock jitter statistic is computed by the clock discipline module.

  <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
additional system variables are displayed, including some or all of the
following, depending on the particular Autokey dance:

  <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description

<p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>host</code>
</td><td valign="top" width="20%">
Autokey host name for this host

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>ident</code>
</td><td valign="top" width="20%">
Autokey group name for this host

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
</td><td valign="top" width="20%">
host flags  (see Autokey specification)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>digest</code>
</td><td valign="top" width="20%">
OpenSSL message digest algorithm

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>signature</code>
</td><td valign="top" width="20%">
OpenSSL digest/signature scheme

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>update</code>
</td><td valign="top" width="20%">
NTP seconds at last signature update

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>cert</code>
</td><td valign="top" width="20%">
certificate subject, issuer and certificate flags

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>until</code>
</td><td valign="top" width="20%">
NTP seconds when the certificate expires

  <br></td></tr></table>

<div class="node">
<p><hr>
<a name="Peer-Variables"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Clock-Variables">Clock Variables</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#System-Variables">System Variables</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<!-- node-name,  next,  previous,  up -->
<h3 class="section">Peer Variables</h3>

<p>The following peer variables appear in the <code>rv</code> billboard
for each association. 
Not all variables are displayed in some configurations.

  <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description

<p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>associd</code>
</td><td valign="top" width="20%">
association ID

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
</td><td valign="top" width="20%">
<a href="decode.html#peer">peer status word</a>

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>srcadr</code>
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>srcport</code>
</td><td valign="top" width="20%">
source (remote) IP address and port

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>dstadr</code>
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>dstport</code>
</td><td valign="top" width="20%">
destination (local) IP address and port

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leap</code>
</td><td valign="top" width="20%">
leap indicator (0-3)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
</td><td valign="top" width="20%">
stratum (0-15)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>precision</code>
</td><td valign="top" width="20%">
precision (log(2) s)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdelay</code>
</td><td valign="top" width="20%">
total roundtrip delay to the primary reference clock

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdisp</code>
</td><td valign="top" width="20%">total root dispersion to the primary reference clock

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
</td><td valign="top" width="20%">
reference ID or <a href="decode.html#kiss">kiss code</a>

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reftime</code>
</td><td valign="top" width="20%">
reference time

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
</td><td valign="top" width="20%">
reach register (octal)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>unreach</code>
</td><td valign="top" width="20%">
unreach counter

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>hmode</code>
</td><td valign="top" width="20%">
host mode (1-6)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>pmode</code>
</td><td valign="top" width="20%">
peer mode (1-5)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>hpoll</code>
</td><td valign="top" width="20%">
host poll exponent (log(2) s) (3-17)
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>ppoll</code>
</td><td valign="top" width="20%">
peer poll exponent (log(2) s) (3-17)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>headway</code>
</td><td valign="top" width="20%">
headway (see <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a>)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flash</code>
</td><td valign="top" width="20%">
<a href="decode.html#flash">flash status word</a>

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
</td><td valign="top" width="20%">
filter offset

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>delay</code>
</td><td valign="top" width="20%">
filter delay

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>dispersion</code>
</td><td valign="top" width="20%">
filter dispersion

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>jitter</code>
</td><td valign="top" width="20%">
filter jitter

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>ident</code>
</td><td valign="top" width="20%">
Autokey group name for this association

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>bias</code>
</td><td valign="top" width="20%">
unicast/broadcast bias

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>xleave</code>
</td><td valign="top" width="20%">
interleave delay (see <a href="xleave.html">NTP Interleaved Modes</a>)

  <br></td></tr></table>

  <p>The bias variable is calculated when the first broadcast packet is received
after the calibration volley.  It represents the offset of the broadcast
subgraph relative to the unicast subgraph.  The xleave variable appears
only the interleaved symmetric and interleaved modes.  It represents
the internal queuing, buffering and transmission delays for the preceding
packet.

  <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
additional peer variables are displayed, including the following:

  <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description

<p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
</td><td valign="top" width="20%">
peer flags (see Autokey specification)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>host</code>
</td><td valign="top" width="20%">
Autokey server name

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
</td><td valign="top" width="20%">
peer flags (see Autokey specification)

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>signature</code>
</td><td valign="top" width="20%">
OpenSSL digest/signature scheme

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>initsequence</code>
</td><td valign="top" width="20%">
initial key ID

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>initkey</code>
</td><td valign="top" width="20%">
initial key index

<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>timestamp</code>
</td><td valign="top" width="20%">
Autokey signature timestamp

  <br></td></tr></table>

<div class="node">
<p><hr>
<a name="Clock-Variables"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Peer-Variables">Peer Variables</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<!-- node-name,  next,  previous,  up -->
<h3 class="section">Clock Variables</h3>

<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.

  <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
<br></th></tr><tr align="left"><td valign="top" width="10%"><code>associd</code>
</td><td valign="top" width="20%">association ID
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
</td><td valign="top" width="20%"><a href="decode.html#clock">clock status word</a>
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>device</code>
</td><td valign="top" width="20%">device description
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>timecode</code>
</td><td valign="top" width="20%">ASCII time code string (specific to device)
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>poll</code>
</td><td valign="top" width="20%">poll messages sent
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>noreply</code>
</td><td valign="top" width="20%">no reply
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>badformat</code>
</td><td valign="top" width="20%">bad format
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>baddata</code>
</td><td valign="top" width="20%">bad date or time
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>fudgetime1</code>
</td><td valign="top" width="20%">fudge time 1
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>fudgetime2</code>
</td><td valign="top" width="20%">fudge time 2
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
</td><td valign="top" width="20%">driver stratum
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
</td><td valign="top" width="20%">driver reference ID
<br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
</td><td valign="top" width="20%">driver flags
  <br></td></tr></table>

</body></html>