aboutsummaryrefslogtreecommitdiff
path: root/ntpdc/ntpdc.html
blob: c9be00b309751b47b27b487f68211706542efbbb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ntpdc: NTPD Control User&rsquo;s Manual</title>

<meta name="description" content="ntpdc: NTPD Control User&rsquo;s Manual">
<meta name="keywords" content="ntpdc: NTPD Control User&rsquo;s Manual">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="#Top" rel="start" title="Top">
<link href="dir.html#Top" rel="up" title="(dir)">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<h1 class="settitle" align="center">ntpdc: NTPD Control User&rsquo;s Manual</h1>





<span id="Top"></span><div class="header">
<p>
Next: <a href="#ntpdc-Description" accesskey="n" rel="next">ntpdc Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
<span id="ntpdc_003a-NTPD-Control-User-Manual"></span><h1 class="top">ntpdc: NTPD Control User Manual</h1>

<p>This document describes the use of the NTP Project&rsquo;s <code>ntpdc</code> program,
that can be used to query a Network Time Protocol (NTP) server and
display the time offset of the system clock relative to the server
clock.  Run as root, it can correct the system clock to this offset as
well.  It can be run as an interactive command or from a cron job.
</p>
<p>This document applies to version 4.2.8p18 of <code>ntpdc</code>.
</p>
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
</p>
<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>

<div class="shortcontents">
<ul class="no-bullet">
<li><a id="stoc-Description" href="#toc-Description">1 Description</a></li>
</ul>
</div>


<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Description" accesskey="1">ntpdc Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Invocation" accesskey="2">ntpdc Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpdc
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
</table>

<hr>
<span id="ntpdc-Description"></span><div class="header">
<p>
Next: <a href="#ntpdc-Invocation" accesskey="n" rel="next">ntpdc Invocation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
<span id="Description"></span><h2 class="chapter">1 Description</h2>

<p>By default, <code>ntpdc</code> writes the local data and time (i.e., not UTC) to the
standard output in the format:
</p>
<div class="example">
<pre class="example">1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
</pre></div>

<p>where
YYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
(+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
and
the +4.567 +/- 0.089 secs indicates the time offset and
error bound of the system clock relative to the server clock.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Invocation" accesskey="1">Invoking ntpdc</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr>
<span id="ntpdc-Invocation"></span><div class="header">
<p>
Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#ntpdc-Description" accesskey="p" rel="prev">ntpdc Description</a>, Up: <a href="#ntpdc-Description" accesskey="u" rel="up">ntpdc Description</a> &nbsp; </p>
</div>
<span id="Invoking-ntpdc"></span><h3 class="section">1.1 Invoking ntpdc</h3>
<span id="index-ntpdc"></span>
<span id="index-vendor_002dspecific-NTPD-control-program"></span>



<p><code>ntpdc</code>
is deprecated.
Please use
<code>ntpq(1ntpqmdoc)</code> instead - it can do everything
<code>ntpdc</code>
used to do, and it does so using a much more sane interface.
</p>
<p><code>ntpdc</code>
is a utility program used to query
<code>ntpd(1ntpdmdoc)</code>
about its
current state and to request changes in that state.
It uses NTP mode 7 control message formats described in the source code.
The program may
be run either in interactive mode or controlled using command line
arguments.
Extensive state and statistics information is available
through the
<code>ntpdc</code>
interface.
In addition, nearly all the
configuration options which can be specified at startup using
ntpd&rsquo;s configuration file may also be specified at run time using
<code>ntpdc</code>
</p>
<p>This section was generated by <strong>AutoGen</strong>,
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpdc</code> program.
This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-usage" accesskey="1">ntpdc usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpdc help/usage (<samp>--help</samp>)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-ipv4" accesskey="2">ntpdc ipv4</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-ipv6" accesskey="3">ntpdc ipv6</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-command" accesskey="4">ntpdc command</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">command option (-c)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-interactive" accesskey="5">ntpdc interactive</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">interactive option (-i)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-listpeers" accesskey="6">ntpdc listpeers</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">listpeers option (-l)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-numeric" accesskey="7">ntpdc numeric</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">numeric option (-n)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-peers" accesskey="8">ntpdc peers</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">peers option (-p)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-showpeers" accesskey="9">ntpdc showpeers</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">showpeers option (-s)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-unconnected">ntpdc unconnected</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">unconnected option (-u)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-config">ntpdc config</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntpdc
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-exit-status">ntpdc exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Usage">ntpdc Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-See-Also">ntpdc See Also</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Authors">ntpdc Authors</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authors
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Bugs">ntpdc Bugs</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
</td></tr>
</table>

<hr>
<span id="ntpdc-usage"></span><div class="header">
<p>
Next: <a href="#ntpdc-ipv4" accesskey="n" rel="next">ntpdc ipv4</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="ntpdc-help_002fusage-_0028_002d_002dhelp_0029"></span><h4 class="subsection">1.1.1 ntpdc help/usage (<samp>--help</samp>)</h4>
<span id="index-ntpdc-help"></span>

<p>This is the automatically generated usage text for ntpdc.
</p>
<p>The text printed is the same whether selected with the <code>help</code> option
(<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>).  <code>more-help</code> will print
the usage text by passing it through a pager program.
<code>more-help</code> is disabled on platforms without a working
<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
used to select the program, defaulting to <samp>more</samp>.  Both will exit
with a status code of 0.
</p>
<div class="example">
<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p18
Usage:  ntpdc [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
  Flg Arg Option-Name    Description
   -4 no  ipv4           Force IPv4 DNS name resolution
                                - prohibits the option 'ipv6'
   -6 no  ipv6           Force IPv6 DNS name resolution
                                - prohibits the option 'ipv4'
   -c Str command        run a command and exit
                                - may appear multiple times
   -d no  debug-level    Increase debug verbosity level
                                - may appear multiple times
   -D Num set-debug-level Set the debug verbosity level
                                - may appear multiple times
   -i no  interactive    Force ntpq to operate in interactive mode
                                - prohibits these options:
                                command
                                listpeers
                                peers
                                showpeers
   -l no  listpeers      Print a list of the peers
                                - prohibits the option 'command'
   -n no  numeric        numeric host addresses
   -p no  peers          Print a list of the peers
                                - prohibits the option 'command'
   -s no  showpeers      Show a list of the peers
                                - prohibits the option 'command'
   -u no  unconnected    Use unconnected UDP to communicate with ntpd (default on Windows)
      opt version        output version information and exit
   -? no  help           display extended usage information and exit
   -! no  more-help      extended usage information passed thru pager
   -&gt; opt save-opts      save the option state to a config file
   -&lt; Str load-opts      load options from a config file
                                - disabled as '--no-load-opts'
                                - may appear multiple times

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


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

Please send bug reports to:  &lt;https://bugs.ntp.org, bugs@ntp.org&gt;
</pre></div>

<hr>
<span id="ntpdc-ipv4"></span><div class="header">
<p>
Next: <a href="#ntpdc-ipv6" accesskey="n" rel="next">ntpdc ipv6</a>, Previous: <a href="#ntpdc-usage" accesskey="p" rel="prev">ntpdc usage</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="ipv4-option-_0028_002d4_0029"></span><h4 class="subsection">1.1.2 ipv4 option (-4)</h4>
<span id="index-ntpdc_002dipv4"></span>

<p>This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
</p>
<p>This option has some usage constraints.  It:
</p><ul>
<li> must not appear in combination with any of the following options:
ipv6.
</li></ul>

<p>Force DNS resolution of following host names on the command line
to the IPv4 namespace.
</p><hr>
<span id="ntpdc-ipv6"></span><div class="header">
<p>
Next: <a href="#ntpdc-command" accesskey="n" rel="next">ntpdc command</a>, Previous: <a href="#ntpdc-ipv4" accesskey="p" rel="prev">ntpdc ipv4</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="ipv6-option-_0028_002d6_0029"></span><h4 class="subsection">1.1.3 ipv6 option (-6)</h4>
<span id="index-ntpdc_002dipv6"></span>

<p>This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
</p>
<p>This option has some usage constraints.  It:
</p><ul>
<li> must not appear in combination with any of the following options:
ipv4.
</li></ul>

<p>Force DNS resolution of following host names on the command line
to the IPv6 namespace.
</p><hr>
<span id="ntpdc-command"></span><div class="header">
<p>
Next: <a href="#ntpdc-interactive" accesskey="n" rel="next">ntpdc interactive</a>, Previous: <a href="#ntpdc-ipv6" accesskey="p" rel="prev">ntpdc ipv6</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="command-option-_0028_002dc_0029"></span><h4 class="subsection">1.1.4 command option (-c)</h4>
<span id="index-ntpdc_002dcommand"></span>

<p>This is the &ldquo;run a command and exit&rdquo; option.
This option takes a string argument <samp>cmd</samp>.
</p>
<p>This option has some usage constraints.  It:
</p><ul>
<li> may appear an unlimited number of times.
</li></ul>

<p>The following argument is interpreted as an interactive format command
and is added to the list of commands to be executed on the specified
host(s).
</p><hr>
<span id="ntpdc-interactive"></span><div class="header">
<p>
Next: <a href="#ntpdc-listpeers" accesskey="n" rel="next">ntpdc listpeers</a>, Previous: <a href="#ntpdc-command" accesskey="p" rel="prev">ntpdc command</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="interactive-option-_0028_002di_0029"></span><h4 class="subsection">1.1.5 interactive option (-i)</h4>
<span id="index-ntpdc_002dinteractive"></span>

<p>This is the &ldquo;force ntpq to operate in interactive mode&rdquo; option.
</p>
<p>This option has some usage constraints.  It:
</p><ul>
<li> must not appear in combination with any of the following options:
command, listpeers, peers, showpeers.
</li></ul>

<p>Force ntpq to operate in interactive mode.  Prompts will be written
to the standard output and commands read from the standard input.
</p><hr>
<span id="ntpdc-listpeers"></span><div class="header">
<p>
Next: <a href="#ntpdc-numeric" accesskey="n" rel="next">ntpdc numeric</a>, Previous: <a href="#ntpdc-interactive" accesskey="p" rel="prev">ntpdc interactive</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="listpeers-option-_0028_002dl_0029"></span><h4 class="subsection">1.1.6 listpeers option (-l)</h4>
<span id="index-ntpdc_002dlistpeers"></span>

<p>This is the &ldquo;print a list of the peers&rdquo; option.
</p>
<p>This option has some usage constraints.  It:
</p><ul>
<li> must not appear in combination with any of the following options:
command.
</li></ul>

<p>Print a list of the peers known to the server as well as a summary of
their state. This is equivalent to the &rsquo;listpeers&rsquo; interactive command.
</p><hr>
<span id="ntpdc-numeric"></span><div class="header">
<p>
Next: <a href="#ntpdc-peers" accesskey="n" rel="next">ntpdc peers</a>, Previous: <a href="#ntpdc-listpeers" accesskey="p" rel="prev">ntpdc listpeers</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="numeric-option-_0028_002dn_0029"></span><h4 class="subsection">1.1.7 numeric option (-n)</h4>
<span id="index-ntpdc_002dnumeric"></span>

<p>This is the &ldquo;numeric host addresses&rdquo; option.
Output all host addresses in dotted-quad numeric format rather than
converting to the canonical host names. 
</p><hr>
<span id="ntpdc-peers"></span><div class="header">
<p>
Next: <a href="#ntpdc-showpeers" accesskey="n" rel="next">ntpdc showpeers</a>, Previous: <a href="#ntpdc-numeric" accesskey="p" rel="prev">ntpdc numeric</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="peers-option-_0028_002dp_0029"></span><h4 class="subsection">1.1.8 peers option (-p)</h4>
<span id="index-ntpdc_002dpeers"></span>

<p>This is the &ldquo;print a list of the peers&rdquo; option.
</p>
<p>This option has some usage constraints.  It:
</p><ul>
<li> must not appear in combination with any of the following options:
command.
</li></ul>

<p>Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the &rsquo;peers&rsquo; interactive command.
</p><hr>
<span id="ntpdc-showpeers"></span><div class="header">
<p>
Next: <a href="#ntpdc-unconnected" accesskey="n" rel="next">ntpdc unconnected</a>, Previous: <a href="#ntpdc-peers" accesskey="p" rel="prev">ntpdc peers</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="showpeers-option-_0028_002ds_0029"></span><h4 class="subsection">1.1.9 showpeers option (-s)</h4>
<span id="index-ntpdc_002dshowpeers"></span>

<p>This is the &ldquo;show a list of the peers&rdquo; option.
</p>
<p>This option has some usage constraints.  It:
</p><ul>
<li> must not appear in combination with any of the following options:
command.
</li></ul>

<p>Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the &rsquo;dmpeers&rsquo; interactive command.
</p><hr>
<span id="ntpdc-unconnected"></span><div class="header">
<p>
Next: <a href="#ntpdc-config" accesskey="n" rel="next">ntpdc config</a>, Previous: <a href="#ntpdc-showpeers" accesskey="p" rel="prev">ntpdc showpeers</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="unconnected-option-_0028_002du_0029"></span><h4 class="subsection">1.1.10 unconnected option (-u)</h4>
<span id="index-ntpdc_002dunconnected"></span>

<p>This is the &ldquo;use unconnected udp to communicate with ntpd (default on windows)&rdquo; option.
Open an unconnected UDP association to ntpd (the default
on Windows).
</p>

<hr>
<span id="ntpdc-config"></span><div class="header">
<p>
Next: <a href="#ntpdc-exit-status" accesskey="n" rel="next">ntpdc exit status</a>, Previous: <a href="#ntpdc-unconnected" accesskey="p" rel="prev">ntpdc unconnected</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="presetting_002fconfiguring-ntpdc"></span><h4 class="subsection">1.1.11 presetting/configuring ntpdc</h4>

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

<p><code>libopts</code> will search in 2 places for configuration files:
</p><ul>
<li> $HOME
</li><li> $PWD
</li></ul>
<p>The environment variables <code>HOME</code>, and <code>PWD</code>
are expanded and replaced when <samp>ntpdc</samp> runs.
For any of these that are plain files, they are simply processed.
For any that are directories, then a file named <samp>.ntprc</samp> is searched for
within that directory and processed.
</p>
<p>Configuration files may be in a wide variety of formats.
The basic format is an option name followed by a value (argument) on the
same line.  Values may be separated from the option name with a colon,
equal sign or simply white space.  Values may be continued across multiple
lines by escaping the newline with a backslash.
</p>
<p>Multiple programs may also share the same initialization file.
Common options are collected at the top, followed by program specific
segments.  The segments are separated by lines like:
</p><div class="example">
<pre class="example">[NTPDC]
</pre></div>
<p>or by
</p><div class="example">
<pre class="example">&lt;?program ntpdc&gt;
</pre></div>
<p>Do not mix these styles within one configuration file.
</p>
<p>Compound values and carefully constructed string values may also be
specified using XML syntax:
</p><div class="example">
<pre class="example">&lt;option-name&gt;
   &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
&lt;/option-name&gt;
</pre></div>
<p>yielding an <code>option-name.sub-opt</code> string value of
</p><div class="example">
<pre class="example">&quot;...&lt;...&gt;...&quot;
</pre></div>
<p><code>AutoOpts</code> does not track suboptions.  You simply note that it is a
hierarchicly valued option.  <code>AutoOpts</code> does provide a means for searching
the associated name/value pair list (see: optionFindValue).
</p>
<p>The command line options relating to configuration and/or usage help are:
</p>
<span id="version-_0028_002d_0029"></span><h4 class="subsubheading">version (-)</h4>

<p>Print the program version to standard out, optionally with licensing
information, then exit 0.  The optional argument specifies how much licensing
detail to provide.  The default is to print just the version.  The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:
</p>
<dl compact="compact">
<dt>&lsquo;<samp>version</samp>&rsquo;</dt>
<dd><p>Only print the version.  This is the default.
</p></dd>
<dt>&lsquo;<samp>copyright</samp>&rsquo;</dt>
<dd><p>Name the copyright usage licensing terms.
</p></dd>
<dt>&lsquo;<samp>verbose</samp>&rsquo;</dt>
<dd><p>Print the full copyright usage licensing terms.
</p></dd>
</dl>

<hr>
<span id="ntpdc-exit-status"></span><div class="header">
<p>
Next: <a href="#ntpdc-Usage" accesskey="n" rel="next">ntpdc Usage</a>, Previous: <a href="#ntpdc-config" accesskey="p" rel="prev">ntpdc config</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="ntpdc-exit-status-1"></span><h4 class="subsection">1.1.12 ntpdc exit status</h4>

<p>One of the following exit values will be returned:
</p><dl compact="compact">
<dt>&lsquo;<samp>0 (EXIT_SUCCESS)</samp>&rsquo;</dt>
<dd><p>Successful program execution.
</p></dd>
<dt>&lsquo;<samp>1 (EXIT_FAILURE)</samp>&rsquo;</dt>
<dd><p>The operation failed or the command syntax was not valid.
</p></dd>
<dt>&lsquo;<samp>66 (EX_NOINPUT)</samp>&rsquo;</dt>
<dd><p>A specified configuration file could not be loaded.
</p></dd>
<dt>&lsquo;<samp>70 (EX_SOFTWARE)</samp>&rsquo;</dt>
<dd><p>libopts had an internal operational error.  Please report
it to autogen-users@lists.sourceforge.net.  Thank you.
</p></dd>
</dl>
<hr>
<span id="ntpdc-Usage"></span><div class="header">
<p>
Next: <a href="#ntpdc-See-Also" accesskey="n" rel="next">ntpdc See Also</a>, Previous: <a href="#ntpdc-exit-status" accesskey="p" rel="prev">ntpdc exit status</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="ntpdc-Usage-1"></span><h4 class="subsection">1.1.13 ntpdc Usage</h4>
<hr>
<span id="ntpdc-See-Also"></span><div class="header">
<p>
Next: <a href="#ntpdc-Authors" accesskey="n" rel="next">ntpdc Authors</a>, Previous: <a href="#ntpdc-Usage" accesskey="p" rel="prev">ntpdc Usage</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="ntpdc-See-Also-1"></span><h4 class="subsection">1.1.14 ntpdc See Also</h4>
<hr>
<span id="ntpdc-Authors"></span><div class="header">
<p>
Next: <a href="#ntpdc-Bugs" accesskey="n" rel="next">ntpdc Bugs</a>, Previous: <a href="#ntpdc-See-Also" accesskey="p" rel="prev">ntpdc See Also</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="ntpdc-Authors-1"></span><h4 class="subsection">1.1.15 ntpdc Authors</h4>
<hr>
<span id="ntpdc-Bugs"></span><div class="header">
<p>
Previous: <a href="#ntpdc-Authors" accesskey="p" rel="prev">ntpdc Authors</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
<span id="ntpdc-Bugs-1"></span><h4 class="subsection">1.1.16 ntpdc Bugs</h4>

<hr>
<span id="Usage"></span><div class="header">
<p>
Previous: <a href="#ntpdc-Invocation" accesskey="p" rel="prev">ntpdc Invocation</a>, Up: <a href="#ntpdc-Description" accesskey="u" rel="up">ntpdc Description</a> &nbsp; </p>
</div>
<span id="Usage-1"></span><h3 class="section">1.2 Usage</h3>

<p>The simplest use of this program is as an unprivileged command to
check the current time, offset, and error in the local clock.
For example:
</p>
<div class="example">
<pre class="example">ntpdc ntpserver.somewhere
</pre></div>

<p>With suitable privilege, it can be run as a command or in a
<code>cron</code> job to reset the local clock from a reliable server, like
the <code>ntpdate</code> and <code>rdate</code> commands.
For example:
</p>
<div class="example">
<pre class="example">ntpdc -a ntpserver.somewhere
</pre></div>
<hr>



</body>
</html>