xref: /freebsd/contrib/ntp/html/ntpq.html (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
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.
79  It follows the same rules as a password entry in the keys file of <tt>ntpd</tt>.</dd>
80  <dt id="quit"><tt>quit</tt></dt>
81  <dd>Exit <tt>ntpq</tt>.</dd>
82  <dt id="raw"><tt>raw</tt></dt>
83  <dd>Display server messages as received and without reformatting.</dd>
84  <dt id="timeout"><tt>timeout <i>millseconds</i></tt></dt>
85  <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>
86</dl>
87<h4>Control Message Commands</h4>
88<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>
89<dl>
90  <dt id="as"><tt>associations</tt></dt>
91  <dd>Display a list of mobilized associations in the form</dd>
92  <dd><tt>ind assid status conf reach auth condition last_event cnt</tt></dd>
93  <dd>
94    <table width="100%" border="1" cellspacing="2" cellpadding="2">
95      <tr>
96        <td>Variable</td>
97        <td>Description</td>
98      </tr>
99      <tr>
100        <td><tt>ind</tt></td>
101        <td>index on this list</td>
102      </tr>
103      <tr>
104        <td><tt>assid</tt></td>
105        <td>association ID</td>
106      </tr>
107      <tr>
108        <td><tt>status</tt></td>
109        <td><a href="decode.html#peer">peer status word</a></td>
110      </tr>
111      <tr>
112        <td><tt>conf</tt></td>
113        <td><tt>yes</tt>: persistent, <tt>no</tt>: ephemeral</td>
114      </tr>
115      <tr>
116        <td><tt>reach</tt></td>
117        <td><tt>yes</tt>: reachable, <tt>no</tt>: unreachable</td>
118      </tr>
119      <tr>
120        <td><tt>auth</tt></td>
121        <td><tt>ok</tt>, <tt>yes</tt>, <tt>bad</tt> and <tt>none</tt></td>
122      </tr>
123      <tr>
124        <td><tt>condition</tt></td>
125        <td>selection status (see the <tt>select</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
126      </tr>
127      <tr>
128        <td><tt>last_event</tt></td>
129        <td>event report (see the <tt>event</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
130      </tr>
131      <tr>
132        <td><tt>cnt</tt></td>
133        <td>event count (see the <tt>count</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
134      </tr>
135    </table>
136  </dd>
137  <dt id="cv"><tt>clockvar <i>assocID</i> [<i>name</i> [ = <i>value</i> [...]] [...]</tt><br>
138    <tt>cv <i>assocID</i> [<i>name</i> [ = <i>value</i> [...] ][...]</tt></dt>
139  <dd>Display a list of <a href="#clock">clock variables</a> for those associations supporting a reference clock.</dd>
140  <dt id=":config"><tt>:config [...]</tt></dt>
141  <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>
142  <dt id="config-from-file"><tt>config-from-file <i>filename</i></tt></dt>
143  <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>
144  <dt id="ifstats"><tt>ifstats</tt></dt>
145  <dd>Display statistics for each local network address. Authentication is required.</dd>
146  <dt id="iostats"><tt>iostats</tt></dt>
147  <dd>Display network and reference clock I/O statistics.</dd>
148  <dt id="kerninfo"><tt>kerninfo</tt></dt>
149  <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>
150  <dt id="lassoc"><tt>lassociations</tt></dt>
151  <dd>Perform the same function as the associations command, except display mobilized and unmobilized associations.</dd>
152  <dt id="monstats"><tt>monstats</tt></dt>
153  <dd>Display monitor facility statistics.</dd>
154  <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>
155  <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>
156  <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:
157    <table width="100%" border="1" cellspacing="2" cellpadding="2">
158      <tr>
159        <td>Column</td>
160        <td>Description</td>
161      </tr>
162      <tr>
163        <td><tt>lstint</tt></td>
164        <td>Interval in s between the receipt of the most recent packet from this address and the completion of the
165          retrieval of the MRU list by <tt>ntpq</tt>.</td>
166      </tr>
167      <tr>
168        <td><tt>avgint</tt></td>
169        <td>Average interval in s between packets from this address.</td>
170      </tr>
171      <tr>
172        <td><tt>rstr</tt></td>
173        <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
174          address triggered a rate control response.</td>
175      </tr>
176      <tr>
177        <td><tt>r</tt></td>
178        <td>Rate control indicator, either a period, <tt>L</tt> or <tt>K</tt> for no rate control response,
179          rate limiting by discarding, or rate limiting with a KoD response, respectively.</td>
180      </tr>
181      <tr>
182        <td><tt>m</tt></td>
183        <td>Packet mode.</td>
184      </tr>
185      <tr>
186        <td><tt>v</tt></td>
187        <td>Packet version number.</td>
188      </tr>
189      <tr>
190        <td><tt>count</tt></td>
191        <td>Packets received from this address.</td>
192      </tr>
193      <tr>
194        <td><tt>rport</tt></td>
195        <td>Source port of last packet from this address.</td>
196      </tr>
197      <tr>
198        <td><tt>remote address</tt></td>
199        <td>DNS name, numeric address, or address followed by claimed DNS name which
200          could not be verified in parentheses.</td>
201      </tr>
202    </table>
203  </dd>
204  <dt id="mreadvar"><tt>mreadvar <i>assocID</i> <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i>[ ... ]</tt></dt>
205  <dt id="mrv"><tt>mrv <i>assocID</i> <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i>[ ... ]</tt></dt>
206  <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>
207  <dt id="passoc"><tt>passociations</tt></dt>
208  <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>
209  <dt id="pe"><tt>peers</tt></dt>
210  <dd>Display a list of peers in the form</dd>
211  <dd><tt>[tally]remote refid st t when pool reach delay offset jitter</tt></dd>
212  <dd>
213    <table width="100%" border="1" cellspacing="2" cellpadding="2">
214      <tr>
215        <td>Variable</td>
216        <td>Description</td>
217      </tr>
218      <tr>
219        <td><tt>[tally]</tt></td>
220        <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>
221      </tr>
222      <tr>
223        <td><tt>remote</tt></td>
224        <td>host name (or IP number) of peer</td>
225      </tr>
226      <tr>
227        <td><tt>refid</tt></td>
228        <td>association ID or <a href="decode.html#kiss">kiss code</a></td>
229      </tr>
230      <tr>
231        <td><tt>st</tt></td>
232        <td>stratum</td>
233      </tr>
234      <tr>
235        <td><tt>t</tt></td>
236        <td>
237	  <tt>u</tt>: unicast or manycast client,
238	  <tt>b</tt>: broadcast or multicast client,
239	  <tt>p</tt>: pool source,
240	  <tt>l</tt>: local (reference clock),
241	  <tt>s</tt>: symmetric (peer),
242	  <tt>A</tt>: manycast server,
243	  <tt>B</tt>: broadcast server,
244	  <tt>M</tt>: multicast server
245	</td>
246      </tr>
247      <tr>
248        <td><tt>when</tt></td>
249        <td>sec/min/hr since last received packet</td>
250      </tr>
251      <tr>
252        <td><tt>poll</tt></td>
253        <td>poll interval (log<sub>2</sub> s)</td>
254      </tr>
255      <tr>
256        <td><tt>reach</tt></td>
257        <td>reach shift register (octal)</td>
258      </tr>
259      <tr>
260        <td><tt>delay</tt></td>
261        <td>roundtrip delay</td>
262      </tr>
263      <tr>
264        <td><tt>offset</tt></td>
265        <td>offset of server relative to this host</td>
266      </tr>
267      <tr>
268        <td><tt>jitter</tt></td>
269        <td>jitter</td>
270      </tr>
271    </table>
272  </dd>
273  <dt id="rv"><tt>readvar <i>assocID</i> <i>name</i> [ = <i>value</i> ] [,...]</tt><br>
274    <tt>rv <i>assocID</i> [ <i>name</i> ] [,...]</tt></dt>
275  <dd>Display the specified variables. If <tt><i>assocID</i></tt> is zero, the
276    variables are from the <a href="#system">system variables</a> name space,
277    otherwise they are from the <a href="#peer">peer variables</a> name space.
278    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
279    included, all operative variables in the name space are displayed.
280    In this case only, if the <tt><i>assocID</i></tt> is omitted, it is assumed zero. Multiple
281    names are specified with comma separators and without whitespace.
282    Note that time values are represented in milliseconds and frequency
283    values in parts-per-million (PPM). Some NTP timestamps are represented
284    in the format YYYYMMDDTTTT, where YYYY is the year, MM the month
285    of year, DD the day of month and TTTT the time of day.</dd>
286  <dt id="saveconfig"><tt>saveconfig <i>filename</i></tt></dt>
287  <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>
288  <dt id="writevar"><tt>writevar <i>assocID</i> <i>name</i> = <i>value</i> [,...]</tt></dt>
289  <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>
290  <dt id="sysinfo"><tt>sysinfo</tt></dt>
291  <dd>Display operational summary.</dd>
292  <dt id="sysstats"><tt>sysstats</tt></dt>
293  <dd>Print statistics counters maintained in the protocol module.</dd>
294</dl>
295<h4 id="status">Status Words and Kiss Codes</h4>
296<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>
297<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>
298<h4 id="system">System Variables</h4>
299<p>The following system variables appear in the <tt>rv</tt> billboard. Not all variables are displayed in some configurations.</p>
300<table width="100%" border="1" cellspacing="2" cellpadding="2">
301  <tr>
302    <td>Variable</td>
303    <td>Description</td>
304  </tr>
305  <tr>
306    <td><tt>status</tt></td>
307    <td><a href="decode.html#sys">system status word</a></td>
308  </tr>
309  <tr>
310    <td><tt>version</tt></td>
311    <td>NTP software version and build time</td>
312  </tr>
313  <tr>
314    <td><tt>processor</tt></td>
315    <td>hardware platform and version</td>
316  </tr>
317  <tr>
318    <td><tt>system</tt></td>
319    <td>operating system and version</td>
320  </tr>
321  <tr>
322    <td><tt>leap</tt></td>
323    <td>leap warning indicator (0-3)</td>
324  </tr>
325  <tr>
326    <td><tt>stratum</tt></td>
327    <td>stratum (1-15)</td>
328  </tr>
329  <tr>
330    <td><tt>precision</tt></td>
331    <td>precision (log<sub>2</sub> s)</td>
332  </tr>
333  <tr>
334    <td><tt>rootdelay</tt></td>
335    <td>total roundtrip delay to the primary reference clock</td>
336  </tr>
337  <tr>
338    <td><tt>rootdisp</tt></td>
339    <td>total dispersion to the primary reference clock</td>
340  </tr>
341  <tr>
342    <td><tt>peer</tt></td>
343    <td>system peer association ID</td>
344  </tr>
345  <tr>
346    <td><tt>tc</tt></td>
347    <td>time constant and poll exponent (log<sub>2</sub> s) (3-17)</td>
348  </tr>
349  <tr>
350    <td><tt>mintc</tt></td>
351    <td>minimum time constant (log<sub>2</sub> s) (3-10)</td>
352  </tr>
353  <tr>
354    <td><tt>clock</tt></td>
355    <td>date and time of day</td>
356  </tr>
357  <tr>
358    <td><tt>refid</tt></td>
359    <td>reference ID or <a href="decode.html#kiss">kiss code</a></td>
360  </tr>
361  <tr>
362    <td><tt>reftime</tt></td>
363    <td>reference time</td>
364  </tr>
365  <tr>
366    <td><tt>offset</tt></td>
367    <td>combined  offset of server relative to this host</td>
368  </tr>
369  <tr>
370    <td><tt>sys_jitter</tt></td>
371    <td>combined system jitter</td>
372  </tr>
373  <tr>
374    <td><tt>frequency</tt></td>
375    <td> frequency offset (PPM) relative to hardware clock</td>
376  </tr>
377  <tr>
378    <td><tt>clk_wander</tt></td>
379    <td>clock frequency wander (PPM)</td>
380  </tr>
381  <tr>
382    <td><tt>clk_jitter</tt></td>
383    <td>clock jitter</td>
384  </tr>
385  <tr>
386    <td><tt>tai</tt></td>
387    <td>TAI-UTC offset (s)</td>
388  </tr>
389  <tr>
390    <td><tt>leapsec</tt></td>
391    <td>NTP seconds when the next leap second is/was inserted</td>
392  </tr>
393  <tr>
394    <td><tt>expire</tt></td>
395    <td>NTP seconds when the NIST leapseconds file expires</td>
396  </tr>
397</table>
398<dl>
399  <dt>The jitter and wander statistics are exponentially-weighted RMS averages.
400    The system jitter is defined in the NTPv4 specification; the
401    clock jitter statistic is computed by the clock discipline module.</dt>
402  <dt>When the NTPv4 daemon is compiled with the OpenSSL software library, additional
403    system variables are displayed, including some or all of the following, depending
404    on the particular Autokey dance:</dt>
405</dl>
406<table width="100%" border="1" cellspacing="2" cellpadding="2">
407  <tr>
408    <td>Variable</td>
409    <td>Description</td>
410  </tr>
411  <tr>
412    <td><tt>host</tt></td>
413    <td>Autokey host name for this host</td>
414  </tr>
415  <tr>
416    <td><tt>ident</tt></td>
417    <td>Autokey group name for this host</td>
418  </tr>
419  <tr>
420    <td><tt>flags</tt></td>
421    <td>host flags  (see Autokey specification)</td>
422  </tr>
423  <tr>
424    <td><tt>digest</tt></td>
425    <td>OpenSSL message digest algorithm</td>
426  </tr>
427  <tr>
428    <td><tt>signature</tt></td>
429    <td>OpenSSL digest/signature scheme</td>
430  </tr>
431  <tr>
432    <td><tt>update</tt></td>
433    <td>NTP seconds at last signature update</td>
434  </tr>
435  <tr>
436    <td><tt>cert</tt></td>
437    <td>certificate subject, issuer and certificate flags</td>
438  </tr>
439  <tr>
440    <td><tt>until</tt></td>
441    <td>NTP seconds when the certificate expires</td>
442  </tr>
443</table>
444<h4 id="peer">Peer Variables</h4>
445<p>The following peer variables appear in the <tt>rv</tt> billboard for each association. Not all variables are displayed in some configurations.</p>
446<table width="100%" border="1" cellspacing="2" cellpadding="2">
447  <tr>
448    <td>Variable</td>
449    <td>Description</td>
450  </tr>
451  <tr>
452    <td><tt>associd</tt></td>
453    <td>association ID</td>
454  </tr>
455  <tr>
456    <td><tt>status</tt></td>
457    <td><a href="decode.html#peer">peer status word</a></td>
458  </tr>
459  <tr>
460    <td><tt>srcadr<br>
461      srcport</tt></td>
462    <td>source (remote) IP address and port</td>
463  </tr>
464  <tr>
465    <td><tt>dstadr<br>
466      dstport</tt></td>
467    <td>destination (local) IP address and port</td>
468  </tr>
469  <tr>
470    <td><tt>leap</tt></td>
471    <td>leap indicator (0-3)</td>
472  </tr>
473  <tr>
474    <td><tt>stratum</tt></td>
475    <td>stratum (0-15)</td>
476  </tr>
477  <tr>
478    <td><tt>precision</tt></td>
479    <td>precision (log<sub>2</sub> s)</td>
480  </tr>
481  <tr>
482    <td><tt>rootdelay</tt></td>
483    <td>total roundtrip delay to the primary reference clock</td>
484  </tr>
485  <tr>
486    <td><tt>rootdisp</tt></td>
487    <td>total root dispersion to the primary reference clock</td>
488  </tr>
489  <tr>
490    <td><tt>refid</tt></td>
491    <td>reference ID or <a href="decode.html#kiss">kiss code</a></td>
492  </tr>
493  <tr>
494    <td><tt>reftime</tt></td>
495    <td>reference time</td>
496  </tr>
497  <tr>
498    <td><tt>reach</tt></td>
499    <td>reach register (octal)</td>
500  </tr>
501  <tr>
502    <td><tt>unreach</tt></td>
503    <td>unreach counter</td>
504  </tr>
505  <tr>
506    <td><tt>hmode</tt></td>
507    <td>host mode (1-6)</td>
508  </tr>
509  <tr>
510    <td><tt>pmode</tt></td>
511    <td>peer mode (1-5)</td>
512  </tr>
513  <tr>
514    <td><tt>hpoll</tt></td>
515    <td>host poll exponent (log<sub>2</sub> s) (3-17)</td>
516  </tr>
517  <tr>
518    <td><tt>ppoll</tt></td>
519    <td>peer poll exponent (log<sub>2</sub> s) (3-17)</td>
520  </tr>
521  <tr>
522    <td><tt>headway</tt></td>
523    <td>headway (see <a href="rate.html">Rate Management and the Kiss-o'-Death Packet)</a></td>
524  </tr>
525  <tr>
526    <td><tt>flash</tt></td>
527    <td><a href="decode.html#flash">flash status word</a></td>
528  </tr>
529  <tr>
530    <td><tt>offset</tt></td>
531    <td>filter offset</td>
532  </tr>
533  <tr>
534    <td><tt>delay</tt></td>
535    <td>filter delay</td>
536  </tr>
537  <tr>
538    <td><tt>dispersion</tt></td>
539    <td>filter dispersion</td>
540  </tr>
541  <tr>
542    <td><tt>jitter</tt></td>
543    <td>filter jitter</td>
544  </tr>
545  <tr>
546    <td><tt>ident</tt></td>
547    <td>Autokey group name for this association</td>
548  </tr>
549  <tr>
550    <td><tt>bias</tt></td>
551    <td>unicast/broadcast bias</td>
552  </tr>
553  <tr>
554    <td><tt>xleave</tt></td>
555    <td>interleave delay (see <a href="xleave.html">NTP Interleaved Modes</a>)</td>
556  </tr>
557</table>
558<p>The bias variable is calculated when the first broadcast packet is received
559  after the calibration volley. It represents the offset of the broadcast
560  subgraph relative to the unicast subgraph. The xleave variable appears
561  only the interleaved symmetric and interleaved modes. It represents
562  the internal queuing, buffering and transmission delays for the preceding
563  packet.</p>
564<p>When the NTPv4 daemon is compiled with the OpenSSL software library, additional peer variables are displayed, including the following:</p>
565<table width="100%" border="1" cellspacing="2" cellpadding="2">
566  <tr>
567    <td>Variable</td>
568    <td>Description</td>
569  </tr>
570  <tr>
571    <td><tt>flags</tt></td>
572    <td>peer flags (see Autokey specification)</td>
573  </tr>
574  <tr>
575    <td><tt>host</tt></td>
576    <td>Autokey server name</td>
577  </tr>
578  <tr>
579    <td><tt>flags</tt></td>
580    <td>peer flags (see Autokey specification)</td>
581  </tr>
582  <tr>
583    <td><tt>signature</tt></td>
584    <td>OpenSSL digest/signature scheme</td>
585  </tr>
586  <tr>
587    <td><tt>initsequence</tt></td>
588    <td>initial key ID</td>
589  </tr>
590  <tr>
591    <td><tt>initkey</tt></td>
592    <td>initial key index</td>
593  </tr>
594  <tr>
595    <td><tt>timestamp</tt></td>
596    <td>Autokey signature timestamp</td>
597  </tr>
598</table>
599<h4 id="clock">Clock Variables</h4>
600<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>
601<table width="100%" border="1" cellspacing="2" cellpadding="2">
602  <tr>
603    <td>Variable</td>
604    <td>Description</td>
605  </tr>
606  <tr>
607    <td><tt>associd</tt></td>
608    <td>association ID</td>
609  </tr>
610  <tr>
611    <td><tt>status</tt></td>
612    <td><a href="decode.html#clock">clock status word</a></td>
613  </tr>
614  <tr>
615    <td><tt>device</tt></td>
616    <td>device description</td>
617  </tr>
618  <tr>
619    <td><tt>timecode</tt></td>
620    <td>ASCII time code string (specific to device)</td>
621  </tr>
622  <tr>
623    <td><tt>poll</tt></td>
624    <td>poll messages sent</td>
625  </tr>
626  <tr>
627    <td><tt>noreply</tt></td>
628    <td>no reply</td>
629  </tr>
630  <tr>
631    <td><tt>badformat</tt></td>
632    <td>bad format</td>
633  </tr>
634  <tr>
635    <td><tt>baddata</tt></td>
636    <td>bad date or time</td>
637  </tr>
638  <tr>
639    <td><tt>fudgetime1</tt></td>
640    <td>fudge time 1</td>
641  </tr>
642  <tr>
643    <td><tt>fudgetime2</tt></td>
644    <td>fudge time 2</td>
645  </tr>
646  <tr>
647    <td><tt>stratum</tt></td>
648    <td>driver stratum</td>
649  </tr>
650  <tr>
651    <td><tt>refid</tt></td>
652    <td>driver reference ID</td>
653  </tr>
654  <tr>
655    <td><tt>flags</tt></td>
656    <td>driver flags</td>
657  </tr>
658</table>
659<hr>
660<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
661</body>
662</html>
663