ntpq.html revision 1.1.1.11.2.1 1 1.1 christos <html lang="en">
2 1.1 christos <head>
3 1.1 christos <title>ntpq: Network Time Protocol Query User's Manual</title>
4 1.1 christos <meta http-equiv="Content-Type" content="text/html">
5 1.1 christos <meta name="description" content="ntpq: Network Time Protocol Query User's Manual">
6 1.1.1.7 christos <meta name="generator" content="makeinfo 4.7">
7 1.1 christos <link title="Top" rel="top" href="#Top">
8 1.1 christos <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9 1.1 christos <meta http-equiv="Content-Style-Type" content="text/css">
10 1.1 christos <style type="text/css"><!--
11 1.1 christos pre.display { font-family:inherit }
12 1.1 christos pre.format { font-family:inherit }
13 1.1 christos pre.smalldisplay { font-family:inherit; font-size:smaller }
14 1.1 christos pre.smallformat { font-family:inherit; font-size:smaller }
15 1.1 christos pre.smallexample { font-size:smaller }
16 1.1 christos pre.smalllisp { font-size:smaller }
17 1.1.1.7 christos span.sc { font-variant:small-caps }
18 1.1.1.7 christos span.roman { font-family: serif; font-weight: normal; }
19 1.1 christos --></style>
20 1.1 christos </head>
21 1.1 christos <body>
22 1.1 christos <h1 class="settitle">ntpq: Network Time Protocol Query User's Manual</h1>
23 1.1 christos <div class="shortcontents">
24 1.1 christos <h2>Short Contents</h2>
25 1.1 christos <ul>
26 1.1 christos <a href="#Top">ntpq: Network Time Protocol Query User Manual</a>
27 1.1 christos </ul>
28 1.1 christos </div>
29 1.1 christos
30 1.1 christos
31 1.1 christos
32 1.1 christos <div class="node">
33 1.1 christos <p><hr>
34 1.1.1.7 christos <a name="Top"></a>Next: <a rel="next" accesskey="n" href="#ntpq-Description">ntpq Description</a>,
35 1.1 christos Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
36 1.1 christos Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
37 1.1.1.7 christos <br>
38 1.1 christos </div>
39 1.1 christos
40 1.1 christos <h2 class="unnumbered">ntpq: Network Time Protocol Query User Manual</h2>
41 1.1 christos
42 1.1 christos <p>The <code>ntpq</code> utility program is used to
43 1.1 christos monitor the operational status
44 1.1 christos and determine the performance of
45 1.1 christos <code>ntpd</code>, the NTP daemon.
46 1.1 christos
47 1.1.1.11.2.1 christos <p>This document applies to version 4.2.8p12 of <code>ntpq</code>.
48 1.1 christos
49 1.1 christos <ul class="menu">
50 1.1 christos <li><a accesskey="1" href="#ntpq-Description">ntpq Description</a>
51 1.1 christos <li><a accesskey="2" href="#ntpq-Invocation">ntpq Invocation</a>: Invoking ntpq
52 1.1 christos <li><a accesskey="3" href="#Usage">Usage</a>
53 1.1 christos <li><a accesskey="4" href="#Internal-Commands">Internal Commands</a>
54 1.1 christos <li><a accesskey="5" href="#Control-Message-Commands">Control Message Commands</a>
55 1.1 christos <li><a accesskey="6" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>
56 1.1 christos <li><a accesskey="7" href="#System-Variables">System Variables</a>
57 1.1 christos <li><a accesskey="8" href="#Peer-Variables">Peer Variables</a>
58 1.1 christos <li><a accesskey="9" href="#Clock-Variables">Clock Variables</a>
59 1.1 christos </ul>
60 1.1 christos
61 1.1 christos <div class="node">
62 1.1 christos <p><hr>
63 1.1.1.7 christos <a name="ntpq-Description"></a>Next: <a rel="next" accesskey="n" href="#Usage">Usage</a>,
64 1.1 christos Previous: <a rel="previous" accesskey="p" href="#Top">Top</a>,
65 1.1 christos Up: <a rel="up" accesskey="u" href="#Top">Top</a>
66 1.1.1.7 christos <br>
67 1.1 christos </div>
68 1.1 christos
69 1.1 christos <!-- node-name, next, previous, up -->
70 1.1 christos <h3 class="section">Description</h3>
71 1.1 christos
72 1.1 christos <p>The <code>ntpq</code> utility program is used to monitor NTP daemon <code>ntpd</code> operations and determine performance.
73 1.1 christos It uses the standard NTP mode 6 control message formats defined in
74 1.1 christos Appendix B of the NTPv3 specification RFC1305.
75 1.1 christos The same formats are used in NTPv4, although some of the variable names have changed and new ones added.
76 1.1 christos The description on this page is for the NTPv4 variables.
77 1.1 christos
78 1.1 christos <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.
79 1.1 christos
80 1.1 christos <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.
81 1.1 christos
82 1.1 christos <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.
83 1.1 christos
84 1.1 christos <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.
85 1.1 christos
86 1.1 christos <p>For examples and usage, see the <a href="debug.html">NTP Debugging Techniques</a> page.
87 1.1 christos
88 1.1 christos <div class="node">
89 1.1 christos <p><hr>
90 1.1 christos <a name="ntpq-Invocation"></a>
91 1.1.1.7 christos <br>
92 1.1 christos </div>
93 1.1 christos
94 1.1 christos <h3 class="section">Invoking ntpq</h3>
95 1.1 christos
96 1.1 christos <p><a name="index-ntpq-1"></a><a name="index-standard-NTP-query-program-2"></a>
97 1.1 christos
98 1.1 christos <p>The
99 1.1 christos <code>ntpq</code>
100 1.1.1.11 christos utility program is used to query NTP servers to monitor NTP operations
101 1.1.1.11 christos and performance, requesting
102 1.1 christos information about current state and/or changes in that state.
103 1.1 christos The program may be run either in interactive mode or controlled using
104 1.1 christos command line arguments.
105 1.1 christos Requests to read and write arbitrary
106 1.1 christos variables can be assembled, with raw and pretty-printed output
107 1.1 christos options being available.
108 1.1 christos The
109 1.1 christos <code>ntpq</code>
110 1.1 christos utility can also obtain and print a
111 1.1 christos list of peers in a common format by sending multiple queries to the
112 1.1 christos server.
113 1.1 christos
114 1.1 christos <p>If one or more request options is included on the command line
115 1.1 christos when
116 1.1 christos <code>ntpq</code>
117 1.1 christos is executed, each of the requests will be sent
118 1.1 christos to the NTP servers running on each of the hosts given as command
119 1.1 christos line arguments, or on localhost by default.
120 1.1 christos If no request options
121 1.1 christos are given,
122 1.1 christos <code>ntpq</code>
123 1.1 christos will attempt to read commands from the
124 1.1 christos standard input and execute these on the NTP server running on the
125 1.1 christos first host given on the command line, again defaulting to localhost
126 1.1 christos when no other host is specified.
127 1.1 christos The
128 1.1 christos <code>ntpq</code>
129 1.1 christos utility will prompt for
130 1.1 christos commands if the standard input is a terminal device.
131 1.1 christos
132 1.1 christos <p><code>ntpq</code>
133 1.1 christos uses NTP mode 6 packets to communicate with the
134 1.1 christos NTP server, and hence can be used to query any compatible server on
135 1.1 christos the network which permits it.
136 1.1 christos Note that since NTP is a UDP protocol
137 1.1 christos this communication will be somewhat unreliable, especially over
138 1.1 christos large distances in terms of network topology.
139 1.1 christos The
140 1.1 christos <code>ntpq</code>
141 1.1 christos utility makes
142 1.1 christos one attempt to retransmit requests, and will time requests out if
143 1.1 christos the remote host is not heard from within a suitable timeout
144 1.1 christos time.
145 1.1 christos
146 1.1.1.11 christos <p>Note that in contexts where a host name is expected, a
147 1.1.1.11 christos <code>-4</code>
148 1.1.1.11 christos qualifier preceding the host name forces resolution to the IPv4
149 1.1.1.11 christos namespace, while a
150 1.1.1.11 christos <code>-6</code>
151 1.1.1.11 christos qualifier forces resolution to the IPv6 namespace.
152 1.1.1.11 christos For examples and usage, see the
153 1.1.1.11 christos NTP Debugging Techniques
154 1.1.1.11 christos page.
155 1.1.1.11 christos
156 1.1 christos <p>Specifying a
157 1.1 christos command line option other than
158 1.1 christos <code>-i</code>
159 1.1 christos or
160 1.1 christos <code>-n</code>
161 1.1 christos will
162 1.1 christos cause the specified query (queries) to be sent to the indicated
163 1.1 christos host(s) immediately.
164 1.1 christos Otherwise,
165 1.1 christos <code>ntpq</code>
166 1.1 christos will attempt to read
167 1.1 christos interactive format commands from the standard input.
168 1.1 christos
169 1.1 christos <h5 class="subsubsection">Internal Commands</h5>
170 1.1 christos
171 1.1 christos <p>Interactive format commands consist of a keyword followed by zero
172 1.1 christos to four arguments.
173 1.1 christos Only enough characters of the full keyword to
174 1.1 christos uniquely identify the command need be typed.
175 1.1 christos
176 1.1 christos <p>A
177 1.1 christos number of interactive format commands are executed entirely within
178 1.1 christos the
179 1.1 christos <code>ntpq</code>
180 1.1.1.11 christos utility itself and do not result in NTP
181 1.1 christos requests being sent to a server.
182 1.1 christos These are described following.
183 1.1 christos <dl>
184 1.1.1.11 christos <dt><code>?</code> <code>[</code><kbd>command</kbd><code>]</code><br><dt><code>help</code> <code>[</code><kbd>command</kbd><code>]</code><dd>A
185 1.1 christos ?
186 1.1.1.11 christos by itself will print a list of all the commands
187 1.1.1.11 christos known to
188 1.1 christos <code>ntpq</code>
189 1.1 christos A
190 1.1 christos ?
191 1.1.1.11 christos followed by a command name will print function and usage
192 1.1 christos information about the command.
193 1.1.1.11 christos <br><dt><code>addvars</code> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code><code>[,...]</code><br><dt><code>rmvars</code> <kbd>name</kbd><code>[,...]</code><br><dt><code>clearvars</code><br><dt><code>showvars</code><dd>The arguments to this command consist of a list of
194 1.1 christos items of the form
195 1.1.1.11 christos <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code>,
196 1.1 christos where the
197 1.1.1.11 christos .No = Ns Ar value
198 1.1 christos is ignored, and can be omitted,
199 1.1 christos in requests to the server to read variables.
200 1.1 christos The
201 1.1 christos <code>ntpq</code>
202 1.1.1.11 christos utility maintains an internal list in which data to be included in
203 1.1.1.11 christos messages can be assembled, and displayed or set using the
204 1.1 christos <code>readlist</code>
205 1.1 christos and
206 1.1 christos <code>writelist</code>
207 1.1 christos commands described below.
208 1.1 christos The
209 1.1 christos <code>addvars</code>
210 1.1 christos command allows variables and their optional values to be added to
211 1.1 christos the list.
212 1.1 christos If more than one variable is to be added, the list should
213 1.1 christos be comma-separated and not contain white space.
214 1.1 christos The
215 1.1 christos <code>rmvars</code>
216 1.1 christos command can be used to remove individual variables from the list,
217 1.1 christos while the
218 1.1.1.11 christos <code>clearvars</code>
219 1.1 christos command removes all variables from the
220 1.1 christos list.
221 1.1.1.2 christos The
222 1.1.1.2 christos <code>showvars</code>
223 1.1.1.2 christos command displays the current list of optional variables.
224 1.1.1.11 christos <br><dt><code>authenticate</code> <code>[yes|no]</code><dd>Normally
225 1.1 christos <code>ntpq</code>
226 1.1 christos does not authenticate requests unless
227 1.1 christos they are write requests.
228 1.1 christos The command
229 1.1.1.11 christos <code>authenticate</code> <code>yes</code>
230 1.1 christos causes
231 1.1 christos <code>ntpq</code>
232 1.1 christos to send authentication with all requests it
233 1.1 christos makes.
234 1.1 christos Authenticated requests causes some servers to handle
235 1.1.1.11 christos requests slightly differently.
236 1.1 christos The command
237 1.1.1.11 christos <code>authenticate</code>
238 1.1 christos causes
239 1.1 christos <code>ntpq</code>
240 1.1 christos to display whether or not
241 1.1.1.11 christos it is currently authenticating requests.
242 1.1 christos <br><dt><code>cooked</code><dd>Causes output from query commands to be "cooked", so that
243 1.1 christos variables which are recognized by
244 1.1 christos <code>ntpq</code>
245 1.1 christos will have their
246 1.1 christos values reformatted for human consumption.
247 1.1 christos Variables which
248 1.1 christos <code>ntpq</code>
249 1.1.1.11 christos could not decode completely are
250 1.1 christos marked with a trailing
251 1.1 christos ?.
252 1.1.1.11 christos <br><dt><code>debug</code> <code>[more|less|off]</code><dd>With no argument, displays the current debug level.
253 1.1.1.11 christos Otherwise, the debugging level is changed as indicated.
254 1.1.1.11 christos <br><dt><code>delay</code> <code>[</code><kbd>milliseconds</kbd><code>]</code><dd>Specify a time interval to be added to timestamps included in
255 1.1 christos requests which require authentication.
256 1.1 christos This is used to enable
257 1.1 christos (unreliable) server reconfiguration over long delay network paths
258 1.1 christos or between machines whose clocks are unsynchronized.
259 1.1 christos Actually the
260 1.1 christos server does not now require timestamps in authenticated requests,
261 1.1 christos so this command may be obsolete.
262 1.1.1.11 christos Without any arguments, displays the current delay.
263 1.1.1.11 christos <br><dt><code>drefid</code> <code>[hash|ipv4]</code><dd>Display refids as IPv4 or hash.
264 1.1.1.11 christos Without any arguments, displays whether refids are shown as IPv4
265 1.1.1.11 christos addresses or hashes.
266 1.1.1.2 christos <br><dt><code>exit</code><dd>Exit
267 1.1.1.2 christos <code>ntpq</code>
268 1.1.1.11 christos <br><dt><code>host</code> <code>[</code><kbd>name</kbd><code>]</code><dd>Set the host to which future queries will be sent.
269 1.1.1.11 christos The
270 1.1.1.11 christos <kbd>name</kbd>
271 1.1 christos may be either a host name or a numeric address.
272 1.1.1.11 christos Without any arguments, displays the current host.
273 1.1.1.11 christos <br><dt><code>hostnames</code> <code>[yes|no]</code><dd>If
274 1.1 christos <code>yes</code>
275 1.1 christos is specified, host names are printed in
276 1.1 christos information displays.
277 1.1 christos If
278 1.1 christos <code>no</code>
279 1.1 christos is specified, numeric
280 1.1 christos addresses are printed instead.
281 1.1 christos The default is
282 1.1 christos <code>yes</code>,
283 1.1 christos unless
284 1.1 christos modified using the command line
285 1.1 christos <code>-n</code>
286 1.1 christos switch.
287 1.1.1.11 christos Without any arguments, displays whether host names or numeric addresses
288 1.1.1.11 christos are shown.
289 1.1.1.11 christos <br><dt><code>keyid</code> <code>[</code><kbd>keyid</kbd><code>]</code><dd>This command allows the specification of a key number to be
290 1.1 christos used to authenticate configuration requests.
291 1.1 christos This must correspond
292 1.1.1.4 christos to the
293 1.1.1.4 christos <code>controlkey</code>
294 1.1.1.4 christos key number the server has been configured to use for this
295 1.1 christos purpose.
296 1.1.1.11 christos Without any arguments, displays the current
297 1.1.1.11 christos <kbd>keyid</kbd>.
298 1.1.1.11 christos <br><dt><code>keytype</code> <code>[</code><kbd>digest</kbd><code>]</code><dd>Specify the digest algorithm to use for authenticating requests, with default
299 1.1.1.11 christos <code>MD5</code>.
300 1.1.1.2 christos If
301 1.1.1.2 christos <code>ntpq</code>
302 1.1.1.11 christos was built with OpenSSL support, and OpenSSL is installed,
303 1.1.1.11 christos <kbd>digest</kbd>
304 1.1.1.11 christos can be any message digest algorithm supported by OpenSSL.
305 1.1.1.2 christos If no argument is given, the current
306 1.1.1.11 christos <code>keytype</code> <kbd>digest</kbd>
307 1.1.1.11 christos algorithm used is displayed.
308 1.1.1.11 christos <br><dt><code>ntpversion</code> <code>[1|2|3|4]</code><dd>Sets the NTP version number which
309 1.1 christos <code>ntpq</code>
310 1.1 christos claims in
311 1.1 christos packets.
312 1.1 christos Defaults to 3, and note that mode 6 control messages (and
313 1.1 christos modes, for that matter) didn't exist in NTP version 1.
314 1.1 christos There appear
315 1.1 christos to be no servers left which demand version 1.
316 1.1 christos With no argument, displays the current NTP version that will be used
317 1.1 christos when communicating with servers.
318 1.1 christos <br><dt><code>passwd</code><dd>This command prompts you to type in a password (which will not
319 1.1 christos be echoed) which will be used to authenticate configuration
320 1.1 christos requests.
321 1.1 christos The password must correspond to the key configured for
322 1.1 christos use by the NTP server for this purpose if such requests are to be
323 1.1 christos successful.
324 1.1.1.11 christos <br><dt><code>poll</code> <code>[</code><kbd>n</kbd><code>]</code> <code>[verbose]</code><dd>Poll an NTP server in client mode
325 1.1.1.2 christos <kbd>n</kbd>
326 1.1.1.11 christos times.
327 1.1.1.11 christos Poll not implemented yet.
328 1.1.1.2 christos <br><dt><code>quit</code><dd>Exit
329 1.1.1.2 christos <code>ntpq</code>
330 1.1 christos <br><dt><code>raw</code><dd>Causes all output from query commands is printed as received
331 1.1 christos from the remote server.
332 1.1 christos The only formating/interpretation done on
333 1.1 christos the data is to transform nonascii data into a printable (but barely
334 1.1 christos understandable) form.
335 1.1.1.11 christos <br><dt><code>timeout</code> <code>[</code><kbd>milliseconds</kbd><code>]</code><dd>Specify a timeout period for responses to server queries.
336 1.1 christos The
337 1.1 christos default is about 5000 milliseconds.
338 1.1.1.11 christos Without any arguments, displays the current timeout period.
339 1.1 christos Note that since
340 1.1 christos <code>ntpq</code>
341 1.1 christos retries each query once after a timeout, the total waiting time for
342 1.1 christos a timeout will be twice the timeout value set.
343 1.1.1.11 christos <br><dt><code>version</code><dd>Display the version of the
344 1.1.1.2 christos <code>ntpq</code>
345 1.1.1.2 christos program.
346 1.1.1.2 christos </dl>
347 1.1.1.2 christos
348 1.1.1.2 christos <h5 class="subsubsection">Control Message Commands</h5>
349 1.1.1.2 christos
350 1.1.1.11 christos <p>Association ids are used to identify system, peer and clock variables.
351 1.1.1.11 christos System variables are assigned an association id of zero and system name
352 1.1.1.11 christos space, while each association is assigned a nonzero association id and
353 1.1.1.11 christos peer namespace.
354 1.1.1.11 christos Most control commands send a single message to the server and expect a
355 1.1.1.11 christos single response message.
356 1.1.1.2 christos The exceptions are the
357 1.1.1.2 christos <code>peers</code>
358 1.1.1.2 christos command, which sends a series of messages,
359 1.1.1.2 christos and the
360 1.1.1.2 christos <code>mreadlist</code>
361 1.1.1.2 christos and
362 1.1.1.2 christos <code>mreadvar</code>
363 1.1.1.2 christos commands, which iterate over a range of associations.
364 1.1.1.2 christos <dl>
365 1.1.1.11 christos <dt><code>apeers</code><dd>Display a list of peers in the form:
366 1.1.1.11 christos <pre class="example"> [tally]remote refid assid st t when pool reach delay offset jitter
367 1.1.1.11 christos </pre>
368 1.1.1.11 christos <p>where the output is just like the
369 1.1.1.11 christos <code>peers</code>
370 1.1.1.11 christos command except that the
371 1.1.1.11 christos <code>refid</code>
372 1.1.1.11 christos is displayed in hex format and the association number is also displayed.
373 1.1.1.11 christos <br><dt><code>associations</code><dd>Display a list of mobilized associations in the form:
374 1.1.1.2 christos <pre class="example"> ind assid status conf reach auth condition last_event cnt
375 1.1.1.2 christos </pre>
376 1.1.1.2 christos <dl>
377 1.1.1.11 christos <dt>Sy Variable 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>No</code> <code>persistent,</code> <code>no</code>: <code>No</code> <code>ephemeral</code><br><dt><code>reach</code> <code>Ta</code> <code>yes</code>: <code>No</code> <code>reachable,</code> <code>no</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>No</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>No</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>No</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>No</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><dd></dl>
378 1.1.1.11 christos <br><dt><code>authinfo</code><dd>Display the authentication statistics counters:
379 1.1.1.11 christos time since reset, stored keys, free keys, key lookups, keys not found,
380 1.1.1.11 christos uncached keys, expired keys, encryptions, decryptions.
381 1.1.1.11 christos <br><dt><code>clocklist</code> <code>[</code><kbd>associd</kbd><code>]</code><br><dt><code>cl</code> <code>[</code><kbd>associd</kbd><code>]</code><dd>Display all clock variables in the variable list for those associations
382 1.1.1.11 christos supporting a reference clock.
383 1.1.1.11 christos <br><dt><code>clockvar</code> <code>[</code><kbd>associd</kbd><code>]</code> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code><code>[,...]</code><br><dt><code>cv</code> <code>[</code><kbd>associd</kbd><code>]</code> <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
384 1.1.1.11 christos reference clock.
385 1.1.1.11 christos <br><dt><code>:config</code> <kbd>configuration command line</kbd><dd>Send the remainder of the command line, including whitespace, to the
386 1.1.1.11 christos server as a run-time configuration command in the same format as a line
387 1.1.1.11 christos in the configuration file.
388 1.1.1.11 christos This command is experimental until further notice and clarification.
389 1.1.1.11 christos Authentication is of course required.
390 1.1.1.11 christos <br><dt><code>config-from-file</code> <kbd>filename</kbd><dd>Send each line of
391 1.1.1.2 christos <kbd>filename</kbd>
392 1.1.1.11 christos to the server as run-time configuration commands in the same format as
393 1.1.1.11 christos lines in the configuration file.
394 1.1.1.11 christos This command is experimental until further notice and clarification.
395 1.1.1.11 christos Authentication is required.
396 1.1.1.11 christos <br><dt><code>ifstats</code><dd>Display status and statistics counters for each local network interface address:
397 1.1.1.11 christos interface number, interface name and address or broadcast, drop, flag,
398 1.1.1.11 christos ttl, mc, received, sent, send failed, peers, uptime.
399 1.1.1.11 christos Authentication is required.
400 1.1.1.11 christos <br><dt><code>iostats</code><dd>Display network and reference clock I/O statistics:
401 1.1.1.11 christos time since reset, receive buffers, free receive buffers, used receive buffers,
402 1.1.1.11 christos low water refills, dropped packets, ignored packets, received packets,
403 1.1.1.11 christos packets sent, packet send failures, input wakeups, useful input wakeups.
404 1.1.1.11 christos <br><dt><code>kerninfo</code><dd>Display kernel loop and PPS statistics:
405 1.1.1.11 christos associd, status, pll offset, pll frequency, maximum error,
406 1.1.1.11 christos estimated error, kernel status, pll time constant, precision,
407 1.1.1.11 christos frequency tolerance, pps frequency, pps stability, pps jitter,
408 1.1.1.11 christos calibration interval, calibration cycles, jitter exceeded,
409 1.1.1.11 christos stability exceeded, calibration errors.
410 1.1.1.11 christos As with other ntpq output, times are in milliseconds; very small values
411 1.1.1.11 christos may be shown as exponentials.
412 1.1.1.11 christos The precision value displayed is in milliseconds as well, unlike the
413 1.1.1.11 christos precision system variable.
414 1.1.1.11 christos <br><dt><code>lassociations</code><dd>Perform the same function as the associations command, except display
415 1.1.1.11 christos mobilized and unmobilized associations, including all clients.
416 1.1.1.11 christos <br><dt><code>lopeers</code> <code>[-4|-6]</code><dd>Display a list of all peers and clients showing
417 1.1.1.11 christos <code>dstadr</code>
418 1.1.1.11 christos (associated with the given IP version).
419 1.1.1.11 christos <br><dt><code>lpassociations</code><dd>Display the last obtained list of associations, including all clients.
420 1.1.1.11 christos <br><dt><code>lpeers</code> <code>[-4|-6]</code><dd>Display a list of all peers and clients (associated with the given IP version).
421 1.1.1.11 christos <br><dt><code>monstats</code><dd>Display monitor facility status, statistics, and limits:
422 1.1.1.11 christos enabled, addresses, peak addresses, maximum addresses,
423 1.1.1.11 christos reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
424 1.1.1.11 christos <br><dt><code>mreadlist</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd><br><dt><code>mrl</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd><dd>Perform the same function as the
425 1.1.1.11 christos <code>readlist</code>
426 1.1.1.11 christos command for a range of association ids.
427 1.1.1.11 christos <br><dt><code>mreadvar</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd> <code>[</code><kbd>name</kbd><code>]</code><code>[,...]</code><dd>This range may be determined from the list displayed by any
428 1.1.1.11 christos command showing associations.
429 1.1.1.11 christos <br><dt><code>mrv</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd> <code>[</code><kbd>name</kbd><code>]</code><code>[,...]</code><dd>Perform the same function as the
430 1.1.1.11 christos <code>readvar</code>
431 1.1.1.11 christos command for a range of association ids.
432 1.1.1.11 christos This range may be determined from the list displayed by any
433 1.1.1.11 christos command showing associations.
434 1.1.1.11 christos <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>Display traffic counts of the most recently seen source addresses
435 1.1.1.11 christos collected and maintained by the monitor facility.
436 1.1.1.2 christos With the exception of
437 1.1.1.11 christos <code>sort</code>=<code>[-]</code><kbd>sortorder</kbd>,
438 1.1.1.2 christos the options filter the list returned by
439 1.1.1.11 christos <code>ntpd(8)</code>.
440 1.1.1.2 christos The
441 1.1.1.2 christos <code>limited</code>
442 1.1.1.2 christos and
443 1.1.1.2 christos <code>kod</code>
444 1.1.1.11 christos options return only entries representing client addresses from which the
445 1.1.1.11 christos last packet received triggered either discarding or a KoD response.
446 1.1.1.2 christos The
447 1.1.1.2 christos <code>mincount</code>=<kbd>count</kbd>
448 1.1.1.2 christos option filters entries representing less than
449 1.1.1.2 christos <kbd>count</kbd>
450 1.1.1.2 christos packets.
451 1.1.1.2 christos The
452 1.1.1.2 christos <code>laddr</code>=<kbd>localaddr</kbd>
453 1.1.1.2 christos option filters entries for packets received on any local address other than
454 1.1.1.2 christos <kbd>localaddr</kbd>.
455 1.1.1.2 christos <code>resany</code>=<kbd>hexmask</kbd>
456 1.1.1.2 christos and
457 1.1.1.2 christos <code>resall</code>=<kbd>hexmask</kbd>
458 1.1.1.2 christos filter entries containing none or less than all, respectively, of the bits in
459 1.1.1.2 christos <kbd>hexmask</kbd>,
460 1.1.1.2 christos which must begin with
461 1.1.1.2 christos <code>0x</code>.
462 1.1.1.2 christos The
463 1.1.1.2 christos <kbd>sortorder</kbd>
464 1.1.1.2 christos defaults to
465 1.1.1.2 christos <code>lstint</code>
466 1.1.1.11 christos and may be
467 1.1.1.2 christos <code>addr</code>,
468 1.1.1.2 christos <code>avgint</code>,
469 1.1.1.11 christos <code>count</code>,
470 1.1.1.2 christos <code>lstint</code>,
471 1.1.1.11 christos or any of those preceded by
472 1.1.1.11 christos -
473 1.1.1.11 christos to reverse the sort order.
474 1.1.1.2 christos The output columns are:
475 1.1.1.2 christos <dl>
476 1.1.1.2 christos <dt>Column<dd>Description
477 1.1.1.11 christos <br><dt><code>lstint</code><dd>Interval in seconds between the receipt of the most recent packet from
478 1.1.1.11 christos this address and the completion of the retrieval of the MRU list by
479 1.1.1.2 christos <code>ntpq</code>
480 1.1.1.2 christos <br><dt><code>avgint</code><dd>Average interval in s between packets from this address.
481 1.1.1.2 christos <br><dt><code>rstr</code><dd>Restriction flags associated with this address.
482 1.1.1.2 christos Most are copied unchanged from the matching
483 1.1.1.2 christos <code>restrict</code>
484 1.1.1.11 christos command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
485 1.1.1.11 christos the last packet from this address triggered a rate control response.
486 1.1.1.2 christos <br><dt><code>r</code><dd>Rate control indicator, either
487 1.1.1.2 christos a period,
488 1.1.1.2 christos <code>L</code>
489 1.1.1.2 christos or
490 1.1.1.2 christos <code>K</code>
491 1.1.1.2 christos for no rate control response,
492 1.1.1.2 christos rate limiting by discarding, or rate limiting with a KoD response, respectively.
493 1.1.1.2 christos <br><dt><code>m</code><dd>Packet mode.
494 1.1.1.2 christos <br><dt><code>v</code><dd>Packet version number.
495 1.1.1.2 christos <br><dt><code>count</code><dd>Packets received from this address.
496 1.1.1.2 christos <br><dt><code>rport</code><dd>Source port of last packet from this address.
497 1.1.1.11 christos <br><dt><code>remote</code> <code>address</code><dd>host or DNS name, numeric address, or address followed by
498 1.1.1.2 christos claimed DNS name which could not be verified in parentheses.
499 1.1.1.2 christos </dl>
500 1.1.1.11 christos <br><dt><code>opeers</code> <code>[-4 | -6]</code><dd>Obtain and print the old-style list of all peers and clients showing
501 1.1.1.11 christos <code>dstadr</code>
502 1.1.1.11 christos (associated with the given IP version),
503 1.1.1.2 christos rather than the
504 1.1.1.11 christos <code>refid</code>.
505 1.1.1.2 christos <br><dt><code>passociations</code><dd>Perform the same function as the
506 1.1.1.2 christos <code>associations</code>
507 1.1.1.2 christos command,
508 1.1.1.2 christos except that it uses previously stored data rather than making a new query.
509 1.1.1.2 christos <br><dt><code>peers</code><dd>Display a list of peers in the form:
510 1.1.1.2 christos <pre class="example"> [tally]remote refid st t when pool reach delay offset jitter
511 1.1.1.2 christos </pre>
512 1.1.1.2 christos <dl>
513 1.1.1.2 christos <dt>Variable<dd>Description
514 1.1.1.2 christos <br><dt><code>[tally]</code><dd>single-character code indicating current value of the
515 1.1.1.2 christos <code>select</code>
516 1.1.1.2 christos field of the
517 1.1.1.2 christos .Lk decode.html#peer "peer status word"
518 1.1.1.2 christos <br><dt><code>remote</code><dd>host name (or IP number) of peer.
519 1.1.1.11 christos The value displayed will be truncated to 15 characters unless the
520 1.1.1.11 christos <code>ntpq</code>
521 1.1.1.2 christos <code>-w</code>
522 1.1.1.11 christos option is given, in which case the full value will be displayed
523 1.1.1.11 christos on the first line, and if too long,
524 1.1.1.11 christos the remaining data will be displayed on the next line.
525 1.1.1.11 christos <br><dt><code>refid</code><dd>source IP address or
526 1.1.1.2 christos .Lk decode.html#kiss "'kiss code"
527 1.1.1.11 christos <br><dt><code>st</code><dd>stratum: 0 for local reference clocks, 1 for servers with local
528 1.1.1.11 christos reference clocks, ..., 16 for unsynchronized server clocks
529 1.1.1.2 christos <br><dt><code>t</code><dd><code>u</code>:
530 1.1.1.2 christos unicast or manycast client,
531 1.1.1.2 christos <code>b</code>:
532 1.1.1.2 christos broadcast or multicast client,
533 1.1.1.11 christos <code>p</code>:
534 1.1.1.11 christos pool source,
535 1.1.1.2 christos <code>l</code>:
536 1.1.1.2 christos local (reference clock),
537 1.1.1.2 christos <code>s</code>:
538 1.1.1.2 christos symmetric (peer),
539 1.1.1.2 christos <code>A</code>:
540 1.1.1.2 christos manycast server,
541 1.1.1.2 christos <code>B</code>:
542 1.1.1.2 christos broadcast server,
543 1.1.1.2 christos <code>M</code>:
544 1.1.1.2 christos multicast server
545 1.1.1.11 christos <br><dt><code>when</code><dd>time in seconds, minutes, hours, or days since the last packet
546 1.1.1.11 christos was received, or
547 1.1.1.11 christos -
548 1.1.1.11 christos if a packet has never been received
549 1.1.1.11 christos <br><dt><code>poll</code><dd>poll interval (s)
550 1.1.1.2 christos <br><dt><code>reach</code><dd>reach shift register (octal)
551 1.1.1.2 christos <br><dt><code>delay</code><dd>roundtrip delay
552 1.1.1.2 christos <br><dt><code>offset</code><dd>offset of server relative to this host
553 1.1.1.11 christos <br><dt><code>jitter</code><dd>offset RMS error estimate.
554 1.1.1.2 christos </dl>
555 1.1.1.11 christos <br><dt><code>pstats</code> <kbd>associd</kbd><dd>Display the statistics for the peer with the given
556 1.1.1.11 christos <kbd>associd</kbd>:
557 1.1.1.11 christos associd, status, remote host, local address, time last received,
558 1.1.1.11 christos time until next send, reachability change, packets sent,
559 1.1.1.11 christos packets received, bad authentication, bogus origin, duplicate,
560 1.1.1.11 christos bad dispersion, bad reference time, candidate order.
561 1.1.1.11 christos <br><dt><code>readlist</code> <code>[</code><kbd>associd</kbd><code>]</code><br><dt><code>rl</code> <code>[</code><kbd>associd</kbd><code>]</code><dd>Display all system or peer variables.
562 1.1.1.11 christos If the
563 1.1.1.11 christos <kbd>associd</kbd>
564 1.1.1.11 christos is omitted, it is assumed to be zero.
565 1.1.1.11 christos <br><dt><code>readvar</code> <code>[</code><kbd>associd</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>] [, ...]]</code><br><dt><code>rv</code> <code>[</code><kbd>associd</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>] [, ...]]</code><dd>Display the specified system or peer variables.
566 1.1.1.2 christos If
567 1.1.1.11 christos <kbd>associd</kbd>
568 1.1.1.2 christos is zero, the variables are from the
569 1.1.1.2 christos <a href="#System-Variables">System Variables</a>
570 1.1.1.2 christos name space, otherwise they are from the
571 1.1.1.2 christos <a href="#Peer-Variables">Peer Variables</a>
572 1.1.1.2 christos name space.
573 1.1.1.2 christos The
574 1.1.1.11 christos <kbd>associd</kbd>
575 1.1.1.2 christos is required, as the same name can occur in both spaces.
576 1.1.1.2 christos If no
577 1.1.1.2 christos <kbd>name</kbd>
578 1.1.1.11 christos is included, all operative variables in the name space are displayed.
579 1.1.1.11 christos In this case only, if the
580 1.1.1.11 christos <kbd>associd</kbd>
581 1.1.1.11 christos is omitted, it is assumed to be zero.
582 1.1.1.2 christos Multiple names are specified with comma separators and without whitespace.
583 1.1.1.2 christos Note that time values are represented in milliseconds
584 1.1.1.2 christos and frequency values in parts-per-million (PPM).
585 1.1.1.2 christos Some NTP timestamps are represented in the format
586 1.1.1.11 christos <kbd>YYYY</kbd><kbd>MM</kbd> <kbd>DD</kbd> <kbd>TTTT</kbd>,
587 1.1.1.11 christos where
588 1.1.1.11 christos <kbd>YYYY</kbd>
589 1.1.1.11 christos is the year,
590 1.1.1.11 christos <kbd>MM</kbd>
591 1.1.1.11 christos the month of year,
592 1.1.1.11 christos <kbd>DD</kbd>
593 1.1.1.11 christos the day of month and
594 1.1.1.11 christos <kbd>TTTT</kbd>
595 1.1.1.11 christos the time of day.
596 1.1.1.11 christos <br><dt><code>reslist</code><dd>Display the access control (restrict) list for
597 1.1.1.2 christos <code>ntpq</code>
598 1.1.1.11 christos Authentication is required.
599 1.1.1.11 christos <br><dt><code>saveconfig</code> <kbd>filename</kbd><dd>Save the current configuration,
600 1.1.1.11 christos including any runtime modifications made by
601 1.1.1.2 christos <code>:config</code>
602 1.1.1.2 christos or
603 1.1.1.2 christos <code>config-from-file</code>,
604 1.1.1.11 christos to the NTP server host file
605 1.1.1.2 christos <kbd>filename</kbd>.
606 1.1.1.2 christos This command will be rejected by the server unless
607 1.1.1.2 christos .Lk miscopt.html#saveconfigdir "saveconfigdir"
608 1.1.1.2 christos appears in the
609 1.1.1.11 christos <code>ntpd(8)</code>
610 1.1.1.2 christos configuration file.
611 1.1.1.2 christos <kbd>filename</kbd>
612 1.1.1.2 christos can use
613 1.1.1.11 christos <code>date(1)</code>
614 1.1.1.11 christos format specifiers to substitute the current date and time, for
615 1.1.1.11 christos example,
616 1.1.1.11 christos <pre class="example"> <code>saveconfig</code> <span class="file">ntp-%Y%m%d-%H%M%S.conf</span>.
617 1.1.1.11 christos </pre>
618 1.1.1.11 christos <p>The filename used is stored in system variable
619 1.1.1.2 christos <code>savedconfig</code>.
620 1.1.1.2 christos Authentication is required.
621 1.1.1.11 christos <br><dt><code>sysinfo</code><dd>Display system operational summary:
622 1.1.1.11 christos associd, status, system peer, system peer mode, leap indicator,
623 1.1.1.11 christos stratum, log2 precision, root delay, root dispersion,
624 1.1.1.11 christos reference id, reference time, system jitter, clock jitter,
625 1.1.1.11 christos clock wander, broadcast delay, symm. auth. delay.
626 1.1.1.11 christos <br><dt><code>sysstats</code><dd>Display system uptime and packet counts maintained in the
627 1.1.1.11 christos protocol module:
628 1.1.1.11 christos uptime, sysstats reset, packets received, current version,
629 1.1.1.11 christos older version, bad length or format, authentication failed,
630 1.1.1.11 christos declined, restricted, rate limited, KoD responses,
631 1.1.1.11 christos processed for time.
632 1.1.1.11 christos <br><dt><code>timerstats</code><dd>Display interval timer counters:
633 1.1.1.11 christos time since reset, timer overruns, calls to transmit.
634 1.1.1.11 christos <br><dt><code>writelist</code> <kbd>associd</kbd><dd>Set all system or peer variables included in the variable list.
635 1.1.1.11 christos <br><dt><code>writevar</code> <kbd>associd</kbd> <kbd>name</kbd>=<kbd>value</kbd> <code>[, ...]</code><dd>Set the specified variables in the variable list.
636 1.1.1.2 christos If the
637 1.1.1.11 christos <kbd>associd</kbd>
638 1.1.1.2 christos is zero, the variables are from the
639 1.1.1.2 christos <a href="#System-Variables">System Variables</a>
640 1.1.1.2 christos name space, otherwise they are from the
641 1.1.1.2 christos <a href="#Peer-Variables">Peer Variables</a>
642 1.1.1.2 christos name space.
643 1.1.1.2 christos The
644 1.1.1.11 christos <kbd>associd</kbd>
645 1.1.1.2 christos is required, as the same name can occur in both spaces.
646 1.1.1.11 christos Authentication is required.
647 1.1.1.2 christos </dl>
648 1.1.1.2 christos
649 1.1.1.2 christos <h5 class="subsubsection">Status Words and Kiss Codes</h5>
650 1.1.1.2 christos
651 1.1.1.2 christos <p>The current state of the operating program is shown
652 1.1.1.2 christos in a set of status words
653 1.1.1.2 christos maintained by the system.
654 1.1.1.2 christos Status information is also available on a per-association basis.
655 1.1.1.11 christos These words are displayed by the
656 1.1.1.11 christos <code>readlist</code>
657 1.1.1.2 christos and
658 1.1.1.11 christos <code>associations</code>
659 1.1.1.2 christos commands both in hexadecimal and in decoded short tip strings.
660 1.1.1.2 christos The codes, tips and short explanations are documented on the
661 1.1.1.2 christos .Lk decode.html "Event Messages and Status Words"
662 1.1.1.2 christos page.
663 1.1.1.2 christos The page also includes a list of system and peer messages,
664 1.1.1.2 christos the code for the latest of which is included in the status word.
665 1.1.1.2 christos
666 1.1.1.2 christos <p>Information resulting from protocol machine state transitions
667 1.1.1.2 christos is displayed using an informal set of ASCII strings called
668 1.1.1.2 christos .Lk decode.html#kiss "kiss codes" .
669 1.1.1.2 christos The original purpose was for kiss-o'-death (KoD) packets
670 1.1.1.2 christos sent by the server to advise the client of an unusual condition.
671 1.1.1.2 christos They are now displayed, when appropriate,
672 1.1.1.2 christos in the reference identifier field in various billboards.
673 1.1.1.2 christos
674 1.1.1.2 christos <h5 class="subsubsection">System Variables</h5>
675 1.1.1.2 christos
676 1.1.1.2 christos <p>The following system variables appear in the
677 1.1.1.11 christos <code>readlist</code>
678 1.1.1.2 christos billboard.
679 1.1.1.2 christos Not all variables are displayed in some configurations.
680 1.1.1.11 christos
681 1.1.1.2 christos <dl>
682 1.1.1.2 christos <dt>Variable<dd>Description
683 1.1.1.2 christos <br><dt><code>status</code><dd>.Lk decode.html#sys "system status word"
684 1.1.1.2 christos <br><dt><code>version</code><dd>NTP software version and build time
685 1.1.1.2 christos <br><dt><code>processor</code><dd>hardware platform and version
686 1.1.1.2 christos <br><dt><code>system</code><dd>operating system and version
687 1.1.1.2 christos <br><dt><code>leap</code><dd>leap warning indicator (0-3)
688 1.1.1.2 christos <br><dt><code>stratum</code><dd>stratum (1-15)
689 1.1.1.2 christos <br><dt><code>precision</code><dd>precision (log2 s)
690 1.1.1.2 christos <br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock
691 1.1.1.2 christos <br><dt><code>rootdisp</code><dd>total dispersion to the primary reference clock
692 1.1.1.11 christos <br><dt><code>refid</code><dd>reference id or
693 1.1.1.2 christos .Lk decode.html#kiss "kiss code"
694 1.1.1.2 christos <br><dt><code>reftime</code><dd>reference time
695 1.1.1.11 christos <br><dt><code>clock</code><dd>date and time of day
696 1.1.1.11 christos <br><dt><code>peer</code><dd>system peer association id
697 1.1.1.11 christos <br><dt><code>tc</code><dd>time constant and poll exponent (log2 s) (3-17)
698 1.1.1.11 christos <br><dt><code>mintc</code><dd>minimum time constant (log2 s) (3-10)
699 1.1.1.11 christos <br><dt><code>offset</code><dd>combined offset of server relative to this host
700 1.1.1.11 christos <br><dt><code>frequency</code><dd>frequency drift (PPM) relative to hardware clock
701 1.1.1.2 christos <br><dt><code>sys_jitter</code><dd>combined system jitter
702 1.1.1.2 christos <br><dt><code>clk_wander</code><dd>clock frequency wander (PPM)
703 1.1.1.2 christos <br><dt><code>clk_jitter</code><dd>clock jitter
704 1.1.1.2 christos <br><dt><code>tai</code><dd>TAI-UTC offset (s)
705 1.1.1.2 christos <br><dt><code>leapsec</code><dd>NTP seconds when the next leap second is/was inserted
706 1.1.1.2 christos <br><dt><code>expire</code><dd>NTP seconds when the NIST leapseconds file expires
707 1.1.1.2 christos </dl>
708 1.1.1.2 christos The jitter and wander statistics are exponentially-weighted RMS averages.
709 1.1.1.2 christos The system jitter is defined in the NTPv4 specification;
710 1.1.1.2 christos the clock jitter statistic is computed by the clock discipline module.
711 1.1.1.2 christos
712 1.1.1.2 christos <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
713 1.1.1.2 christos additional system variables are displayed,
714 1.1.1.2 christos including some or all of the following,
715 1.1.1.2 christos depending on the particular Autokey dance:
716 1.1.1.2 christos <dl>
717 1.1.1.2 christos <dt>Variable<dd>Description
718 1.1.1.2 christos <br><dt><code>host</code><dd>Autokey host name for this host
719 1.1.1.2 christos <br><dt><code>ident</code><dd>Autokey group name for this host
720 1.1.1.2 christos <br><dt><code>flags</code><dd>host flags (see Autokey specification)
721 1.1.1.2 christos <br><dt><code>digest</code><dd>OpenSSL message digest algorithm
722 1.1.1.2 christos <br><dt><code>signature</code><dd>OpenSSL digest/signature scheme
723 1.1.1.2 christos <br><dt><code>update</code><dd>NTP seconds at last signature update
724 1.1.1.2 christos <br><dt><code>cert</code><dd>certificate subject, issuer and certificate flags
725 1.1.1.2 christos <br><dt><code>until</code><dd>NTP seconds when the certificate expires
726 1.1.1.2 christos </dl>
727 1.1.1.2 christos
728 1.1.1.2 christos <h5 class="subsubsection">Peer Variables</h5>
729 1.1.1.2 christos
730 1.1.1.2 christos <p>The following peer variables appear in the
731 1.1.1.11 christos <code>readlist</code>
732 1.1.1.2 christos billboard for each association.
733 1.1.1.2 christos Not all variables are displayed in some configurations.
734 1.1.1.2 christos
735 1.1.1.2 christos <dl>
736 1.1.1.2 christos <dt>Variable<dd>Description
737 1.1.1.11 christos <br><dt><code>associd</code><dd>association id
738 1.1.1.2 christos <br><dt><code>status</code><dd>.Lk decode.html#peer "peer status word"
739 1.1.1.2 christos <br><dt><code>srcadr</code><dd>source (remote) IP address
740 1.1.1.2 christos <br><dt><code>srcport</code><dd>source (remote) port
741 1.1.1.2 christos <br><dt><code>dstadr</code><dd>destination (local) IP address
742 1.1.1.2 christos <br><dt><code>dstport</code><dd>destination (local) port
743 1.1.1.2 christos <br><dt><code>leap</code><dd>leap indicator (0-3)
744 1.1.1.2 christos <br><dt><code>stratum</code><dd>stratum (0-15)
745 1.1.1.2 christos <br><dt><code>precision</code><dd>precision (log2 s)
746 1.1.1.2 christos <br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock
747 1.1.1.2 christos <br><dt><code>rootdisp</code><dd>total root dispersion to the primary reference clock
748 1.1.1.11 christos <br><dt><code>refid</code><dd>reference id or
749 1.1.1.2 christos .Lk decode.html#kiss "kiss code"
750 1.1.1.2 christos <br><dt><code>reftime</code><dd>reference time
751 1.1.1.11 christos <br><dt><code>rec</code><dd>last packet received time
752 1.1.1.2 christos <br><dt><code>reach</code><dd>reach register (octal)
753 1.1.1.2 christos <br><dt><code>unreach</code><dd>unreach counter
754 1.1.1.2 christos <br><dt><code>hmode</code><dd>host mode (1-6)
755 1.1.1.2 christos <br><dt><code>pmode</code><dd>peer mode (1-5)
756 1.1.1.2 christos <br><dt><code>hpoll</code><dd>host poll exponent (log2 s) (3-17)
757 1.1.1.2 christos <br><dt><code>ppoll</code><dd>peer poll exponent (log2 s) (3-17)
758 1.1.1.2 christos <br><dt><code>headway</code><dd>headway (see
759 1.1.1.2 christos .Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
760 1.1.1.2 christos <br><dt><code>flash</code><dd>.Lk decode.html#flash "flash status word"
761 1.1.1.11 christos <br><dt><code>keyid</code><dd>symmetric key id
762 1.1.1.2 christos <br><dt><code>offset</code><dd>filter offset
763 1.1.1.2 christos <br><dt><code>delay</code><dd>filter delay
764 1.1.1.2 christos <br><dt><code>dispersion</code><dd>filter dispersion
765 1.1.1.2 christos <br><dt><code>jitter</code><dd>filter jitter
766 1.1.1.2 christos <br><dt><code>bias</code><dd>unicast/broadcast bias
767 1.1.1.2 christos <br><dt><code>xleave</code><dd>interleave delay (see
768 1.1.1.2 christos .Lk xleave.html "NTP Interleaved Modes" )
769 1.1.1.2 christos </dl>
770 1.1.1.2 christos The
771 1.1.1.2 christos <code>bias</code>
772 1.1.1.2 christos variable is calculated when the first broadcast packet is received
773 1.1.1.2 christos after the calibration volley.
774 1.1.1.11 christos It represents the offset of the broadcast subgraph relative to the
775 1.1.1.11 christos unicast subgraph.
776 1.1.1.2 christos The
777 1.1.1.2 christos <code>xleave</code>
778 1.1.1.2 christos variable appears only for the interleaved symmetric and interleaved modes.
779 1.1.1.2 christos It represents the internal queuing, buffering and transmission delays
780 1.1.1.2 christos for the preceding packet.
781 1.1.1.2 christos
782 1.1.1.2 christos <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
783 1.1.1.2 christos additional peer variables are displayed, including the following:
784 1.1.1.2 christos <dl>
785 1.1.1.2 christos <dt>Variable<dd>Description
786 1.1.1.2 christos <br><dt><code>flags</code><dd>peer flags (see Autokey specification)
787 1.1.1.2 christos <br><dt><code>host</code><dd>Autokey server name
788 1.1.1.2 christos <br><dt><code>flags</code><dd>peer flags (see Autokey specification)
789 1.1.1.2 christos <br><dt><code>signature</code><dd>OpenSSL digest/signature scheme
790 1.1.1.11 christos <br><dt><code>initsequence</code><dd>initial key id
791 1.1.1.2 christos <br><dt><code>initkey</code><dd>initial key index
792 1.1.1.2 christos <br><dt><code>timestamp</code><dd>Autokey signature timestamp
793 1.1.1.11 christos <br><dt><code>ident</code><dd>Autokey group name for this association
794 1.1.1.2 christos </dl>
795 1.1.1.2 christos
796 1.1.1.2 christos <h5 class="subsubsection">Clock Variables</h5>
797 1.1.1.2 christos
798 1.1.1.2 christos <p>The following clock variables appear in the
799 1.1.1.11 christos <code>clocklist</code>
800 1.1.1.2 christos billboard for each association with a reference clock.
801 1.1.1.2 christos Not all variables are displayed in some configurations.
802 1.1.1.2 christos <dl>
803 1.1.1.2 christos <dt>Variable<dd>Description
804 1.1.1.11 christos <br><dt><code>associd</code><dd>association id
805 1.1.1.2 christos <br><dt><code>status</code><dd>.Lk decode.html#clock "clock status word"
806 1.1.1.2 christos <br><dt><code>device</code><dd>device description
807 1.1.1.2 christos <br><dt><code>timecode</code><dd>ASCII time code string (specific to device)
808 1.1.1.2 christos <br><dt><code>poll</code><dd>poll messages sent
809 1.1.1.2 christos <br><dt><code>noreply</code><dd>no reply
810 1.1.1.2 christos <br><dt><code>badformat</code><dd>bad format
811 1.1.1.2 christos <br><dt><code>baddata</code><dd>bad date or time
812 1.1.1.2 christos <br><dt><code>fudgetime1</code><dd>fudge time 1
813 1.1.1.2 christos <br><dt><code>fudgetime2</code><dd>fudge time 2
814 1.1.1.2 christos <br><dt><code>stratum</code><dd>driver stratum
815 1.1.1.11 christos <br><dt><code>refid</code><dd>driver reference id
816 1.1.1.2 christos <br><dt><code>flags</code><dd>driver flags
817 1.1 christos </dl>
818 1.1 christos
819 1.1 christos <p>This section was generated by <strong>AutoGen</strong>,
820 1.1 christos using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpq</code> program.
821 1.1 christos This software is released under the NTP license, <http://ntp.org/license>.
822 1.1 christos
823 1.1 christos <ul class="menu">
824 1.1.1.7 christos <li><a accesskey="1" href="#ntpq-usage">ntpq usage</a>: ntpq help/usage (<span class="option">--help</span>)
825 1.1 christos <li><a accesskey="2" href="#ntpq-ipv4">ntpq ipv4</a>: ipv4 option (-4)
826 1.1 christos <li><a accesskey="3" href="#ntpq-ipv6">ntpq ipv6</a>: ipv6 option (-6)
827 1.1 christos <li><a accesskey="4" href="#ntpq-command">ntpq command</a>: command option (-c)
828 1.1.1.2 christos <li><a accesskey="5" href="#ntpq-interactive">ntpq interactive</a>: interactive option (-i)
829 1.1.1.2 christos <li><a accesskey="6" href="#ntpq-numeric">ntpq numeric</a>: numeric option (-n)
830 1.1.1.2 christos <li><a accesskey="7" href="#ntpq-old_002drv">ntpq old-rv</a>: old-rv option
831 1.1.1.2 christos <li><a accesskey="8" href="#ntpq-peers">ntpq peers</a>: peers option (-p)
832 1.1.1.7 christos <li><a accesskey="9" href="#ntpq-refid">ntpq refid</a>: refid option (-r)
833 1.1.1.7 christos <li><a href="#ntpq-wide">ntpq wide</a>: wide option (-w)
834 1.1.1.2 christos <li><a href="#ntpq-config">ntpq config</a>: presetting/configuring ntpq
835 1.1 christos <li><a href="#ntpq-exit-status">ntpq exit status</a>: exit status
836 1.1 christos </ul>
837 1.1 christos
838 1.1 christos <div class="node">
839 1.1 christos <p><hr>
840 1.1.1.7 christos <a name="ntpq-usage"></a>Next: <a rel="next" accesskey="n" href="#ntpq-ipv4">ntpq ipv4</a>,
841 1.1 christos Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
842 1.1.1.7 christos <br>
843 1.1 christos </div>
844 1.1 christos
845 1.1.1.7 christos <h4 class="subsection">ntpq help/usage (<span class="option">--help</span>)</h4>
846 1.1 christos
847 1.1 christos <p><a name="index-ntpq-help-3"></a>
848 1.1 christos This is the automatically generated usage text for ntpq.
849 1.1 christos
850 1.1 christos <p>The text printed is the same whether selected with the <code>help</code> option
851 1.1.1.7 christos (<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
852 1.1 christos the usage text by passing it through a pager program.
853 1.1 christos <code>more-help</code> is disabled on platforms without a working
854 1.1 christos <code>fork(2)</code> function. The <code>PAGER</code> environment variable is
855 1.1.1.7 christos used to select the program, defaulting to <span class="file">more</span>. Both will exit
856 1.1 christos with a status code of 0.
857 1.1 christos
858 1.1.1.11.2.1 christos <pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p11
859 1.1 christos Usage: ntpq [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]
860 1.1 christos Flg Arg Option-Name Description
861 1.1.1.11 christos -4 no ipv4 Force IPv4 name resolution
862 1.1 christos - prohibits the option 'ipv6'
863 1.1.1.11 christos -6 no ipv6 Force IPv6 name resolution
864 1.1 christos - prohibits the option 'ipv4'
865 1.1 christos -c Str command run a command and exit
866 1.1 christos - may appear multiple times
867 1.1 christos -d no debug-level Increase debug verbosity level
868 1.1 christos - may appear multiple times
869 1.1 christos -D Num set-debug-level Set the debug verbosity level
870 1.1 christos - may appear multiple times
871 1.1 christos -i no interactive Force ntpq to operate in interactive mode
872 1.1 christos - prohibits these options:
873 1.1 christos command
874 1.1 christos peers
875 1.1 christos -n no numeric numeric host addresses
876 1.1 christos no old-rv Always output status line with readvar
877 1.1.1.2 christos -p no peers Print a list of the peers
878 1.1.1.2 christos - prohibits the option 'interactive'
879 1.1.1.7 christos -r KWd refid Set default display type for S2+ refids
880 1.1.1.2 christos -w no wide Display the full 'remote' value
881 1.1 christos opt version output version information and exit
882 1.1 christos -? no help display extended usage information and exit
883 1.1 christos -! no more-help extended usage information passed thru pager
884 1.1 christos -> opt save-opts save the option state to a config file
885 1.1 christos -< Str load-opts load options from a config file
886 1.1 christos - disabled as '--no-load-opts'
887 1.1 christos - may appear multiple times
888 1.1 christos
889 1.1 christos Options are specified by doubled hyphens and their name or by a single
890 1.1 christos hyphen and the flag character.
891 1.1 christos
892 1.1 christos The following option preset mechanisms are supported:
893 1.1 christos - reading file $HOME/.ntprc
894 1.1 christos - reading file ./.ntprc
895 1.1 christos - examining environment variables named NTPQ_*
896 1.1 christos
897 1.1.1.7 christos The valid "refid" option keywords are:
898 1.1.1.7 christos hash ipv4
899 1.1.1.7 christos or an integer from 0 through 1
900 1.1.1.7 christos
901 1.1 christos Please send bug reports to: <http://bugs.ntp.org, bugs (a] ntp.org>
902 1.1 christos </pre>
903 1.1 christos <div class="node">
904 1.1 christos <p><hr>
905 1.1.1.7 christos <a name="ntpq-ipv4"></a>Next: <a rel="next" accesskey="n" href="#ntpq-ipv6">ntpq ipv6</a>,
906 1.1 christos Previous: <a rel="previous" accesskey="p" href="#ntpq-usage">ntpq usage</a>,
907 1.1 christos Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
908 1.1.1.7 christos <br>
909 1.1 christos </div>
910 1.1 christos
911 1.1 christos <h4 class="subsection">ipv4 option (-4)</h4>
912 1.1 christos
913 1.1 christos <p><a name="index-ntpq_002dipv4-4"></a>
914 1.1.1.11 christos This is the “force ipv4 name resolution” option.
915 1.1 christos
916 1.1 christos <p class="noindent">This option has some usage constraints. It:
917 1.1 christos <ul>
918 1.1 christos <li>must not appear in combination with any of the following options:
919 1.1 christos ipv6.
920 1.1 christos </ul>
921 1.1 christos
922 1.1.1.11 christos <p>Force resolution of following host names on the command line
923 1.1 christos to the IPv4 namespace.
924 1.1 christos <div class="node">
925 1.1 christos <p><hr>
926 1.1.1.7 christos <a name="ntpq-ipv6"></a>Next: <a rel="next" accesskey="n" href="#ntpq-command">ntpq command</a>,
927 1.1 christos Previous: <a rel="previous" accesskey="p" href="#ntpq-ipv4">ntpq ipv4</a>,
928 1.1 christos Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
929 1.1.1.7 christos <br>
930 1.1 christos </div>
931 1.1 christos
932 1.1 christos <h4 class="subsection">ipv6 option (-6)</h4>
933 1.1 christos
934 1.1 christos <p><a name="index-ntpq_002dipv6-5"></a>
935 1.1.1.11 christos This is the “force ipv6 name resolution” option.
936 1.1 christos
937 1.1 christos <p class="noindent">This option has some usage constraints. It:
938 1.1 christos <ul>
939 1.1 christos <li>must not appear in combination with any of the following options:
940 1.1 christos ipv4.
941 1.1 christos </ul>
942 1.1 christos
943 1.1.1.11 christos <p>Force resolution of following host names on the command line
944 1.1 christos to the IPv6 namespace.
945 1.1 christos <div class="node">
946 1.1 christos <p><hr>
947 1.1.1.7 christos <a name="ntpq-command"></a>Next: <a rel="next" accesskey="n" href="#ntpq-interactive">ntpq interactive</a>,
948 1.1 christos Previous: <a rel="previous" accesskey="p" href="#ntpq-ipv6">ntpq ipv6</a>,
949 1.1 christos Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
950 1.1.1.7 christos <br>
951 1.1 christos </div>
952 1.1 christos
953 1.1 christos <h4 class="subsection">command option (-c)</h4>
954 1.1 christos
955 1.1 christos <p><a name="index-ntpq_002dcommand-6"></a>
956 1.1 christos This is the “run a command and exit” option.
957 1.1.1.7 christos This option takes a string argument <span class="file">cmd</span>.
958 1.1 christos
959 1.1 christos <p class="noindent">This option has some usage constraints. It:
960 1.1 christos <ul>
961 1.1 christos <li>may appear an unlimited number of times.
962 1.1 christos </ul>
963 1.1 christos
964 1.1 christos <p>The following argument is interpreted as an interactive format command
965 1.1 christos and is added to the list of commands to be executed on the specified
966 1.1 christos host(s).
967 1.1 christos <div class="node">
968 1.1 christos <p><hr>
969 1.1.1.7 christos <a name="ntpq-interactive"></a>Next: <a rel="next" accesskey="n" href="#ntpq-numeric">ntpq numeric</a>,
970 1.1.1.2 christos Previous: <a rel="previous" accesskey="p" href="#ntpq-command">ntpq command</a>,
971 1.1 christos Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
972 1.1.1.7 christos <br>
973 1.1 christos </div>
974 1.1 christos
975 1.1 christos <h4 class="subsection">interactive option (-i)</h4>
976 1.1 christos
977 1.1.1.2 christos <p><a name="index-ntpq_002dinteractive-7"></a>
978 1.1 christos This is the “force ntpq to operate in interactive mode” option.
979 1.1 christos
980 1.1 christos <p class="noindent">This option has some usage constraints. It:
981 1.1 christos <ul>
982 1.1 christos <li>must not appear in combination with any of the following options:
983 1.1 christos command, peers.
984 1.1 christos </ul>
985 1.1 christos
986 1.1 christos <p>Force <code>ntpq</code> to operate in interactive mode.
987 1.1 christos Prompts will be written to the standard output and
988 1.1 christos commands read from the standard input.
989 1.1 christos <div class="node">
990 1.1 christos <p><hr>
991 1.1.1.7 christos <a name="ntpq-numeric"></a>Next: <a rel="next" accesskey="n" href="#ntpq-old_002drv">ntpq old-rv</a>,
992 1.1 christos Previous: <a rel="previous" accesskey="p" href="#ntpq-interactive">ntpq interactive</a>,
993 1.1 christos Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
994 1.1.1.7 christos <br>
995 1.1 christos </div>
996 1.1 christos
997 1.1 christos <h4 class="subsection">numeric option (-n)</h4>
998 1.1 christos
999 1.1.1.2 christos <p><a name="index-ntpq_002dnumeric-8"></a>
1000 1.1 christos This is the “numeric host addresses” option.
1001 1.1 christos Output all host addresses in dotted-quad numeric format rather than
1002 1.1 christos converting to the canonical host names.
1003 1.1 christos <div class="node">
1004 1.1 christos <p><hr>
1005 1.1.1.7 christos <a name="ntpq-old_002drv"></a>Next: <a rel="next" accesskey="n" href="#ntpq-peers">ntpq peers</a>,
1006 1.1 christos Previous: <a rel="previous" accesskey="p" href="#ntpq-numeric">ntpq numeric</a>,
1007 1.1 christos Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
1008 1.1.1.7 christos <br>
1009 1.1 christos </div>
1010 1.1 christos
1011 1.1 christos <h4 class="subsection">old-rv option</h4>
1012 1.1 christos
1013 1.1.1.2 christos <p><a name="index-ntpq_002dold_002drv-9"></a>
1014 1.1 christos This is the “always output status line with readvar” option.
1015 1.1 christos By default, <code>ntpq</code> now suppresses the <code>associd=...</code>
1016 1.1 christos line that precedes the output of <code>readvar</code>
1017 1.1 christos (alias <code>rv</code>) when a single variable is requested, such as
1018 1.1 christos <code>ntpq -c "rv 0 offset"</code>.
1019 1.1 christos This option causes <code>ntpq</code> to include both lines of output
1020 1.1 christos for a single-variable <code>readvar</code>.
1021 1.1 christos Using an environment variable to
1022 1.1 christos preset this option in a script will enable both older and
1023 1.1.1.2 christos newer <code>ntpq</code> to behave identically in this regard.
1024 1.1.1.2 christos <div class="node">
1025 1.1.1.2 christos <p><hr>
1026 1.1.1.7 christos <a name="ntpq-peers"></a>Next: <a rel="next" accesskey="n" href="#ntpq-refid">ntpq refid</a>,
1027 1.1.1.2 christos Previous: <a rel="previous" accesskey="p" href="#ntpq-old_002drv">ntpq old-rv</a>,
1028 1.1.1.2 christos Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
1029 1.1.1.7 christos <br>
1030 1.1.1.2 christos </div>
1031 1.1.1.2 christos
1032 1.1.1.2 christos <h4 class="subsection">peers option (-p)</h4>
1033 1.1.1.2 christos
1034 1.1.1.2 christos <p><a name="index-ntpq_002dpeers-10"></a>
1035 1.1.1.2 christos This is the “print a list of the peers” option.
1036 1.1.1.2 christos
1037 1.1.1.2 christos <p class="noindent">This option has some usage constraints. It:
1038 1.1.1.2 christos <ul>
1039 1.1.1.2 christos <li>must not appear in combination with any of the following options:
1040 1.1.1.2 christos interactive.
1041 1.1.1.2 christos </ul>
1042 1.1.1.2 christos
1043 1.1.1.2 christos <p>Print a list of the peers known to the server as well as a summary
1044 1.1.1.2 christos of their state. This is equivalent to the 'peers' interactive command.
1045 1.1.1.2 christos <div class="node">
1046 1.1.1.2 christos <p><hr>
1047 1.1.1.7 christos <a name="ntpq-refid"></a>Next: <a rel="next" accesskey="n" href="#ntpq-wide">ntpq wide</a>,
1048 1.1.1.2 christos Previous: <a rel="previous" accesskey="p" href="#ntpq-peers">ntpq peers</a>,
1049 1.1.1.2 christos Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
1050 1.1.1.7 christos <br>
1051 1.1.1.7 christos </div>
1052 1.1.1.7 christos
1053 1.1.1.7 christos <h4 class="subsection">refid option (-r)</h4>
1054 1.1.1.6 christos
1055 1.1.1.7 christos <p><a name="index-ntpq_002drefid-11"></a>
1056 1.1.1.7 christos This is the “set default display type for s2+ refids” option.
1057 1.1.1.7 christos This option takes a keyword argument.
1058 1.1.1.7 christos
1059 1.1.1.7 christos <p class="noindent">This option has some usage constraints. It:
1060 1.1.1.7 christos <ul>
1061 1.1.1.7 christos <li>This option takes a keyword as its argument.
1062 1.1.1.7 christos The argument sets an enumeration value that can be tested by comparing the option value macro (OPT_VALUE_REFID).
1063 1.1.1.7 christos The available keywords are:
1064 1.1.1.7 christos <pre class="example"> hash ipv4
1065 1.1.1.7 christos </pre>
1066 1.1.1.7 christos <p>or their numeric equivalent.</ul>
1067 1.1.1.7 christos
1068 1.1.1.7 christos <p>Set the default display format for S2+ refids.
1069 1.1.1.7 christos <div class="node">
1070 1.1.1.7 christos <p><hr>
1071 1.1.1.7 christos <a name="ntpq-wide"></a>Next: <a rel="next" accesskey="n" href="#ntpq-config">ntpq config</a>,
1072 1.1.1.7 christos Previous: <a rel="previous" accesskey="p" href="#ntpq-refid">ntpq refid</a>,
1073 1.1.1.7 christos Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
1074 1.1.1.7 christos <br>
1075 1.1.1.2 christos </div>
1076 1.1.1.2 christos
1077 1.1.1.2 christos <h4 class="subsection">wide option (-w)</h4>
1078 1.1.1.2 christos
1079 1.1.1.7 christos <p><a name="index-ntpq_002dwide-12"></a>
1080 1.1.1.2 christos This is the “display the full 'remote' value” option.
1081 1.1.1.2 christos Display the full value of the 'remote' value. If this requires
1082 1.1.1.2 christos more than 15 characters, display the full value, emit a newline,
1083 1.1.1.2 christos and continue the data display properly indented on the next line.
1084 1.1 christos
1085 1.1 christos <div class="node">
1086 1.1 christos <p><hr>
1087 1.1.1.7 christos <a name="ntpq-config"></a>Next: <a rel="next" accesskey="n" href="#ntpq-exit-status">ntpq exit status</a>,
1088 1.1.1.2 christos Previous: <a rel="previous" accesskey="p" href="#ntpq-wide">ntpq wide</a>,
1089 1.1 christos Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
1090 1.1.1.7 christos <br>
1091 1.1 christos </div>
1092 1.1 christos
1093 1.1 christos <h4 class="subsection">presetting/configuring ntpq</h4>
1094 1.1 christos
1095 1.1 christos <p>Any option that is not marked as <i>not presettable</i> may be preset by
1096 1.1 christos loading values from configuration ("rc" or "ini") files, and values from environment variables named <code>NTPQ</code> and <code>NTPQ_<OPTION_NAME></code>. <code><OPTION_NAME></code> must be one of
1097 1.1 christos the options listed above in upper case and segmented with underscores.
1098 1.1 christos The <code>NTPQ</code> variable will be tokenized and parsed like
1099 1.1 christos the command line. The remaining variables are tested for existence and their
1100 1.1 christos values are treated like option arguments.
1101 1.1 christos
1102 1.1 christos <p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
1103 1.1 christos <ul>
1104 1.1 christos <li>$HOME
1105 1.1 christos <li>$PWD
1106 1.1 christos </ul>
1107 1.1 christos The environment variables <code>HOME</code>, and <code>PWD</code>
1108 1.1.1.7 christos are expanded and replaced when <span class="file">ntpq</span> runs.
1109 1.1 christos For any of these that are plain files, they are simply processed.
1110 1.1.1.7 christos For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
1111 1.1 christos within that directory and processed.
1112 1.1 christos
1113 1.1 christos <p>Configuration files may be in a wide variety of formats.
1114 1.1 christos The basic format is an option name followed by a value (argument) on the
1115 1.1 christos same line. Values may be separated from the option name with a colon,
1116 1.1 christos equal sign or simply white space. Values may be continued across multiple
1117 1.1 christos lines by escaping the newline with a backslash.
1118 1.1 christos
1119 1.1 christos <p>Multiple programs may also share the same initialization file.
1120 1.1 christos Common options are collected at the top, followed by program specific
1121 1.1 christos segments. The segments are separated by lines like:
1122 1.1 christos <pre class="example"> [NTPQ]
1123 1.1 christos </pre>
1124 1.1 christos <p class="noindent">or by
1125 1.1 christos <pre class="example"> <?program ntpq>
1126 1.1 christos </pre>
1127 1.1 christos <p class="noindent">Do not mix these styles within one configuration file.
1128 1.1 christos
1129 1.1 christos <p>Compound values and carefully constructed string values may also be
1130 1.1 christos specified using XML syntax:
1131 1.1 christos <pre class="example"> <option-name>
1132 1.1 christos <sub-opt>...&lt;...&gt;...</sub-opt>
1133 1.1 christos </option-name>
1134 1.1 christos </pre>
1135 1.1 christos <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
1136 1.1 christos <pre class="example"> "...<...>..."
1137 1.1 christos </pre>
1138 1.1 christos <p><code>AutoOpts</code> does not track suboptions. You simply note that it is a
1139 1.1 christos hierarchicly valued option. <code>AutoOpts</code> does provide a means for searching
1140 1.1 christos the associated name/value pair list (see: optionFindValue).
1141 1.1 christos
1142 1.1 christos <p>The command line options relating to configuration and/or usage help are:
1143 1.1 christos
1144 1.1 christos <h5 class="subsubheading">version (-)</h5>
1145 1.1 christos
1146 1.1 christos <p>Print the program version to standard out, optionally with licensing
1147 1.1 christos information, then exit 0. The optional argument specifies how much licensing
1148 1.1 christos detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
1149 1.1 christos Only the first letter of the argument is examined:
1150 1.1 christos
1151 1.1 christos <dl>
1152 1.1.1.7 christos <dt><span class="samp">version</span><dd>Only print the version. This is the default.
1153 1.1.1.7 christos <br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
1154 1.1.1.7 christos <br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
1155 1.1 christos </dl>
1156 1.1 christos
1157 1.1 christos <div class="node">
1158 1.1 christos <p><hr>
1159 1.1.1.7 christos <a name="ntpq-exit-status"></a>Previous: <a rel="previous" accesskey="p" href="#ntpq-config">ntpq config</a>,
1160 1.1 christos Up: <a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
1161 1.1.1.7 christos <br>
1162 1.1 christos </div>
1163 1.1 christos
1164 1.1 christos <h4 class="subsection">ntpq exit status</h4>
1165 1.1 christos
1166 1.1 christos <p>One of the following exit values will be returned:
1167 1.1 christos <dl>
1168 1.1.1.7 christos <dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
1169 1.1.1.7 christos <br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
1170 1.1.1.7 christos <br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded.
1171 1.1.1.7 christos <br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report
1172 1.1 christos it to autogen-users (a] lists.sourceforge.net. Thank you.
1173 1.1 christos </dl>
1174 1.1 christos
1175 1.1 christos <div class="node">
1176 1.1 christos <p><hr>
1177 1.1.1.7 christos <a name="Usage"></a>Next: <a rel="next" accesskey="n" href="#Internal-Commands">Internal Commands</a>,
1178 1.1 christos Previous: <a rel="previous" accesskey="p" href="#ntpq-Description">ntpq Description</a>,
1179 1.1 christos Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1180 1.1.1.7 christos <br>
1181 1.1 christos </div>
1182 1.1 christos
1183 1.1 christos <!-- node-name, next, previous, up -->
1184 1.1 christos <h3 class="section">Usage</h3>
1185 1.1 christos
1186 1.1 christos <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
1187 1.1 christos <br></th></tr><tr align="left"><td valign="top" width="23%">configuration file
1188 1.1 christos </td><td valign="top" width="23%"><code>/etc/ntp.conf</code>
1189 1.1 christos </td><td valign="top" width="5%"><code>-c</code>
1190 1.1 christos </td><td valign="top" width="15%"><code>conffile</code>
1191 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="23%">frequency file
1192 1.1 christos </td><td valign="top" width="23%">none
1193 1.1 christos </td><td valign="top" width="5%"><code>-f</code>
1194 1.1 christos </td><td valign="top" width="15%"><code>driftfile</code>
1195 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="23%">leapseconds file
1196 1.1 christos </td><td valign="top" width="23%">none
1197 1.1 christos </td><td valign="top" width="5%">
1198 1.1 christos </td><td valign="top" width="15%"><code>leapfile</code>
1199 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="23%">process ID file
1200 1.1 christos </td><td valign="top" width="23%">none
1201 1.1 christos </td><td valign="top" width="5%"><code>-p</code>
1202 1.1 christos </td><td valign="top" width="15%"><code>pidfile</code>
1203 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="23%">log file
1204 1.1 christos </td><td valign="top" width="23%">system log
1205 1.1 christos </td><td valign="top" width="5%"><code>-l</code>
1206 1.1 christos </td><td valign="top" width="15%"><code>logfile</code>
1207 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="23%">include file
1208 1.1 christos </td><td valign="top" width="23%">none
1209 1.1 christos </td><td valign="top" width="5%">none
1210 1.1 christos </td><td valign="top" width="15%"><code>includefile</code>
1211 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="23%">statistics path
1212 1.1 christos </td><td valign="top" width="23%"><code>/var/NTP</code>
1213 1.1 christos </td><td valign="top" width="5%"><code>-s</code>
1214 1.1 christos </td><td valign="top" width="15%"><code>statsdir</code>
1215 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="23%">keys path
1216 1.1 christos </td><td valign="top" width="23%"><code>/usr/local/etc</code>
1217 1.1 christos </td><td valign="top" width="5%"><code>-k</code>
1218 1.1 christos </td><td valign="top" width="15%"><code>keysdir</code>
1219 1.1 christos <br></td></tr></table>
1220 1.1 christos
1221 1.1 christos <div class="node">
1222 1.1 christos <p><hr>
1223 1.1.1.7 christos <a name="Internal-Commands"></a>Next: <a rel="next" accesskey="n" href="#Control-Message-Commands">Control Message Commands</a>,
1224 1.1 christos Previous: <a rel="previous" accesskey="p" href="#Usage">Usage</a>,
1225 1.1 christos Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1226 1.1.1.7 christos <br>
1227 1.1 christos </div>
1228 1.1 christos
1229 1.1 christos <!-- node-name, next, previous, up -->
1230 1.1 christos <h3 class="section">Internal Commands</h3>
1231 1.1 christos
1232 1.1 christos <p>Interactive format commands consist of a keyword followed by zero to four arguments. Only enough characters of the full keyword to uniquely identify the command need be typed. The output of a command is normally sent to the standard output, but optionally the output of individual commands may be sent to a file by appending a <code>></code>, followed by a file name, to the command line. A number of interactive format commands are executed entirely within the <code>ntpq</code> program itself and do not result in NTP mode-6 requests being sent to a server. These are described following.
1233 1.1 christos
1234 1.1 christos <dl>
1235 1.1 christos <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.
1236 1.1 christos
1237 1.1 christos <br><dt><code><a name="addvars"></a> >addvars </code><kbd>name</kbd><code> [ = </code><kbd>value</kbd><code>] [...]</code><dt><code>rmvars </code><kbd>name</kbd><code> [...]</code><dt><code>clearvars</dt></code><dd>The arguments to these commands consist of a list of items of the form
1238 1.1 christos <kbd>name</kbd><code> = </code><kbd>value</kbd>, where the <code>= </code><kbd>value</kbd> is ignored,
1239 1.1 christos and can be omitted in read requests.
1240 1.1 christos <code>ntpq</code> maintains an internal list in which data to be included
1241 1.1 christos in control messages can be assembled, and sent using the <code>readlist</code>
1242 1.1 christos and <code>writelist</code> commands described below.
1243 1.1 christos The <code>addvars</code> command allows variables and optional values
1244 1.1 christos to be added to the list.
1245 1.1 christos If more than one variable is to be added
1246 1.1 christos the list should be comma-separated and not contain white space.
1247 1.1 christos The <code>rmvars</code> command can be used to remove individual variables
1248 1.1 christos from the list,
1249 1.1 christos while the <code>clearlist</code> command removes all variables from the list.
1250 1.1 christos
1251 1.1 christos <br><dt><code><a name="cooked"></a> cooked</code><dd>Display server messages in prettyprint format.
1252 1.1 christos
1253 1.1 christos <br><dt><code><a name="debug"></a> debug more | less | off</code><dd>Turns internal query program debugging on and off.
1254 1.1 christos
1255 1.1 christos <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.
1256 1.1 christos
1257 1.1 christos <br><dt><code><a name="host"></a> host </code><kbd>name</kbd><dd>Set the host to which future queries will be sent.
1258 1.1 christos The name may be either a DNS name or a numeric address.
1259 1.1 christos
1260 1.1 christos <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.
1261 1.1 christos If <code>no</code> is specified, numeric addresses are printed instead.
1262 1.1 christos The default is <code>yes</code>,
1263 1.1 christos unless modified using the command line <code>-n</code> switch.
1264 1.1 christos
1265 1.1 christos <br><dt><code><a name="keyid"></a> keyid </code><kbd>keyid</kbd><dd>This command specifies the key number to be used
1266 1.1 christos to authenticate configuration requests.
1267 1.1 christos This must correspond to a key ID configured in <code>ntp.conf</code> for this purpose.
1268 1.1 christos
1269 1.1 christos <br><dt><code><a name="keytype"></a> keytype</code><dd>Specify the digest algorithm to use for authenticated requests,
1270 1.1 christos with default <code>MD5</code>.
1271 1.1 christos If the OpenSSL library is installed,
1272 1.1 christos digest can be be any message digest algorithm supported by the library.
1273 1.1.1.11 christos The current selections are: <code>AES128CMAC</code>, <code>MD2</code>, <code>MD4</code>, <code>MD5</code>, <code>MDC2</code>, <code>RIPEMD160</code>, <code>SHA</code> and <code>SHA1</code>.
1274 1.1 christos
1275 1.1 christos <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.
1276 1.1 christos Defaults to 2.
1277 1.1 christos Note that mode-6 control messages (and modes, for that matter)
1278 1.1 christos didn't exist in NTP version 1.
1279 1.1 christos
1280 1.1 christos <br><dt><code><a name="passwd"></a> passwd</code><dd>This command prompts for a password to authenticate requests.
1281 1.1 christos The password must correspond to the key ID configured in <code>ntp.conf</code> for this purpose.
1282 1.1 christos
1283 1.1 christos <br><dt><code><a name="quit"></a> quit</code><dd>Exit <code>ntpq</code>.
1284 1.1 christos
1285 1.1 christos <br><dt><code><a name="raw"></a> raw</code><dd>Display server messages as received and without reformatting.
1286 1.1 christos
1287 1.1.1.11.2.1 christos <br><dt><code><a name="timeout"></a> timeout </code><kbd>milliseconds</kbd><dd>Specify a timeout period for responses to server queries.
1288 1.1 christos The default is about 5000 milliseconds.
1289 1.1 christos Note that since <code>ntpq</code> retries each query once after a timeout
1290 1.1 christos the total waiting time for a timeout will be twice the timeout value set.
1291 1.1 christos
1292 1.1 christos </dl>
1293 1.1 christos
1294 1.1 christos <div class="node">
1295 1.1 christos <p><hr>
1296 1.1.1.7 christos <a name="Control-Message-Commands"></a>Next: <a rel="next" accesskey="n" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>,
1297 1.1 christos Previous: <a rel="previous" accesskey="p" href="#Internal-Commands">Internal Commands</a>,
1298 1.1 christos Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1299 1.1.1.7 christos <br>
1300 1.1 christos </div>
1301 1.1 christos
1302 1.1 christos <!-- node-name, next, previous, up -->
1303 1.1 christos <h3 class="section">Control Message Commands</h3>
1304 1.1 christos
1305 1.1 christos <p>Association IDs are used to identify system, peer and clock variables.
1306 1.1 christos System variables are assigned an association ID of zero and system name space,
1307 1.1 christos while each association is assigned a nonzero association ID and peer namespace.
1308 1.1 christos Most control commands send a single mode-6 message to the server
1309 1.1 christos and expect a single response message.
1310 1.1 christos The exceptions are the <code>peers</code> command,
1311 1.1 christos which sends a series of messages,
1312 1.1 christos and the <code>mreadlist</code> and <code>mreadvar</code> commands,
1313 1.1 christos which iterate over a range of associations.
1314 1.1 christos
1315 1.1 christos <p><a name="as"></a>
1316 1.1 christos <dl>
1317 1.1 christos <dt><code>associations</code><dd>Display a list of mobilized associations in the form:
1318 1.1 christos <br>
1319 1.1 christos <code>ind assid status conf reach auth condition last_event cnt</code>
1320 1.1 christos
1321 1.1 christos <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="40%">Description
1322 1.1 christos
1323 1.1 christos <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>ind</code>
1324 1.1 christos </td><td valign="top" width="40%">index on this list
1325 1.1 christos
1326 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>assid</code>
1327 1.1 christos </td><td valign="top" width="40%">association ID
1328 1.1 christos
1329 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
1330 1.1 christos </td><td valign="top" width="40%"><a href="decode.html#peer">peer status word</a>
1331 1.1 christos
1332 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>conf</code>
1333 1.1 christos </td><td valign="top" width="40%"><code>yes</code>: persistent, <code>no</code>: ephemeral
1334 1.1 christos
1335 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
1336 1.1 christos </td><td valign="top" width="40%"><code>yes</code>: reachable, <code>no</code>: unreachable
1337 1.1 christos
1338 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>auth</code>
1339 1.1 christos </td><td valign="top" width="40%"><code>ok</code>, <code>yes</code>, <code>bad</code> and <code>none</code>
1340 1.1 christos
1341 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>condition</code>
1342 1.1 christos </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>)
1343 1.1 christos
1344 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>last_event</code>
1345 1.1 christos </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>)
1346 1.1 christos
1347 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>cnt</code>
1348 1.1 christos event count (see the <code>count</code> field of the <a href="decode.html#peer">peer status word</a>)
1349 1.1 christos
1350 1.1 christos <br></td></tr></table>
1351 1.1 christos
1352 1.1 christos <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.
1353 1.1 christos
1354 1.1.1.7 christos <br><dt><code><a name="_003aconfig"></a> :config [...]</code><dd>Send the remainder of the command line, including whitespace, to the server
1355 1.1 christos as a run-time configuration command in the same format
1356 1.1 christos as the configuration file.
1357 1.1 christos This command is experimental until further notice and clarification.
1358 1.1 christos Authentication is of course required.
1359 1.1 christos
1360 1.1 christos <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
1361 1.1 christos run-time configuration commands in the same format as the configuration file.
1362 1.1 christos This command is experimental until further notice and clarification.
1363 1.1 christos Authentication is required.
1364 1.1 christos
1365 1.1 christos <br><dt><code><a name="ifstats"></a> ifstats</code><dd>Display statistics for each local network address.
1366 1.1 christos Authentication is required.
1367 1.1 christos
1368 1.1 christos <br><dt><code><a name="iostats"></a> iostats</code><dd>Display network and reference clock I/O statistics.
1369 1.1 christos
1370 1.1 christos <br><dt><code><a name="kerninfo"></a> kerninfo</code><dd>Display kernel loop and PPS statistics.
1371 1.1 christos As with other ntpq output, times are in milliseconds.
1372 1.1 christos The precision value displayed is in milliseconds as well,
1373 1.1 christos unlike the precision system variable.
1374 1.1 christos
1375 1.1 christos <br><dt><code><a name="lassoc"></a> lassociations</code><dd>Perform the same function as the associations command,
1376 1.1 christos except display mobilized and unmobilized associations.
1377 1.1 christos
1378 1.1 christos <br><dt><code><a name="monstats"></a> monstats</code><dd>Display monitor facility statistics.
1379 1.1 christos
1380 1.1 christos <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
1381 1.1 christos the monitor facility.
1382 1.1 christos With the exception of <code>sort=</code><kbd>sortorder</kbd>,
1383 1.1 christos the options filter the list returned by <code>ntpd</code>.
1384 1.1 christos The <code>limited</code> and <code>kod</code> options return only entries
1385 1.1 christos representing client addresses from which the last packet received
1386 1.1 christos triggered either discarding or a KoD response.
1387 1.1 christos The <code>mincount=</code><kbd>count</kbd> option filters entries representing
1388 1.1 christos less than <kbd>count</kbd> packets.
1389 1.1 christos The <code>laddr=</code><kbd>localaddr</kbd> option filters entries for packets
1390 1.1 christos received on any local address other than <kbd>localaddr</kbd>.
1391 1.1 christos <code>resany=</code><kbd>hexmask</kbd> and <code>resall=</code><kbd>hexmask</kbd>
1392 1.1 christos filter entries containing none or less than all, respectively,
1393 1.1 christos of the bits in <kbd>hexmask</kbd>, which must begin with <code>0x</code>.
1394 1.1 christos <br>
1395 1.1 christos The <kbd>sortorder</kbd> defaults to <code>lstint</code> and may be any of
1396 1.1 christos <code>addr</code>, <code>count</code>, <code>avgint</code>, <code>lstint</code>, or
1397 1.1 christos any of those preceded by a minus sign (hyphen) to reverse the sort order.
1398 1.1 christos The output columns are:
1399 1.1 christos
1400 1.1 christos <p><table summary=""><tr align="left"><th valign="top" width="10%">Column </th><th valign="top" width="40%">Description
1401 1.1 christos
1402 1.1 christos <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>lstint</code>
1403 1.1 christos </td><td valign="top" width="40%">
1404 1.1 christos Interval in s between the receipt of the most recent packet from this
1405 1.1 christos address and the completion of the retrieval of the MRU list by <code>ntpq</code>
1406 1.1 christos
1407 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>avgint</code>
1408 1.1 christos </td><td valign="top" width="40%">
1409 1.1 christos Average interval in s between packets from this address.
1410 1.1 christos
1411 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rstr</code>
1412 1.1 christos </td><td valign="top" width="40%">
1413 1.1 christos Restriction flags associated with this address.
1414 1.1 christos Most are copied unchanged from the matching <code>restrict</code> command,
1415 1.1 christos however 0x400 (kod) and 0x20 (limited) flags are cleared unless
1416 1.1 christos the last packet from this address triggered a rate control response.
1417 1.1 christos
1418 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>r</code>
1419 1.1 christos </td><td valign="top" width="40%">
1420 1.1 christos Rate control indicator, either a period, <code>L</code> or <code>K</code> for
1421 1.1 christos no rate control response, rate limiting by discarding, or
1422 1.1 christos rate limiting with a KoD response, respectively.
1423 1.1 christos
1424 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>m</code>
1425 1.1 christos </td><td valign="top" width="40%">
1426 1.1 christos Packet mode.
1427 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>v</code>
1428 1.1 christos </td><td valign="top" width="40%">
1429 1.1 christos Packet version number.
1430 1.1 christos
1431 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>count</code>
1432 1.1 christos </td><td valign="top" width="40%">
1433 1.1 christos Packets received from this address.
1434 1.1 christos
1435 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rport</code>
1436 1.1 christos </td><td valign="top" width="40%">
1437 1.1 christos Source port of last packet from this address.
1438 1.1 christos
1439 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>remote address</code>
1440 1.1 christos </td><td valign="top" width="40%">
1441 1.1 christos DNS name, numeric address, or address followed by claimed DNS name which
1442 1.1 christos could not be verified in parentheses.
1443 1.1 christos
1444 1.1 christos <br></td></tr></table>
1445 1.1 christos
1446 1.1 christos <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,
1447 1.1 christos except for a range of association IDs.
1448 1.1 christos This range is determined from the association list cached by
1449 1.1 christos the most recent <code>associations</code> command.
1450 1.1 christos
1451 1.1 christos <br><dt><code><a name="passoc"></a> passociations</code><dd>Perform the same function as the <code>associations command</code>, except that
1452 1.1 christos it uses previously stored data rather than making a new query.
1453 1.1 christos
1454 1.1 christos <br><dt><code><a name="pe"></a> peers</code><dd>Display a list of peers in the form:
1455 1.1 christos <br>
1456 1.1 christos <code>[tally]remote refid st t when pool reach delay offset jitter</code>
1457 1.1 christos
1458 1.1 christos <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1459 1.1 christos <br></th></tr><tr align="left"><td valign="top" width="10%"><code>[tally]</code>
1460 1.1 christos </td><td valign="top" width="20%">
1461 1.1 christos single-character code indicating current value of the <code>select</code> field
1462 1.1 christos of the <a href="decode.html#peer">peer status word</a>.
1463 1.1 christos
1464 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>remote</code>
1465 1.1 christos </td><td valign="top" width="20%">
1466 1.1 christos host name (or IP number) of peer
1467 1.1 christos
1468 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
1469 1.1 christos </td><td valign="top" width="20%">
1470 1.1 christos association ID or <a href="decode.html#kiss">kiss code</a>.
1471 1.1 christos
1472 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>st</code>
1473 1.1 christos </td><td valign="top" width="20%">
1474 1.1 christos stratum
1475 1.1 christos
1476 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>t</code>
1477 1.1 christos </td><td valign="top" width="20%">
1478 1.1 christos <code>u</code>: unicast or manycast client,
1479 1.1 christos <code>b</code>: broadcast or multicast client,
1480 1.1 christos <code>l</code>: local (reference clock),
1481 1.1 christos <code>s</code>: symmetric (peer),
1482 1.1 christos <code>A</code>: manycast server,
1483 1.1 christos <code>B</code>: broadcast server,
1484 1.1 christos <code>M</code>: multicast server.
1485 1.1 christos
1486 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>when</code>
1487 1.1 christos </td><td valign="top" width="20%">
1488 1.1 christos sec/min/hr since last received packet
1489 1.1 christos
1490 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>poll</code>
1491 1.1 christos </td><td valign="top" width="20%">
1492 1.1 christos poll interval (log(2) s)
1493 1.1 christos
1494 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
1495 1.1 christos </td><td valign="top" width="20%">
1496 1.1 christos reach shift register (octal)
1497 1.1 christos
1498 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>delay</code>
1499 1.1 christos </td><td valign="top" width="20%">
1500 1.1 christos roundtrip delay
1501 1.1 christos
1502 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
1503 1.1 christos </td><td valign="top" width="20%">
1504 1.1 christos offset of server relative to this host
1505 1.1 christos
1506 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>jitter</code>
1507 1.1 christos </td><td valign="top" width="20%">
1508 1.1 christos jitter
1509 1.1 christos
1510 1.1 christos <br></td></tr></table>
1511 1.1 christos
1512 1.1 christos <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.
1513 1.1 christos If <kbd>assocID</kbd> is zero,
1514 1.1 christos the variables are from the <a href="#system">system variables</a> name space,
1515 1.1 christos otherwise they are from the <a href="#peer">peer variables</a> name space.
1516 1.1 christos The <kbd>assocID</kbd> is required, as the same name can occur in both spaces.
1517 1.1 christos If no <kbd>name</kbd> is included,
1518 1.1 christos all operative variables in the name space are displayed.
1519 1.1 christos In this case only, if the <kbd>assocID</kbd> is omitted, it is assumed zero.
1520 1.1 christos Multiple names are specified with comma separators and without whitespace.
1521 1.1 christos Note that time values are represented in milliseconds and
1522 1.1 christos frequency values in parts-per-million (PPM).
1523 1.1 christos Some NTP timestamps are represented in the format YYYYMMDDTTTT,
1524 1.1 christos where YYYY is the year, MM the month of year, DD the day of month and
1525 1.1 christos TTTT the time of day.
1526 1.1 christos
1527 1.1 christos <br><dt><code><a name="saveconfig"></a> saveconfig </code><kbd>filename</kbd><dd>Write the current configuration, including any runtime modifications
1528 1.1 christos given with <code>:config</code> or <code>config-from-file</code>,
1529 1.1 christos to the ntpd host's file <kbd>filename</kbd>.
1530 1.1 christos This command will be rejected by the server unless
1531 1.1 christos <a href="miscopt.html#saveconfigdir">saveconfigdir</a>
1532 1.1 christos appears in the <code>ntpd</code> configuration file.
1533 1.1 christos <kbd>filename</kbd> can use <code>strftime()</code> format specifiers
1534 1.1 christos to substitute the current date and time, for example,
1535 1.1 christos <code>saveconfig ntp-%Y%m%d-%H%M%S.conf</code>.
1536 1.1 christos The filename used is stored in system variable <code>savedconfig</code>.
1537 1.1 christos Authentication is required.
1538 1.1 christos
1539 1.1 christos <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.
1540 1.1 christos If the <kbd>assocID</kbd> is zero, the variables are from the
1541 1.1 christos <a href="#system">system variables</a> name space, otherwise they are from the
1542 1.1 christos <a href="#peer">peer variables</a> name space.
1543 1.1 christos The <kbd>assocID</kbd> is required,
1544 1.1 christos as the same name can occur in both spaces.
1545 1.1 christos
1546 1.1 christos <br><dt><code><a name="sysinfo"></a> sysinfo</code><dd>Display operational summary.
1547 1.1 christos
1548 1.1 christos <br><dt><code><a name="sysstats"></a> sysstats</code><dd>Print statistics counters maintained in the protocol module.
1549 1.1 christos
1550 1.1 christos </dl>
1551 1.1 christos
1552 1.1 christos <div class="node">
1553 1.1 christos <p><hr>
1554 1.1.1.7 christos <a name="Status-Words-and-Kiss-Codes"></a>Next: <a rel="next" accesskey="n" href="#System-Variables">System Variables</a>,
1555 1.1 christos Previous: <a rel="previous" accesskey="p" href="#Control-Message-Commands">Control Message Commands</a>,
1556 1.1 christos Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1557 1.1.1.7 christos <br>
1558 1.1 christos </div>
1559 1.1 christos
1560 1.1 christos <!-- node-name, next, previous, up -->
1561 1.1 christos <h3 class="section">Status Words and Kiss Codes</h3>
1562 1.1 christos
1563 1.1 christos <p>The current state of the operating program is shown
1564 1.1 christos in a set of status words maintained by the system
1565 1.1 christos and each association separately.
1566 1.1 christos These words are displayed in the <code>rv</code> and <code>as</code> commands
1567 1.1 christos both in hexadecimal and decoded short tip strings.
1568 1.1 christos The codes, tips and short explanations are on the
1569 1.1 christos <a href="decode.html">Event Messages and Status Words</a> page.
1570 1.1 christos The page also includes a list of system and peer messages,
1571 1.1 christos the code for the latest of which is included in the status word.
1572 1.1 christos
1573 1.1 christos <p>Information resulting from protocol machine state transitions
1574 1.1 christos is displayed using an informal set of ASCII strings called
1575 1.1 christos <a href="decode.html#kiss">kiss codes</a>.
1576 1.1 christos The original purpose was for kiss-o'-death (KoD) packets sent
1577 1.1 christos by the server to advise the client of an unusual condition.
1578 1.1 christos They are now displayed, when appropriate,
1579 1.1 christos in the reference identifier field in various billboards.
1580 1.1 christos
1581 1.1 christos <div class="node">
1582 1.1 christos <p><hr>
1583 1.1.1.7 christos <a name="System-Variables"></a>Next: <a rel="next" accesskey="n" href="#Peer-Variables">Peer Variables</a>,
1584 1.1 christos Previous: <a rel="previous" accesskey="p" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>,
1585 1.1 christos Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1586 1.1.1.7 christos <br>
1587 1.1 christos </div>
1588 1.1 christos
1589 1.1 christos <!-- node-name, next, previous, up -->
1590 1.1 christos <h3 class="section">System Variables</h3>
1591 1.1 christos
1592 1.1 christos <p>The following system variables appear in the <code>rv</code> billboard.
1593 1.1 christos Not all variables are displayed in some configurations.
1594 1.1 christos
1595 1.1 christos <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1596 1.1 christos
1597 1.1 christos <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
1598 1.1 christos </td><td valign="top" width="20%">
1599 1.1 christos <a href="decode.html#sys">system status word</a>
1600 1.1 christos
1601 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>version</code>
1602 1.1 christos </td><td valign="top" width="20%">
1603 1.1 christos NTP software version and build time
1604 1.1 christos
1605 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>processor</code>
1606 1.1 christos </td><td valign="top" width="20%">
1607 1.1 christos hardware platform and version
1608 1.1 christos
1609 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>system</code>
1610 1.1 christos </td><td valign="top" width="20%">
1611 1.1 christos operating system and version
1612 1.1 christos
1613 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leap</code>
1614 1.1 christos </td><td valign="top" width="20%">
1615 1.1 christos leap warning indicator (0-3)
1616 1.1 christos
1617 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
1618 1.1 christos </td><td valign="top" width="20%">
1619 1.1 christos stratum (1-15)
1620 1.1 christos
1621 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>precision</code>
1622 1.1 christos </td><td valign="top" width="20%">
1623 1.1 christos precision (log(2) s)
1624 1.1 christos
1625 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdelay</code>
1626 1.1 christos </td><td valign="top" width="20%">
1627 1.1 christos total roundtrip delay to the primary reference clock
1628 1.1 christos
1629 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdisp</code>
1630 1.1 christos </td><td valign="top" width="20%">
1631 1.1 christos total dispersion to the primary reference clock
1632 1.1 christos
1633 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>peer</code>
1634 1.1 christos </td><td valign="top" width="20%">
1635 1.1 christos system peer association ID
1636 1.1 christos
1637 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>tc</code>
1638 1.1 christos time constant and poll exponent (log(2) s) (3-17)
1639 1.1 christos
1640 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>mintc</code>
1641 1.1 christos minimum time constant (log(2) s) (3-10)
1642 1.1 christos
1643 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clock</code>
1644 1.1 christos </td><td valign="top" width="20%">
1645 1.1 christos date and time of day
1646 1.1 christos
1647 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
1648 1.1 christos reference ID or <a href="decode.html#kiss">kiss code</a>
1649 1.1 christos
1650 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reftime</code>
1651 1.1 christos </td><td valign="top" width="20%">
1652 1.1 christos reference time
1653 1.1 christos
1654 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
1655 1.1 christos </td><td valign="top" width="20%">
1656 1.1 christos combined offset of server relative to this host
1657 1.1 christos
1658 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>sys_jitter</code>
1659 1.1 christos </td><td valign="top" width="20%">
1660 1.1 christos combined system jitter
1661 1.1 christos
1662 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>frequency</code>
1663 1.1 christos </td><td valign="top" width="20%">
1664 1.1 christos frequency offset (PPM) relative to hardware clock
1665 1.1 christos
1666 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clk_wander</code>
1667 1.1 christos </td><td valign="top" width="20%">
1668 1.1 christos clock frequency wander (PPM)
1669 1.1 christos
1670 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clk_jitter</code>
1671 1.1 christos </td><td valign="top" width="20%">
1672 1.1 christos clock jitter
1673 1.1 christos
1674 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>tai</code>
1675 1.1 christos </td><td valign="top" width="20%">
1676 1.1 christos TAI-UTC offset (s)
1677 1.1 christos
1678 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leapsec</code>
1679 1.1 christos </td><td valign="top" width="20%">
1680 1.1 christos NTP seconds when the next leap second is/was inserted
1681 1.1 christos
1682 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>expire</code>
1683 1.1 christos </td><td valign="top" width="20%">
1684 1.1 christos NTP seconds when the NIST leapseconds file expires
1685 1.1 christos
1686 1.1 christos <br></td></tr></table>
1687 1.1 christos
1688 1.1 christos <p>The jitter and wander statistics are exponentially-weighted RMS averages.
1689 1.1 christos The system jitter is defined in the NTPv4 specification;
1690 1.1 christos the clock jitter statistic is computed by the clock discipline module.
1691 1.1 christos
1692 1.1 christos <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
1693 1.1 christos additional system variables are displayed, including some or all of the
1694 1.1 christos following, depending on the particular Autokey dance:
1695 1.1 christos
1696 1.1 christos <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1697 1.1 christos
1698 1.1 christos <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>host</code>
1699 1.1 christos </td><td valign="top" width="20%">
1700 1.1 christos Autokey host name for this host
1701 1.1 christos
1702 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>ident</code>
1703 1.1 christos </td><td valign="top" width="20%">
1704 1.1 christos Autokey group name for this host
1705 1.1 christos
1706 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
1707 1.1 christos </td><td valign="top" width="20%">
1708 1.1 christos host flags (see Autokey specification)
1709 1.1 christos
1710 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>digest</code>
1711 1.1 christos </td><td valign="top" width="20%">
1712 1.1 christos OpenSSL message digest algorithm
1713 1.1 christos
1714 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>signature</code>
1715 1.1 christos </td><td valign="top" width="20%">
1716 1.1 christos OpenSSL digest/signature scheme
1717 1.1 christos
1718 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>update</code>
1719 1.1 christos </td><td valign="top" width="20%">
1720 1.1 christos NTP seconds at last signature update
1721 1.1 christos
1722 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>cert</code>
1723 1.1 christos </td><td valign="top" width="20%">
1724 1.1 christos certificate subject, issuer and certificate flags
1725 1.1 christos
1726 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>until</code>
1727 1.1 christos </td><td valign="top" width="20%">
1728 1.1 christos NTP seconds when the certificate expires
1729 1.1 christos
1730 1.1 christos <br></td></tr></table>
1731 1.1 christos
1732 1.1 christos <div class="node">
1733 1.1 christos <p><hr>
1734 1.1.1.7 christos <a name="Peer-Variables"></a>Next: <a rel="next" accesskey="n" href="#Clock-Variables">Clock Variables</a>,
1735 1.1 christos Previous: <a rel="previous" accesskey="p" href="#System-Variables">System Variables</a>,
1736 1.1 christos Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1737 1.1.1.7 christos <br>
1738 1.1 christos </div>
1739 1.1 christos
1740 1.1 christos <!-- node-name, next, previous, up -->
1741 1.1 christos <h3 class="section">Peer Variables</h3>
1742 1.1 christos
1743 1.1 christos <p>The following peer variables appear in the <code>rv</code> billboard
1744 1.1 christos for each association.
1745 1.1 christos Not all variables are displayed in some configurations.
1746 1.1 christos
1747 1.1 christos <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1748 1.1 christos
1749 1.1 christos <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>associd</code>
1750 1.1 christos </td><td valign="top" width="20%">
1751 1.1 christos association ID
1752 1.1 christos
1753 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
1754 1.1 christos </td><td valign="top" width="20%">
1755 1.1 christos <a href="decode.html#peer">peer status word</a>
1756 1.1 christos
1757 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>srcadr</code>
1758 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>srcport</code>
1759 1.1 christos </td><td valign="top" width="20%">
1760 1.1 christos source (remote) IP address and port
1761 1.1 christos
1762 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>dstadr</code>
1763 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>dstport</code>
1764 1.1 christos </td><td valign="top" width="20%">
1765 1.1 christos destination (local) IP address and port
1766 1.1 christos
1767 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leap</code>
1768 1.1 christos </td><td valign="top" width="20%">
1769 1.1 christos leap indicator (0-3)
1770 1.1 christos
1771 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
1772 1.1 christos </td><td valign="top" width="20%">
1773 1.1 christos stratum (0-15)
1774 1.1 christos
1775 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>precision</code>
1776 1.1 christos </td><td valign="top" width="20%">
1777 1.1 christos precision (log(2) s)
1778 1.1 christos
1779 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdelay</code>
1780 1.1 christos </td><td valign="top" width="20%">
1781 1.1 christos total roundtrip delay to the primary reference clock
1782 1.1 christos
1783 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdisp</code>
1784 1.1 christos </td><td valign="top" width="20%">total root dispersion to the primary reference clock
1785 1.1 christos
1786 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
1787 1.1 christos </td><td valign="top" width="20%">
1788 1.1 christos reference ID or <a href="decode.html#kiss">kiss code</a>
1789 1.1 christos
1790 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reftime</code>
1791 1.1 christos </td><td valign="top" width="20%">
1792 1.1 christos reference time
1793 1.1 christos
1794 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
1795 1.1 christos </td><td valign="top" width="20%">
1796 1.1 christos reach register (octal)
1797 1.1 christos
1798 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>unreach</code>
1799 1.1 christos </td><td valign="top" width="20%">
1800 1.1 christos unreach counter
1801 1.1 christos
1802 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>hmode</code>
1803 1.1 christos </td><td valign="top" width="20%">
1804 1.1 christos host mode (1-6)
1805 1.1 christos
1806 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>pmode</code>
1807 1.1 christos </td><td valign="top" width="20%">
1808 1.1 christos peer mode (1-5)
1809 1.1 christos
1810 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>hpoll</code>
1811 1.1 christos </td><td valign="top" width="20%">
1812 1.1 christos host poll exponent (log(2) s) (3-17)
1813 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>ppoll</code>
1814 1.1 christos </td><td valign="top" width="20%">
1815 1.1 christos peer poll exponent (log(2) s) (3-17)
1816 1.1 christos
1817 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>headway</code>
1818 1.1 christos </td><td valign="top" width="20%">
1819 1.1 christos headway (see <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a>)
1820 1.1 christos
1821 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flash</code>
1822 1.1 christos </td><td valign="top" width="20%">
1823 1.1 christos <a href="decode.html#flash">flash status word</a>
1824 1.1 christos
1825 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
1826 1.1 christos </td><td valign="top" width="20%">
1827 1.1 christos filter offset
1828 1.1 christos
1829 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>delay</code>
1830 1.1 christos </td><td valign="top" width="20%">
1831 1.1 christos filter delay
1832 1.1 christos
1833 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>dispersion</code>
1834 1.1 christos </td><td valign="top" width="20%">
1835 1.1 christos filter dispersion
1836 1.1 christos
1837 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>jitter</code>
1838 1.1 christos </td><td valign="top" width="20%">
1839 1.1 christos filter jitter
1840 1.1 christos
1841 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>ident</code>
1842 1.1 christos </td><td valign="top" width="20%">
1843 1.1 christos Autokey group name for this association
1844 1.1 christos
1845 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>bias</code>
1846 1.1 christos </td><td valign="top" width="20%">
1847 1.1 christos unicast/broadcast bias
1848 1.1 christos
1849 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>xleave</code>
1850 1.1 christos </td><td valign="top" width="20%">
1851 1.1 christos interleave delay (see <a href="xleave.html">NTP Interleaved Modes</a>)
1852 1.1 christos
1853 1.1 christos <br></td></tr></table>
1854 1.1 christos
1855 1.1 christos <p>The bias variable is calculated when the first broadcast packet is received
1856 1.1 christos after the calibration volley. It represents the offset of the broadcast
1857 1.1 christos subgraph relative to the unicast subgraph. The xleave variable appears
1858 1.1 christos only the interleaved symmetric and interleaved modes. It represents
1859 1.1 christos the internal queuing, buffering and transmission delays for the preceding
1860 1.1 christos packet.
1861 1.1 christos
1862 1.1 christos <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
1863 1.1 christos additional peer variables are displayed, including the following:
1864 1.1 christos
1865 1.1 christos <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1866 1.1 christos
1867 1.1 christos <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
1868 1.1 christos </td><td valign="top" width="20%">
1869 1.1 christos peer flags (see Autokey specification)
1870 1.1 christos
1871 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>host</code>
1872 1.1 christos </td><td valign="top" width="20%">
1873 1.1 christos Autokey server name
1874 1.1 christos
1875 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
1876 1.1 christos </td><td valign="top" width="20%">
1877 1.1 christos peer flags (see Autokey specification)
1878 1.1 christos
1879 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>signature</code>
1880 1.1 christos </td><td valign="top" width="20%">
1881 1.1 christos OpenSSL digest/signature scheme
1882 1.1 christos
1883 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>initsequence</code>
1884 1.1 christos </td><td valign="top" width="20%">
1885 1.1 christos initial key ID
1886 1.1 christos
1887 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>initkey</code>
1888 1.1 christos </td><td valign="top" width="20%">
1889 1.1 christos initial key index
1890 1.1 christos
1891 1.1 christos <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>timestamp</code>
1892 1.1 christos </td><td valign="top" width="20%">
1893 1.1 christos Autokey signature timestamp
1894 1.1 christos
1895 1.1 christos <br></td></tr></table>
1896 1.1 christos
1897 1.1 christos <div class="node">
1898 1.1 christos <p><hr>
1899 1.1.1.7 christos <a name="Clock-Variables"></a>Previous: <a rel="previous" accesskey="p" href="#Peer-Variables">Peer Variables</a>,
1900 1.1 christos Up: <a rel="up" accesskey="u" href="#Top">Top</a>
1901 1.1.1.7 christos <br>
1902 1.1 christos </div>
1903 1.1 christos
1904 1.1 christos <!-- node-name, next, previous, up -->
1905 1.1 christos <h3 class="section">Clock Variables</h3>
1906 1.1 christos
1907 1.1 christos <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.
1908 1.1 christos
1909 1.1 christos <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
1910 1.1 christos <br></th></tr><tr align="left"><td valign="top" width="10%"><code>associd</code>
1911 1.1 christos </td><td valign="top" width="20%">association ID
1912 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
1913 1.1 christos </td><td valign="top" width="20%"><a href="decode.html#clock">clock status word</a>
1914 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>device</code>
1915 1.1 christos </td><td valign="top" width="20%">device description
1916 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>timecode</code>
1917 1.1 christos </td><td valign="top" width="20%">ASCII time code string (specific to device)
1918 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>poll</code>
1919 1.1 christos </td><td valign="top" width="20%">poll messages sent
1920 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>noreply</code>
1921 1.1 christos </td><td valign="top" width="20%">no reply
1922 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>badformat</code>
1923 1.1 christos </td><td valign="top" width="20%">bad format
1924 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>baddata</code>
1925 1.1 christos </td><td valign="top" width="20%">bad date or time
1926 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>fudgetime1</code>
1927 1.1 christos </td><td valign="top" width="20%">fudge time 1
1928 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>fudgetime2</code>
1929 1.1 christos </td><td valign="top" width="20%">fudge time 2
1930 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
1931 1.1 christos </td><td valign="top" width="20%">driver stratum
1932 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
1933 1.1 christos </td><td valign="top" width="20%">driver reference ID
1934 1.1 christos <br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
1935 1.1 christos </td><td valign="top" width="20%">driver flags
1936 1.1 christos <br></td></tr></table>
1937 1.1 christos
1938 1.1 christos </body></html>
1939 1.1 christos
1940