xref: /freebsd/contrib/ntp/html/ntpq.html (revision 13ea0450a9c8742119d36f3bf8f47accdce46e54)
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
5<meta name="generator" content="HTML Tidy, see www.w3.org">
6<title>ntpq - standard NTP query program</title>
7<link href="scripts/style.css" type="text/css" rel="stylesheet">
8</head>
9<body>
10<h3><tt>ntpq</tt> - standard NTP query program</h3>
11<img src="pic/bustardfly.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
12<p>A typical NTP monitoring packet</p>
13<p>Last update:
14  <!-- #BeginDate format:En2m -->24-Jan-2018  08:35<!-- #EndDate -->
15    UTC</p>
16<br clear="left">
17<h4>More Help</h4>
18<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
19<hr>
20<h4>Synopsis</h4>
21<tt>ntpq [-46dinp] [-c <i>command</i>] [<i>host</i>] [...]</tt>
22<h4>Description</h4>
23<p>The <tt>ntpq</tt> utility program is used to monitor NTP daemon <tt>ntpd</tt> operations
24  and determine performance. It uses the standard NTP mode 6 control
25  message formats defined in Appendix B of the NTPv3 specification
26  RFC1305. The same formats are used in NTPv4, although some of the
27  variable names have changed and new ones added. The description
28  on this page is for the NTPv4 variables.</p>
29<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 <tt>ntpq</tt> can also obtain and print a list of peers in a common format by sending multiple queries to the server.</p>
30<p>If one or more request options is included on the command line when <tt>ntpq</tt> 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, <tt>ntpq</tt> 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. <tt>ntpq</tt> will prompt for commands if the standard input is a terminal device.</p>
31<p><tt>ntpq</tt> 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. <tt>ntpq</tt> 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>
32<p>Note that in contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</p>
33<p>For examples and usage, see the <a href="debug.html">NTP Debugging Techniques</a> page.</p>
34<p>Command line options are described following. Specifying a command line option other than <tt>-i</tt> or <tt>-n</tt> will cause the specified query (queries) to be sent to the indicated host(s) immediately. Otherwise, <tt>ntpq</tt> will attempt to read interactive format commands from the standard input.</p>
35<dl>
36  <dt><tt>-4</tt></dt>
37  <dd>Force DNS resolution of following host names on the command line to the IPv4 namespace.</dd>
38  <dt><tt>-6</tt></dt>
39  <dd>Force DNS resolution of following host names on the command line to the IPv6 namespace.</dd>
40  <dt><tt>-c</tt></dt>
41  <dd>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). Multiple <tt>-c</tt> options may be given.</dd>
42  <dt><tt>-d</tt></dt>
43  <dd>Turn on debugging mode.</dd>
44  <dt><tt>-i</tt></dt>
45  <dd>Force <tt>ntpq</tt> to operate in interactive mode. Prompts will be written to the standard output and commands read from the standard input.</dd>
46  <dt><tt>-n</tt></dt>
47  <dd>Output all host addresses in dotted-quad numeric format rather than converting to the canonical host names.</dd>
48  <dt><tt>-p</tt></dt>
49  <dd>Print a list of the peers known to the server as well as a summary of their state. This is equivalent to the <tt>peers</tt> interactive command.</dd>
50</dl>
51<h4>Internal Commands</h4>
52<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 <tt>&gt;</tt>, followed by a file name, to the command line. A number of interactive format commands are executed entirely within the <tt>ntpq</tt> program itself and do not result in NTP mode-6 requests being sent to a server. These are described following.</p>
53<dl>
54  <dt id="help"><tt>? [<i>command_keyword</i>]</tt><br>
55    <tt>help [<i>command_keyword</i>]</tt></dt>
56  <dd>A <tt>?</tt> by itself will print a list of all the command keywords known to <tt>ntpq</tt>. A <tt>?</tt> followed by a command keyword will print function and usage information about the command.</dd>
57  <dt id="addvars"><tt>addvars <i>name</i> [ = <i>value</i>] [...]</tt><br>
58    <tt>rmvars <i>name</i> [...]</tt><br>
59    <tt>clearvars</tt></dt>
60  <dd>The arguments to this command consist of a list of items of the form <tt><i>name</i> = <i>value</i></tt>, where the <tt>= <i>value</i></tt> is ignored, and can be omitted in read requests. <tt>ntpq</tt> maintains an internal list in which data to be included in control messages can be assembled, and sent using the <tt>readlist</tt> and <tt>writelist</tt> commands described below. The <tt>addvars</tt> 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 <tt>rmvars</tt> command can be used to remove individual variables from the list, while the <tt>clearlist</tt> command removes all variables from the list.</dd>
61  <dt id="cooked"><tt>cooked</tt></dt>
62  <dd>Display server messages in prettyprint format.</dd>
63  <dt id="debug"><tt>debug more | less | off</tt></dt>
64  <dd>Turns internal query program debugging on and off.</dd>
65  <dt id="delay"><tt>delay <i>milliseconds</i></tt></dt>
66  <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.</dd>
67  <dt id="host"><tt>host <i>name</i></tt></dt>
68  <dd>Set the host to which future queries will be sent. The name may be either a DNS name or a numeric address.</dd>
69  <dt id="hostnames"><tt>hostnames [yes | no]</tt></dt>
70  <dd>If <tt>yes</tt> is specified, host names are printed in information displays. If <tt>no</tt> is specified, numeric addresses are printed instead. The default is <tt>yes</tt>, unless modified using the command line <tt>-n</tt> switch.</dd>
71  <dt id="keyid"><tt>keyid <i>keyid</i></tt></dt>
72  <dd>This command specifies the key number to be used to authenticate configuration requests. This must correspond to a key ID configured in <tt>ntp.conf</tt> for this purpose.</dd>
73  <dt id="keytype"><tt>keytype</tt></dt>
74  <dd>Specify the digest algorithm to use for authenticated requests, with default <tt>MD5</tt>. If the OpenSSL library is installed, digest can be be any message digest algorithm supported by the library. The current selections are: <tt>MD2</tt>, <tt>MD4</tt>, <tt>MD5</tt>, <tt>MDC2</tt>, <tt>RIPEMD160</tt>, <tt>SHA</tt>, <tt>SHA1</tt>, and <tt>AES128CMAC</tt>.</dd>
75  <dt id="ntpversion"><tt>ntpversion 1 | 2 | 3 | 4</tt></dt>
76  <dd>Sets the NTP version number which <tt>ntpq</tt> claims in packets. Defaults to 2, Note that mode-6 control messages (and modes, for that matter) didn't exist in NTP version 1.</dd>
77  <dt id="passwd"><tt>passwd</tt></dt>
78  <dd>This command prompts for a password to authenticate requests. The password must correspond to the key ID configured in <tt>ntp.conf</tt> for this purpose.</dd>
79  <dt id="quit"><tt>quit</tt></dt>
80  <dd>Exit <tt>ntpq</tt>.</dd>
81  <dt id="raw"><tt>raw</tt></dt>
82  <dd>Display server messages as received and without reformatting.</dd>
83  <dt id="timeout"><tt>timeout <i>millseconds</i></tt></dt>
84  <dd>Specify a timeout period for responses to server queries. The default is about 5000 milliseconds. Note that since <tt>ntpq</tt> retries each query once after a timeout, the total waiting time for a timeout will be twice the timeout value set.</dd>
85</dl>
86<h4>Control Message Commands</h4>
87<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 <tt>peers</tt> command, which sends a series of messages, and the <tt>mreadlist</tt> and <tt>mreadvar</tt> commands, which iterate over a range of associations.</p>
88<dl>
89  <dt id="as"><tt>associations</tt></dt>
90  <dd>Display a list of mobilized associations in the form</dd>
91  <dd><tt>ind assid status conf reach auth condition last_event cnt</tt></dd>
92  <dd>
93    <table width="100%" border="1" cellspacing="2" cellpadding="2">
94      <tr>
95        <td>Variable</td>
96        <td>Description</td>
97      </tr>
98      <tr>
99        <td><tt>ind</tt></td>
100        <td>index on this list</td>
101      </tr>
102      <tr>
103        <td><tt>assid</tt></td>
104        <td>association ID</td>
105      </tr>
106      <tr>
107        <td><tt>status</tt></td>
108        <td><a href="decode.html#peer">peer status word</a></td>
109      </tr>
110      <tr>
111        <td><tt>conf</tt></td>
112        <td><tt>yes</tt>: persistent, <tt>no</tt>: ephemeral</td>
113      </tr>
114      <tr>
115        <td><tt>reach</tt></td>
116        <td><tt>yes</tt>: reachable, <tt>no</tt>: unreachable</td>
117      </tr>
118      <tr>
119        <td><tt>auth</tt></td>
120        <td><tt>ok</tt>, <tt>yes</tt>, <tt>bad</tt> and <tt>none</tt></td>
121      </tr>
122      <tr>
123        <td><tt>condition</tt></td>
124        <td>selection status (see the <tt>select</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
125      </tr>
126      <tr>
127        <td><tt>last_event</tt></td>
128        <td>event report (see the <tt>event</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
129      </tr>
130      <tr>
131        <td><tt>cnt</tt></td>
132        <td>event count (see the <tt>count</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
133      </tr>
134    </table>
135  </dd>
136  <dt id="cv"><tt>clockvar <i>assocID</i> [<i>name</i> [ = <i>value</i> [...]] [...]</tt><br>
137    <tt>cv <i>assocID</i> [<i>name</i> [ = <i>value</i> [...] ][...]</tt></dt>
138  <dd>Display a list of <a href="#clock">clock variables</a> for those associations supporting a reference clock.</dd>
139  <dt id=":config"><tt>:config [...]</tt></dt>
140  <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.</dd>
141  <dt id="config-from-file"><tt>config-from-file <i>filename</i></tt></dt>
142  <dd>Send the each line of <i>filename</i> 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.</dd>
143  <dt id="ifstats"><tt>ifstats</tt></dt>
144  <dd>Display statistics for each local network address. Authentication is required.</dd>
145  <dt id="iostats"><tt>iostats</tt></dt>
146  <dd>Display network and reference clock I/O statistics.</dd>
147  <dt id="kerninfo"><tt>kerninfo</tt></dt>
148  <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.</dd>
149  <dt id="lassoc"><tt>lassociations</tt></dt>
150  <dd>Perform the same function as the associations command, except display mobilized and unmobilized associations.</dd>
151  <dt id="monstats"><tt>monstats</tt></dt>
152  <dd>Display monitor facility statistics.</dd>
153  <dt id="mrulist"><tt>mrulist [limited | kod | mincount=<i>count</i> | laddr=<i>localaddr</i> | sort=<i>sortorder</i> | resany=<i>hexmask</i> | resall=<i>hexmask</i>]</tt></dt>
154  <dd>Obtain and print traffic counts collected and maintained by the monitor facility. With the exception of <tt>sort=<i>sortorder</i></tt>, the options filter the list returned by <tt>ntpd</tt>. The <tt>limited</tt> and <tt>kod</tt> options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response. The <tt>mincount=<i>count</i></tt> option filters entries representing less than <tt><i>count</i></tt> packets. The <tt>laddr=<i>localaddr</i></tt> option filters entries for packets received on any local address other than <tt><i>localaddr</i></tt>. <tt>resany=<i>hexmask</i></tt> and <tt>resall=<i>hexmask</i></tt> filter entries containing none or less than all, respectively, of the bits in <tt><i>hexmask</i></tt>, which must begin with <tt>0x</tt>.</dd>
155  <dd>The <tt><i>sortorder</i></tt> defaults to <tt>lstint</tt> and may be any of <tt>addr</tt>, <tt>count</tt>, <tt>avgint</tt>, <tt>lstint</tt>, or any of those preceded by a minus sign (hyphen) to reverse the sort order. The output columns are:
156    <table width="100%" border="1" cellspacing="2" cellpadding="2">
157      <tr>
158        <td>Column</td>
159        <td>Description</td>
160      </tr>
161      <tr>
162        <td><tt>lstint</tt></td>
163        <td>Interval in s between the receipt of the most recent packet from this address and the completion of the
164          retrieval of the MRU list by <tt>ntpq</tt>.</td>
165      </tr>
166      <tr>
167        <td><tt>avgint</tt></td>
168        <td>Average interval in s between packets from this address.</td>
169      </tr>
170      <tr>
171        <td><tt>rstr</tt></td>
172        <td>Restriction flags associated with this address.  Most are copied unchanged from the matching <tt>restrict</tt> command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this
173          address triggered a rate control response.</td>
174      </tr>
175      <tr>
176        <td><tt>r</tt></td>
177        <td>Rate control indicator, either a period, <tt>L</tt> or <tt>K</tt> for no rate control response,
178          rate limiting by discarding, or rate limiting with a KoD response, respectively.</td>
179      </tr>
180      <tr>
181        <td><tt>m</tt></td>
182        <td>Packet mode.</td>
183      </tr>
184      <tr>
185        <td><tt>v</tt></td>
186        <td>Packet version number.</td>
187      </tr>
188      <tr>
189        <td><tt>count</tt></td>
190        <td>Packets received from this address.</td>
191      </tr>
192      <tr>
193        <td><tt>rport</tt></td>
194        <td>Source port of last packet from this address.</td>
195      </tr>
196      <tr>
197        <td><tt>remote address</tt></td>
198        <td>DNS name, numeric address, or address followed by claimed DNS name which
199          could not be verified in parentheses.</td>
200      </tr>
201    </table>
202  </dd>
203  <dt id="mreadvar"><tt>mreadvar <i>assocID</i> <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i>[ ... ]</tt></dt>
204  <dt id="mrv"><tt>mrv <i>assocID</i> <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i>[ ... ]</tt></dt>
205  <dd>Perform the same function as the <tt>readvar</tt> command, except for a range of association IDs. This range is determined from the association list cached by the most recent <tt>associations</tt> command.</dd>
206  <dt id="passoc"><tt>passociations</tt></dt>
207  <dd>Perform the same function as the <tt>associations command</tt>, except that it uses previously stored data rather than making a new query.</dd>
208  <dt id="pe"><tt>peers</tt></dt>
209  <dd>Display a list of peers in the form</dd>
210  <dd><tt>[tally]remote refid st t when pool reach delay offset jitter</tt></dd>
211  <dd>
212    <table width="100%" border="1" cellspacing="2" cellpadding="2">
213      <tr>
214        <td>Variable</td>
215        <td>Description</td>
216      </tr>
217      <tr>
218        <td><tt>[tally]</tt></td>
219        <td>single-character code indicating current value of the <tt>select</tt> field of the <a href="decode.html#peer">peer status word</a></td>
220      </tr>
221      <tr>
222        <td><tt>remote</tt></td>
223        <td>host name (or IP number) of peer</td>
224      </tr>
225      <tr>
226        <td><tt>refid</tt></td>
227        <td>association ID or <a href="decode.html#kiss">kiss code</a></td>
228      </tr>
229      <tr>
230        <td><tt>st</tt></td>
231        <td>stratum</td>
232      </tr>
233      <tr>
234        <td><tt>t</tt></td>
235        <td>
236	  <tt>u</tt>: unicast or manycast client,
237	  <tt>b</tt>: broadcast or multicast client,
238	  <tt>p</tt>: pool source,
239	  <tt>l</tt>: local (reference clock),
240	  <tt>s</tt>: symmetric (peer),
241	  <tt>A</tt>: manycast server,
242	  <tt>B</tt>: broadcast server,
243	  <tt>M</tt>: multicast server
244	</td>
245      </tr>
246      <tr>
247        <td><tt>when</tt></td>
248        <td>sec/min/hr since last received packet</td>
249      </tr>
250      <tr>
251        <td><tt>poll</tt></td>
252        <td>poll interval (log<sub>2</sub> s)</td>
253      </tr>
254      <tr>
255        <td><tt>reach</tt></td>
256        <td>reach shift register (octal)</td>
257      </tr>
258      <tr>
259        <td><tt>delay</tt></td>
260        <td>roundtrip delay</td>
261      </tr>
262      <tr>
263        <td><tt>offset</tt></td>
264        <td>offset of server relative to this host</td>
265      </tr>
266      <tr>
267        <td><tt>jitter</tt></td>
268        <td>jitter</td>
269      </tr>
270    </table>
271  </dd>
272  <dt id="rv"><tt>readvar <i>assocID</i> <i>name</i> [ = <i>value</i> ] [,...]</tt><br>
273    <tt>rv <i>assocID</i> [ <i>name</i> ] [,...]</tt></dt>
274  <dd>Display the specified variables. If <tt><i>assocID</i></tt> is zero, the
275    variables are from the <a href="#system">system variables</a> name space,
276    otherwise they are from the <a href="#peer">peer variables</a> name space.
277    The <tt><i>assocID</i></tt> is required, as the same name can occur in both spaces. If no <tt><i>name</i></tt> is
278    included, all operative variables in the name space are displayed.
279    In this case only, if the <tt><i>assocID</i></tt> is omitted, it is assumed zero. Multiple
280    names are specified with comma separators and without whitespace.
281    Note that time values are represented in milliseconds and frequency
282    values in parts-per-million (PPM). Some NTP timestamps are represented
283    in the format YYYYMMDDTTTT, where YYYY is the year, MM the month
284    of year, DD the day of month and TTTT the time of day.</dd>
285  <dt id="saveconfig"><tt>saveconfig <i>filename</i></tt></dt>
286  <dd>Write the current configuration, including any runtime modifications given with <tt>:config</tt> or <tt>config-from-file</tt>, to the ntpd host's file <i>filename</i>.  This command will be rejected by the server unless <a href="miscopt.html#saveconfigdir">saveconfigdir</a> appears in the <tt>ntpd</tt> configuration file. <i>filename</i> can use strftime() format specifies to substitute the current date and time, for example, <tt>saveconfig ntp-%Y%m%d-%H%M%S.conf</tt>. The filename used is stored in system variable <tt>savedconfig</tt>. Authentication is required.</dd>
287  <dt id="writevar"><tt>writevar <i>assocID</i> <i>name</i> = <i>value</i> [,...]</tt></dt>
288  <dd>Write the specified variables. If the <tt><i>assocID</i></tt> 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 <tt><i>assocID</i></tt> is required, as the same name can occur in both spaces.</dd>
289  <dt id="sysinfo"><tt>sysinfo</tt></dt>
290  <dd>Display operational summary.</dd>
291  <dt id="sysstats"><tt>sysstats</tt></dt>
292  <dd>Print statistics counters maintained in the protocol module.</dd>
293</dl>
294<h4 id="status">Status Words and Kiss Codes</h4>
295<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 <tt>rv</tt> and <tt>as</tt> 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>
296<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.</p>
297<h4 id="system">System Variables</h4>
298<p>The following system variables appear in the <tt>rv</tt> billboard. Not all variables are displayed in some configurations.</p>
299<table width="100%" border="1" cellspacing="2" cellpadding="2">
300  <tr>
301    <td>Variable</td>
302    <td>Description</td>
303  </tr>
304  <tr>
305    <td><tt>status</tt></td>
306    <td><a href="decode.html#sys">system status word</a></td>
307  </tr>
308  <tr>
309    <td><tt>version</tt></td>
310    <td>NTP software version and build time</td>
311  </tr>
312  <tr>
313    <td><tt>processor</tt></td>
314    <td>hardware platform and version</td>
315  </tr>
316  <tr>
317    <td><tt>system</tt></td>
318    <td>operating system and version</td>
319  </tr>
320  <tr>
321    <td><tt>leap</tt></td>
322    <td>leap warning indicator (0-3)</td>
323  </tr>
324  <tr>
325    <td><tt>stratum</tt></td>
326    <td>stratum (1-15)</td>
327  </tr>
328  <tr>
329    <td><tt>precision</tt></td>
330    <td>precision (log<sub>2</sub> s)</td>
331  </tr>
332  <tr>
333    <td><tt>rootdelay</tt></td>
334    <td>total roundtrip delay to the primary reference clock</td>
335  </tr>
336  <tr>
337    <td><tt>rootdisp</tt></td>
338    <td>total dispersion to the primary reference clock</td>
339  </tr>
340  <tr>
341    <td><tt>peer</tt></td>
342    <td>system peer association ID</td>
343  </tr>
344  <tr>
345    <td><tt>tc</tt></td>
346    <td>time constant and poll exponent (log<sub>2</sub> s) (3-17)</td>
347  </tr>
348  <tr>
349    <td><tt>mintc</tt></td>
350    <td>minimum time constant (log<sub>2</sub> s) (3-10)</td>
351  </tr>
352  <tr>
353    <td><tt>clock</tt></td>
354    <td>date and time of day</td>
355  </tr>
356  <tr>
357    <td><tt>refid</tt></td>
358    <td>reference ID or <a href="decode.html#kiss">kiss code</a></td>
359  </tr>
360  <tr>
361    <td><tt>reftime</tt></td>
362    <td>reference time</td>
363  </tr>
364  <tr>
365    <td><tt>offset</tt></td>
366    <td>combined  offset of server relative to this host</td>
367  </tr>
368  <tr>
369    <td><tt>sys_jitter</tt></td>
370    <td>combined system jitter</td>
371  </tr>
372  <tr>
373    <td><tt>frequency</tt></td>
374    <td> frequency offset (PPM) relative to hardware clock</td>
375  </tr>
376  <tr>
377    <td><tt>clk_wander</tt></td>
378    <td>clock frequency wander (PPM)</td>
379  </tr>
380  <tr>
381    <td><tt>clk_jitter</tt></td>
382    <td>clock jitter</td>
383  </tr>
384  <tr>
385    <td><tt>tai</tt></td>
386    <td>TAI-UTC offset (s)</td>
387  </tr>
388  <tr>
389    <td><tt>leapsec</tt></td>
390    <td>NTP seconds when the next leap second is/was inserted</td>
391  </tr>
392  <tr>
393    <td><tt>expire</tt></td>
394    <td>NTP seconds when the NIST leapseconds file expires</td>
395  </tr>
396</table>
397<dl>
398  <dt>The jitter and wander statistics are exponentially-weighted RMS averages.
399    The system jitter is defined in the NTPv4 specification; the
400    clock jitter statistic is computed by the clock discipline module.</dt>
401  <dt>When the NTPv4 daemon is compiled with the OpenSSL software library, additional
402    system variables are displayed, including some or all of the following, depending
403    on the particular Autokey dance:</dt>
404</dl>
405<table width="100%" border="1" cellspacing="2" cellpadding="2">
406  <tr>
407    <td>Variable</td>
408    <td>Description</td>
409  </tr>
410  <tr>
411    <td><tt>host</tt></td>
412    <td>Autokey host name for this host</td>
413  </tr>
414  <tr>
415    <td><tt>ident</tt></td>
416    <td>Autokey group name for this host</td>
417  </tr>
418  <tr>
419    <td><tt>flags</tt></td>
420    <td>host flags  (see Autokey specification)</td>
421  </tr>
422  <tr>
423    <td><tt>digest</tt></td>
424    <td>OpenSSL message digest algorithm</td>
425  </tr>
426  <tr>
427    <td><tt>signature</tt></td>
428    <td>OpenSSL digest/signature scheme</td>
429  </tr>
430  <tr>
431    <td><tt>update</tt></td>
432    <td>NTP seconds at last signature update</td>
433  </tr>
434  <tr>
435    <td><tt>cert</tt></td>
436    <td>certificate subject, issuer and certificate flags</td>
437  </tr>
438  <tr>
439    <td><tt>until</tt></td>
440    <td>NTP seconds when the certificate expires</td>
441  </tr>
442</table>
443<h4 id="peer">Peer Variables</h4>
444<p>The following peer variables appear in the <tt>rv</tt> billboard for each association. Not all variables are displayed in some configurations.</p>
445<table width="100%" border="1" cellspacing="2" cellpadding="2">
446  <tr>
447    <td>Variable</td>
448    <td>Description</td>
449  </tr>
450  <tr>
451    <td><tt>associd</tt></td>
452    <td>association ID</td>
453  </tr>
454  <tr>
455    <td><tt>status</tt></td>
456    <td><a href="decode.html#peer">peer status word</a></td>
457  </tr>
458  <tr>
459    <td><tt>srcadr<br>
460      srcport</tt></td>
461    <td>source (remote) IP address and port</td>
462  </tr>
463  <tr>
464    <td><tt>dstadr<br>
465      dstport</tt></td>
466    <td>destination (local) IP address and port</td>
467  </tr>
468  <tr>
469    <td><tt>leap</tt></td>
470    <td>leap indicator (0-3)</td>
471  </tr>
472  <tr>
473    <td><tt>stratum</tt></td>
474    <td>stratum (0-15)</td>
475  </tr>
476  <tr>
477    <td><tt>precision</tt></td>
478    <td>precision (log<sub>2</sub> s)</td>
479  </tr>
480  <tr>
481    <td><tt>rootdelay</tt></td>
482    <td>total roundtrip delay to the primary reference clock</td>
483  </tr>
484  <tr>
485    <td><tt>rootdisp</tt></td>
486    <td>total root dispersion to the primary reference clock</td>
487  </tr>
488  <tr>
489    <td><tt>refid</tt></td>
490    <td>reference ID or <a href="decode.html#kiss">kiss code</a></td>
491  </tr>
492  <tr>
493    <td><tt>reftime</tt></td>
494    <td>reference time</td>
495  </tr>
496  <tr>
497    <td><tt>reach</tt></td>
498    <td>reach register (octal)</td>
499  </tr>
500  <tr>
501    <td><tt>unreach</tt></td>
502    <td>unreach counter</td>
503  </tr>
504  <tr>
505    <td><tt>hmode</tt></td>
506    <td>host mode (1-6)</td>
507  </tr>
508  <tr>
509    <td><tt>pmode</tt></td>
510    <td>peer mode (1-5)</td>
511  </tr>
512  <tr>
513    <td><tt>hpoll</tt></td>
514    <td>host poll exponent (log<sub>2</sub> s) (3-17)</td>
515  </tr>
516  <tr>
517    <td><tt>ppoll</tt></td>
518    <td>peer poll exponent (log<sub>2</sub> s) (3-17)</td>
519  </tr>
520  <tr>
521    <td><tt>headway</tt></td>
522    <td>headway (see <a href="rate.html">Rate Management and the Kiss-o'-Death Packet)</a></td>
523  </tr>
524  <tr>
525    <td><tt>flash</tt></td>
526    <td><a href="decode.html#flash">flash status word</a></td>
527  </tr>
528  <tr>
529    <td><tt>offset</tt></td>
530    <td>filter offset</td>
531  </tr>
532  <tr>
533    <td><tt>delay</tt></td>
534    <td>filter delay</td>
535  </tr>
536  <tr>
537    <td><tt>dispersion</tt></td>
538    <td>filter dispersion</td>
539  </tr>
540  <tr>
541    <td><tt>jitter</tt></td>
542    <td>filter jitter</td>
543  </tr>
544  <tr>
545    <td><tt>ident</tt></td>
546    <td>Autokey group name for this association</td>
547  </tr>
548  <tr>
549    <td><tt>bias</tt></td>
550    <td>unicast/broadcast bias</td>
551  </tr>
552  <tr>
553    <td><tt>xleave</tt></td>
554    <td>interleave delay (see <a href="xleave.html">NTP Interleaved Modes</a>)</td>
555  </tr>
556</table>
557<p>The bias variable is calculated when the first broadcast packet is received
558  after the calibration volley. It represents the offset of the broadcast
559  subgraph relative to the unicast subgraph. The xleave variable appears
560  only the interleaved symmetric and interleaved modes. It represents
561  the internal queuing, buffering and transmission delays for the preceding
562  packet.</p>
563<p>When the NTPv4 daemon is compiled with the OpenSSL software library, additional peer variables are displayed, including the following:</p>
564<table width="100%" border="1" cellspacing="2" cellpadding="2">
565  <tr>
566    <td>Variable</td>
567    <td>Description</td>
568  </tr>
569  <tr>
570    <td><tt>flags</tt></td>
571    <td>peer flags (see Autokey specification)</td>
572  </tr>
573  <tr>
574    <td><tt>host</tt></td>
575    <td>Autokey server name</td>
576  </tr>
577  <tr>
578    <td><tt>flags</tt></td>
579    <td>peer flags (see Autokey specification)</td>
580  </tr>
581  <tr>
582    <td><tt>signature</tt></td>
583    <td>OpenSSL digest/signature scheme</td>
584  </tr>
585  <tr>
586    <td><tt>initsequence</tt></td>
587    <td>initial key ID</td>
588  </tr>
589  <tr>
590    <td><tt>initkey</tt></td>
591    <td>initial key index</td>
592  </tr>
593  <tr>
594    <td><tt>timestamp</tt></td>
595    <td>Autokey signature timestamp</td>
596  </tr>
597</table>
598<h4 id="clock">Clock Variables</h4>
599<p>The following clock variables appear in the <tt>cv</tt> billboard for each association with a reference clock. Not all variables are displayed in some configurations.</p>
600<table width="100%" border="1" cellspacing="2" cellpadding="2">
601  <tr>
602    <td>Variable</td>
603    <td>Description</td>
604  </tr>
605  <tr>
606    <td><tt>associd</tt></td>
607    <td>association ID</td>
608  </tr>
609  <tr>
610    <td><tt>status</tt></td>
611    <td><a href="decode.html#clock">clock status word</a></td>
612  </tr>
613  <tr>
614    <td><tt>device</tt></td>
615    <td>device description</td>
616  </tr>
617  <tr>
618    <td><tt>timecode</tt></td>
619    <td>ASCII time code string (specific to device)</td>
620  </tr>
621  <tr>
622    <td><tt>poll</tt></td>
623    <td>poll messages sent</td>
624  </tr>
625  <tr>
626    <td><tt>noreply</tt></td>
627    <td>no reply</td>
628  </tr>
629  <tr>
630    <td><tt>badformat</tt></td>
631    <td>bad format</td>
632  </tr>
633  <tr>
634    <td><tt>baddata</tt></td>
635    <td>bad date or time</td>
636  </tr>
637  <tr>
638    <td><tt>fudgetime1</tt></td>
639    <td>fudge time 1</td>
640  </tr>
641  <tr>
642    <td><tt>fudgetime2</tt></td>
643    <td>fudge time 2</td>
644  </tr>
645  <tr>
646    <td><tt>stratum</tt></td>
647    <td>driver stratum</td>
648  </tr>
649  <tr>
650    <td><tt>refid</tt></td>
651    <td>driver reference ID</td>
652  </tr>
653  <tr>
654    <td><tt>flags</tt></td>
655    <td>driver flags</td>
656  </tr>
657</table>
658<hr>
659<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
660</body>
661</html>
662