]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ntp/ntpd/ntpd.html
Fix multiple denial of service in ntpd.
[FreeBSD/FreeBSD.git] / contrib / ntp / ntpd / ntpd.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>ntpd: Network Time Protocol (NTP) Daemon User&rsquo;s Manual</title>
7
8 <meta name="description" content="ntpd: Network Time Protocol (NTP) Daemon User&rsquo;s Manual">
9 <meta name="keywords" content="ntpd: Network Time Protocol (NTP) Daemon User&rsquo;s Manual">
10 <meta name="resource-type" content="document">
11 <meta name="distribution" content="global">
12 <meta name="Generator" content="makeinfo">
13 <link href="#Top" rel="start" title="Top">
14 <link href="dir.html#Top" rel="up" title="(dir)">
15 <style type="text/css">
16 <!--
17 a.summary-letter {text-decoration: none}
18 blockquote.indentedblock {margin-right: 0em}
19 blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
20 blockquote.smallquotation {font-size: smaller}
21 div.display {margin-left: 3.2em}
22 div.example {margin-left: 3.2em}
23 div.lisp {margin-left: 3.2em}
24 div.smalldisplay {margin-left: 3.2em}
25 div.smallexample {margin-left: 3.2em}
26 div.smalllisp {margin-left: 3.2em}
27 kbd {font-style: oblique}
28 pre.display {font-family: inherit}
29 pre.format {font-family: inherit}
30 pre.menu-comment {font-family: serif}
31 pre.menu-preformatted {font-family: serif}
32 pre.smalldisplay {font-family: inherit; font-size: smaller}
33 pre.smallexample {font-size: smaller}
34 pre.smallformat {font-family: inherit; font-size: smaller}
35 pre.smalllisp {font-size: smaller}
36 span.nolinebreak {white-space: nowrap}
37 span.roman {font-family: initial; font-weight: normal}
38 span.sansserif {font-family: sans-serif; font-weight: normal}
39 ul.no-bullet {list-style: none}
40 -->
41 </style>
42
43
44 </head>
45
46 <body lang="en">
47 <h1 class="settitle" align="center">ntpd: Network Time Protocol (NTP) Daemon User&rsquo;s Manual</h1>
48
49
50
51
52
53 <a name="Top"></a>
54 <div class="header">
55 <p>
56 Next: <a href="#ntpd-Description" accesskey="n" rel="next">ntpd 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>
57 </div>
58 <a name="ntpd_003a-Network-Time-Protocol-_0028NTP_0029-Daemon-User-Manual"></a>
59 <h1 class="top">ntpd: Network Time Protocol (NTP) Daemon User Manual</h1>
60
61 <p>The <code>ntpd</code> program is an operating system daemon that synchronizes the
62 system clock to remote NTP time servers or local reference clocks.
63 It is a complete implementation of NTP version 4 defined by RFC-5905, but
64 also retains compatible with version 3 defined by RFC-1305 and versions
65 1 and 2, defined by RFC-1059 and RFC-1119, respectively.
66 The program can operate in any of several modes, including client/server,
67 symmetric and broadcast modes, and with both symmetric-key and public-key
68 cryptography.
69 </p>
70 <p>This document applies to version 4.2.8p14 of <code>ntpd</code>.
71 </p>
72 <a name="SEC_Overview"></a>
73 <h2 class="shortcontents-heading">Short Table of Contents</h2>
74
75 <div class="shortcontents">
76 <ul class="no-bullet">
77 <li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
78 </ul>
79 </div>
80
81
82 <table class="menu" border="0" cellspacing="0">
83 <tr><td align="left" valign="top">&bull; <a href="#ntpd-Description" accesskey="1">ntpd Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
84 </td></tr>
85 <tr><td align="left" valign="top">&bull; <a href="#ntpd-Invocation" accesskey="2">ntpd Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpd
86 </td></tr>
87 <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
88 </td></tr>
89 </table>
90
91 <hr>
92 <a name="ntpd-Description"></a>
93 <div class="header">
94 <p>
95 Next: <a href="#ntpd-Invocation" accesskey="n" rel="next">ntpd Invocation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
96 </div>
97 <a name="Description"></a>
98 <h2 class="chapter">1 Description</h2>
99
100 <p>The <code>ntpd</code> program ordinarily requires
101 a configuration file described at &lsquo;ntp.conf&rsquo;.
102 This configuration file contains configuration commands described on
103 the pages listed above.
104 However a client can discover remote servers and configure them
105 automatically.
106 This makes it possible to deploy a fleet of workstations without
107 specifying configuration details specific to the local environment.
108 </p>
109 <p>The <code>ntpd</code> program normally operates continuously while adjusting the
110 system time and frequency, but in some cases this might not be
111 practical.
112 With the <code>-q</code> option <code>ntpd</code> operates as in continuous mode, but
113 exits just after setting the clock for the first time.
114 Most applications will probably want to specify the <code>iburst</code>
115 option with the <code>server</code> command.
116 With this option an initial volley of messages is exchanged to
117 groom the data and set the clock in about ten seconds&rsquo; time.
118 If nothing is heard after a few minutes&rsquo; time,
119 the daemon times out and exits without setting the clock.
120 </p>
121 <table class="menu" border="0" cellspacing="0">
122 <tr><td align="left" valign="top">&bull; <a href="#ntpd-Invocation" accesskey="1">ntpd Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
123 </td></tr>
124 <tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
125 </td></tr>
126 </table>
127
128 <hr>
129 <a name="ntpd-Invocation"></a>
130 <div class="header">
131 <p>
132 Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#ntpd-Description" accesskey="p" rel="prev">ntpd Description</a>, Up: <a href="#ntpd-Description" accesskey="u" rel="up">ntpd Description</a> &nbsp; </p>
133 </div>
134 <a name="Invoking-ntpd"></a>
135 <h3 class="section">1.1 Invoking ntpd</h3>
136 <a name="index-ntpd"></a>
137 <a name="index-NTP-daemon-program"></a>
138
139
140
141 <p>The
142 <code>ntpd</code>
143 utility is an operating system daemon which sets
144 and maintains the system time of day in synchronism with Internet
145 standard time servers.
146 It is a complete implementation of the
147 Network Time Protocol (NTP) version 4, as defined by RFC-5905,
148 but also retains compatibility with
149 version 3, as defined by RFC-1305, and versions 1
150 and 2, as defined by RFC-1059 and RFC-1119, respectively.
151 </p>
152 <p>The
153 <code>ntpd</code>
154 utility does most computations in 64-bit floating point
155 arithmetic and does relatively clumsy 64-bit fixed point operations
156 only when necessary to preserve the ultimate precision, about 232
157 picoseconds.
158 While the ultimate precision is not achievable with
159 ordinary workstations and networks of today, it may be required
160 with future gigahertz CPU clocks and gigabit LANs.
161 </p>
162 <p>Ordinarily,
163 <code>ntpd</code>
164 reads the
165 <code>ntp.conf(5)</code>
166 configuration file at startup time in order to determine the
167 synchronization sources and operating modes.
168 It is also possible to
169 specify a working, although limited, configuration entirely on the
170 command line, obviating the need for a configuration file.
171 This may
172 be particularly useful when the local host is to be configured as a
173 broadcast/multicast client, with all peers being determined by
174 listening to broadcasts at run time.
175 </p>
176 <p>If NetInfo support is built into
177 <code>ntpd</code>
178 then
179 <code>ntpd</code>
180 will attempt to read its configuration from the
181 NetInfo if the default
182 <code>ntp.conf(5)</code>
183 file cannot be read and no file is
184 specified by the
185 <code>-c</code>
186 option.
187 </p>
188 <p>Various internal
189 <code>ntpd</code>
190 variables can be displayed and
191 configuration options altered while the
192 <code>ntpd</code>
193 is running
194 using the
195 <code>ntpq(1ntpqmdoc)</code>
196 and
197 <code>ntpdc(1ntpdcmdoc)</code>
198 utility programs.
199 </p>
200 <p>When
201 <code>ntpd</code>
202 starts it looks at the value of
203 <code>umask(2)</code>,
204 and if zero
205 <code>ntpd</code>
206 will set the
207 <code>umask(2)</code>
208 to 022.
209 </p>
210 <p>This section was generated by <strong>AutoGen</strong>,
211 using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpd</code> program.
212 This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
213 </p>
214 <table class="menu" border="0" cellspacing="0">
215 <tr><td align="left" valign="top">&bull; <a href="#ntpd-usage" accesskey="1">ntpd usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpd help/usage (<samp>--help</samp>)
216 </td></tr>
217 <tr><td align="left" valign="top">&bull; <a href="#ntpd-ipv4" accesskey="2">ntpd ipv4</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
218 </td></tr>
219 <tr><td align="left" valign="top">&bull; <a href="#ntpd-ipv6" accesskey="3">ntpd ipv6</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
220 </td></tr>
221 <tr><td align="left" valign="top">&bull; <a href="#ntpd-authreq" accesskey="4">ntpd authreq</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">authreq option (-a)
222 </td></tr>
223 <tr><td align="left" valign="top">&bull; <a href="#ntpd-authnoreq" accesskey="5">ntpd authnoreq</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">authnoreq option (-A)
224 </td></tr>
225 <tr><td align="left" valign="top">&bull; <a href="#ntpd-configfile" accesskey="6">ntpd configfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">configfile option (-c)
226 </td></tr>
227 <tr><td align="left" valign="top">&bull; <a href="#ntpd-driftfile" accesskey="7">ntpd driftfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">driftfile option (-f)
228 </td></tr>
229 <tr><td align="left" valign="top">&bull; <a href="#ntpd-panicgate" accesskey="8">ntpd panicgate</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">panicgate option (-g)
230 </td></tr>
231 <tr><td align="left" valign="top">&bull; <a href="#ntpd-force_002dstep_002donce" accesskey="9">ntpd force-step-once</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">force-step-once option (-G)
232 </td></tr>
233 <tr><td align="left" valign="top">&bull; <a href="#ntpd-jaildir">ntpd jaildir</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">jaildir option (-i)
234 </td></tr>
235 <tr><td align="left" valign="top">&bull; <a href="#ntpd-interface">ntpd interface</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">interface option (-I)
236 </td></tr>
237 <tr><td align="left" valign="top">&bull; <a href="#ntpd-keyfile">ntpd keyfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">keyfile option (-k)
238 </td></tr>
239 <tr><td align="left" valign="top">&bull; <a href="#ntpd-logfile">ntpd logfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">logfile option (-l)
240 </td></tr>
241 <tr><td align="left" valign="top">&bull; <a href="#ntpd-novirtualips">ntpd novirtualips</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">novirtualips option (-L)
242 </td></tr>
243 <tr><td align="left" valign="top">&bull; <a href="#ntpd-modifymmtimer">ntpd modifymmtimer</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">modifymmtimer option (-M)
244 </td></tr>
245 <tr><td align="left" valign="top">&bull; <a href="#ntpd-nice">ntpd nice</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">nice option (-N)
246 </td></tr>
247 <tr><td align="left" valign="top">&bull; <a href="#ntpd-pidfile">ntpd pidfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">pidfile option (-p)
248 </td></tr>
249 <tr><td align="left" valign="top">&bull; <a href="#ntpd-priority">ntpd priority</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">priority option (-P)
250 </td></tr>
251 <tr><td align="left" valign="top">&bull; <a href="#ntpd-quit">ntpd quit</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">quit option (-q)
252 </td></tr>
253 <tr><td align="left" valign="top">&bull; <a href="#ntpd-propagationdelay">ntpd propagationdelay</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">propagationdelay option (-r)
254 </td></tr>
255 <tr><td align="left" valign="top">&bull; <a href="#ntpd-saveconfigquit">ntpd saveconfigquit</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">saveconfigquit option
256 </td></tr>
257 <tr><td align="left" valign="top">&bull; <a href="#ntpd-statsdir">ntpd statsdir</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">statsdir option (-s)
258 </td></tr>
259 <tr><td align="left" valign="top">&bull; <a href="#ntpd-trustedkey">ntpd trustedkey</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">trustedkey option (-t)
260 </td></tr>
261 <tr><td align="left" valign="top">&bull; <a href="#ntpd-user">ntpd user</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">user option (-u)
262 </td></tr>
263 <tr><td align="left" valign="top">&bull; <a href="#ntpd-updateinterval">ntpd updateinterval</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">updateinterval option (-U)
264 </td></tr>
265 <tr><td align="left" valign="top">&bull; <a href="#ntpd-wait_002dsync">ntpd wait-sync</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">wait-sync option (-w)
266 </td></tr>
267 <tr><td align="left" valign="top">&bull; <a href="#ntpd-slew">ntpd slew</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">slew option (-x)
268 </td></tr>
269 <tr><td align="left" valign="top">&bull; <a href="#ntpd-usepcc">ntpd usepcc</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">usepcc option
270 </td></tr>
271 <tr><td align="left" valign="top">&bull; <a href="#ntpd-pccfreq">ntpd pccfreq</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">pccfreq option
272 </td></tr>
273 <tr><td align="left" valign="top">&bull; <a href="#ntpd-mdns">ntpd mdns</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">mdns option (-m)
274 </td></tr>
275 <tr><td align="left" valign="top">&bull; <a href="#ntpd-config">ntpd config</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntpd
276 </td></tr>
277 <tr><td align="left" valign="top">&bull; <a href="#ntpd-exit-status">ntpd exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
278 </td></tr>
279 <tr><td align="left" valign="top">&bull; <a href="#ntpd-Usage">ntpd Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
280 </td></tr>
281 <tr><td align="left" valign="top">&bull; <a href="#ntpd-Files">ntpd Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Files
282 </td></tr>
283 <tr><td align="left" valign="top">&bull; <a href="#ntpd-See-Also">ntpd See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
284 </td></tr>
285 <tr><td align="left" valign="top">&bull; <a href="#ntpd-Bugs">ntpd Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
286 </td></tr>
287 <tr><td align="left" valign="top">&bull; <a href="#ntpd-Notes">ntpd Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
288 </td></tr>
289 </table>
290
291 <hr>
292 <a name="ntpd-usage"></a>
293 <div class="header">
294 <p>
295 Next: <a href="#ntpd-ipv4" accesskey="n" rel="next">ntpd ipv4</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
296 </div>
297 <a name="ntpd-help_002fusage-_0028_002d_002dhelp_0029"></a>
298 <h4 class="subsection">1.1.1 ntpd help/usage (<samp>--help</samp>)</h4>
299 <a name="index-ntpd-help"></a>
300
301 <p>This is the automatically generated usage text for ntpd.
302 </p>
303 <p>The text printed is the same whether selected with the <code>help</code> option
304 (<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>).  <code>more-help</code> will print
305 the usage text by passing it through a pager program.
306 <code>more-help</code> is disabled on platforms without a working
307 <code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
308 used to select the program, defaulting to <samp>more</samp>.  Both will exit
309 with a status code of 0.
310 </p>
311 <div class="example">
312 <pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p14
313 Usage:  ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
314                 [ &lt;server1&gt; ... &lt;serverN&gt; ]
315   Flg Arg Option-Name    Description
316    -4 no  ipv4           Force IPv4 DNS name resolution
317                                 - prohibits the option 'ipv6'
318    -6 no  ipv6           Force IPv6 DNS name resolution
319                                 - prohibits the option 'ipv4'
320    -a no  authreq        Require crypto authentication
321                                 - prohibits the option 'authnoreq'
322    -A no  authnoreq      Do not require crypto authentication
323                                 - prohibits the option 'authreq'
324    -b no  bcastsync      Allow us to sync to broadcast servers
325    -c Str configfile     configuration file name
326    -d no  debug-level    Increase debug verbosity level
327                                 - may appear multiple times
328    -D Num set-debug-level Set the debug verbosity level
329                                 - may appear multiple times
330    -f Str driftfile      frequency drift file name
331    -g no  panicgate      Allow the first adjustment to be Big
332                                 - may appear multiple times
333    -G no  force-step-once Step any initial offset correction.
334    -i --- jaildir        built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs
335    -I Str interface      Listen on an interface name or address
336                                 - may appear multiple times
337    -k Str keyfile        path to symmetric keys
338    -l Str logfile        path to the log file
339    -L no  novirtualips   Do not listen to virtual interfaces
340    -n no  nofork         Do not fork
341                                 - prohibits the option 'wait-sync'
342    -N no  nice           Run at high priority
343    -p Str pidfile        path to the PID file
344    -P Num priority       Process priority
345    -q no  quit           Set the time and quit
346                                 - prohibits these options:
347                                 saveconfigquit
348                                 wait-sync
349    -r Str propagationdelay Broadcast/propagation delay
350       Str saveconfigquit Save parsed configuration and quit
351                                 - prohibits these options:
352                                 quit
353                                 wait-sync
354    -s Str statsdir       Statistics file location
355    -t Str trustedkey     Trusted key number
356                                 - may appear multiple times
357    -u --- user           built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs
358    -U Num updateinterval interval in seconds between scans for new or dropped interfaces
359       Str var            make ARG an ntp variable (RW)
360                                 - may appear multiple times
361       Str dvar           make ARG an ntp variable (RW|DEF)
362                                 - may appear multiple times
363    -w Num wait-sync      Seconds to wait for first clock sync
364                                 - prohibits these options:
365                                 nofork
366                                 quit
367                                 saveconfigquit
368    -x no  slew           Slew up to 600 seconds
369       opt version        output version information and exit
370    -? no  help           display extended usage information and exit
371    -! no  more-help      extended usage information passed thru pager
372
373 Options are specified by doubled hyphens and their name or by a single
374 hyphen and the flag character.
375
376
377 The following option preset mechanisms are supported:
378  - examining environment variables named NTPD_*
379
380 Please send bug reports to:  &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
381 </pre></div>
382
383 <hr>
384 <a name="ntpd-ipv4"></a>
385 <div class="header">
386 <p>
387 Next: <a href="#ntpd-ipv6" accesskey="n" rel="next">ntpd ipv6</a>, Previous: <a href="#ntpd-usage" accesskey="p" rel="prev">ntpd usage</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
388 </div>
389 <a name="ipv4-option-_0028_002d4_0029"></a>
390 <h4 class="subsection">1.1.2 ipv4 option (-4)</h4>
391 <a name="index-ntpd_002dipv4"></a>
392
393 <p>This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
394 </p>
395 <p>This option has some usage constraints.  It:
396 </p><ul>
397 <li> must not appear in combination with any of the following options:
398 ipv6.
399 </li></ul>
400
401 <p>Force DNS resolution of following host names on the command line
402 to the IPv4 namespace.
403 </p><hr>
404 <a name="ntpd-ipv6"></a>
405 <div class="header">
406 <p>
407 Next: <a href="#ntpd-authreq" accesskey="n" rel="next">ntpd authreq</a>, Previous: <a href="#ntpd-ipv4" accesskey="p" rel="prev">ntpd ipv4</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
408 </div>
409 <a name="ipv6-option-_0028_002d6_0029"></a>
410 <h4 class="subsection">1.1.3 ipv6 option (-6)</h4>
411 <a name="index-ntpd_002dipv6"></a>
412
413 <p>This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
414 </p>
415 <p>This option has some usage constraints.  It:
416 </p><ul>
417 <li> must not appear in combination with any of the following options:
418 ipv4.
419 </li></ul>
420
421 <p>Force DNS resolution of following host names on the command line
422 to the IPv6 namespace.
423 </p><hr>
424 <a name="ntpd-authreq"></a>
425 <div class="header">
426 <p>
427 Next: <a href="#ntpd-authnoreq" accesskey="n" rel="next">ntpd authnoreq</a>, Previous: <a href="#ntpd-ipv6" accesskey="p" rel="prev">ntpd ipv6</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
428 </div>
429 <a name="authreq-option-_0028_002da_0029"></a>
430 <h4 class="subsection">1.1.4 authreq option (-a)</h4>
431 <a name="index-ntpd_002dauthreq"></a>
432
433 <p>This is the &ldquo;require crypto authentication&rdquo; option.
434 </p>
435 <p>This option has some usage constraints.  It:
436 </p><ul>
437 <li> must not appear in combination with any of the following options:
438 authnoreq.
439 </li></ul>
440
441 <p>Require cryptographic authentication for broadcast client,
442 multicast client and symmetric passive associations.
443 This is the default.
444 </p><hr>
445 <a name="ntpd-authnoreq"></a>
446 <div class="header">
447 <p>
448 Next: <a href="#ntpd-configfile" accesskey="n" rel="next">ntpd configfile</a>, Previous: <a href="#ntpd-authreq" accesskey="p" rel="prev">ntpd authreq</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
449 </div>
450 <a name="authnoreq-option-_0028_002dA_0029"></a>
451 <h4 class="subsection">1.1.5 authnoreq option (-A)</h4>
452 <a name="index-ntpd_002dauthnoreq"></a>
453
454 <p>This is the &ldquo;do not require crypto authentication&rdquo; option.
455 </p>
456 <p>This option has some usage constraints.  It:
457 </p><ul>
458 <li> must not appear in combination with any of the following options:
459 authreq.
460 </li></ul>
461
462 <p>Do not require cryptographic authentication for broadcast client,
463 multicast client and symmetric passive associations.
464 This is almost never a good idea.
465 </p><hr>
466 <a name="ntpd-configfile"></a>
467 <div class="header">
468 <p>
469 Next: <a href="#ntpd-driftfile" accesskey="n" rel="next">ntpd driftfile</a>, Previous: <a href="#ntpd-authnoreq" accesskey="p" rel="prev">ntpd authnoreq</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
470 </div>
471 <a name="configfile-option-_0028_002dc_0029"></a>
472 <h4 class="subsection">1.1.6 configfile option (-c)</h4>
473 <a name="index-ntpd_002dconfigfile"></a>
474
475 <p>This is the &ldquo;configuration file name&rdquo; option.
476 This option takes a string argument.
477 The name and path of the configuration file,
478 <samp>/etc/ntp.conf</samp>
479 by default.
480 </p><hr>
481 <a name="ntpd-driftfile"></a>
482 <div class="header">
483 <p>
484 Next: <a href="#ntpd-panicgate" accesskey="n" rel="next">ntpd panicgate</a>, Previous: <a href="#ntpd-configfile" accesskey="p" rel="prev">ntpd configfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
485 </div>
486 <a name="driftfile-option-_0028_002df_0029"></a>
487 <h4 class="subsection">1.1.7 driftfile option (-f)</h4>
488 <a name="index-ntpd_002ddriftfile"></a>
489
490 <p>This is the &ldquo;frequency drift file name&rdquo; option.
491 This option takes a string argument.
492 The name and path of the frequency file,
493 <samp>/etc/ntp.drift</samp>
494 by default.
495 This is the same operation as the
496 <code>driftfile</code> <kbd>driftfile</kbd>
497 configuration specification in the
498 <samp>/etc/ntp.conf</samp>
499 file.
500 </p><hr>
501 <a name="ntpd-panicgate"></a>
502 <div class="header">
503 <p>
504 Next: <a href="#ntpd-force_002dstep_002donce" accesskey="n" rel="next">ntpd force-step-once</a>, Previous: <a href="#ntpd-driftfile" accesskey="p" rel="prev">ntpd driftfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
505 </div>
506 <a name="panicgate-option-_0028_002dg_0029"></a>
507 <h4 class="subsection">1.1.8 panicgate option (-g)</h4>
508 <a name="index-ntpd_002dpanicgate"></a>
509
510 <p>This is the &ldquo;allow the first adjustment to be big&rdquo; option.
511 </p>
512 <p>This option has some usage constraints.  It:
513 </p><ul>
514 <li> may appear an unlimited number of times.
515 </li></ul>
516
517 <p>Normally,
518 <code>ntpd</code>
519 exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that,
520 <code>ntpd</code>
521 will exit with a message to the system log. This option can be used with the
522 <code>-q</code>
523 and
524 <code>-x</code>
525 options.
526 See the
527 <code>tinker</code>
528 configuration file directive for other options.
529 </p><hr>
530 <a name="ntpd-force_002dstep_002donce"></a>
531 <div class="header">
532 <p>
533 Next: <a href="#ntpd-jaildir" accesskey="n" rel="next">ntpd jaildir</a>, Previous: <a href="#ntpd-panicgate" accesskey="p" rel="prev">ntpd panicgate</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
534 </div>
535 <a name="force_002dstep_002donce-option-_0028_002dG_0029"></a>
536 <h4 class="subsection">1.1.9 force-step-once option (-G)</h4>
537 <a name="index-ntpd_002dforce_002dstep_002donce"></a>
538
539 <p>This is the &ldquo;step any initial offset correction.&rdquo; option.
540 Normally,
541 <code>ntpd</code>
542 steps the time if the time offset exceeds the step threshold,
543 which is 128 ms by default, and otherwise slews the time.
544 This option forces the initial offset correction to be stepped,
545 so the highest time accuracy can be achieved quickly.
546 However, this may also cause the time to be stepped back
547 so this option must not be used if
548 applications requiring monotonic time are running.
549 See the <code>tinker</code> configuration file directive for other options.
550 </p><hr>
551 <a name="ntpd-jaildir"></a>
552 <div class="header">
553 <p>
554 Next: <a href="#ntpd-interface" accesskey="n" rel="next">ntpd interface</a>, Previous: <a href="#ntpd-force_002dstep_002donce" accesskey="p" rel="prev">ntpd force-step-once</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
555 </div>
556 <a name="jaildir-option-_0028_002di_0029"></a>
557 <h4 class="subsection">1.1.10 jaildir option (-i)</h4>
558 <a name="index-ntpd_002djaildir"></a>
559
560 <p>This is the &ldquo;jail directory&rdquo; option.
561 This option takes a string argument.
562 </p>
563 <p>This option has some usage constraints.  It:
564 </p><ul>
565 <li> must be compiled in by defining <code>HAVE_DROPROOT</code> during the compilation.
566 </li></ul>
567
568 <p>Chroot the server to the directory
569 <kbd>jaildir</kbd>
570 .
571 This option also implies that the server attempts to drop root privileges at startup.
572 You may need to also specify a
573 <code>-u</code>
574 option.
575 This option is only available if the OS supports adjusting the clock
576 without full root privileges.
577 This option is supported under NetBSD (configure with
578 <code>--enable-clockctl</code>) or Linux (configure with
579 <code>--enable-linuxcaps</code>) or Solaris (configure with <code>--enable-solarisprivs</code>).
580 </p><hr>
581 <a name="ntpd-interface"></a>
582 <div class="header">
583 <p>
584 Next: <a href="#ntpd-keyfile" accesskey="n" rel="next">ntpd keyfile</a>, Previous: <a href="#ntpd-jaildir" accesskey="p" rel="prev">ntpd jaildir</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
585 </div>
586 <a name="interface-option-_0028_002dI_0029"></a>
587 <h4 class="subsection">1.1.11 interface option (-I)</h4>
588 <a name="index-ntpd_002dinterface"></a>
589
590 <p>This is the &ldquo;listen on an interface name or address&rdquo; option.
591 This option takes a string argument <samp>iface</samp>.
592 </p>
593 <p>This option has some usage constraints.  It:
594 </p><ul>
595 <li> may appear an unlimited number of times.
596 </li></ul>
597
598 <p>Open the network address given, or all the addresses associated with the
599 given interface name.  This option may appear multiple times.  This option
600 also implies not opening other addresses, except wildcard and localhost.
601 This option is deprecated. Please consider using the configuration file
602 <code>interface</code> command, which is more versatile.
603 </p><hr>
604 <a name="ntpd-keyfile"></a>
605 <div class="header">
606 <p>
607 Next: <a href="#ntpd-logfile" accesskey="n" rel="next">ntpd logfile</a>, Previous: <a href="#ntpd-interface" accesskey="p" rel="prev">ntpd interface</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
608 </div>
609 <a name="keyfile-option-_0028_002dk_0029"></a>
610 <h4 class="subsection">1.1.12 keyfile option (-k)</h4>
611 <a name="index-ntpd_002dkeyfile"></a>
612
613 <p>This is the &ldquo;path to symmetric keys&rdquo; option.
614 This option takes a string argument.
615 Specify the name and path of the symmetric key file.
616 <samp>/etc/ntp.keys</samp>
617 is the default.
618 This is the same operation as the
619 <code>keys</code> <kbd>keyfile</kbd>
620 configuration file directive.
621 </p><hr>
622 <a name="ntpd-logfile"></a>
623 <div class="header">
624 <p>
625 Next: <a href="#ntpd-novirtualips" accesskey="n" rel="next">ntpd novirtualips</a>, Previous: <a href="#ntpd-keyfile" accesskey="p" rel="prev">ntpd keyfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
626 </div>
627 <a name="logfile-option-_0028_002dl_0029"></a>
628 <h4 class="subsection">1.1.13 logfile option (-l)</h4>
629 <a name="index-ntpd_002dlogfile"></a>
630
631 <p>This is the &ldquo;path to the log file&rdquo; option.
632 This option takes a string argument.
633 Specify the name and path of the log file.
634 The default is the system log file.
635 This is the same operation as the
636 <code>logfile</code> <kbd>logfile</kbd>
637 configuration file directive.
638 </p><hr>
639 <a name="ntpd-novirtualips"></a>
640 <div class="header">
641 <p>
642 Next: <a href="#ntpd-modifymmtimer" accesskey="n" rel="next">ntpd modifymmtimer</a>, Previous: <a href="#ntpd-logfile" accesskey="p" rel="prev">ntpd logfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
643 </div>
644 <a name="novirtualips-option-_0028_002dL_0029"></a>
645 <h4 class="subsection">1.1.14 novirtualips option (-L)</h4>
646 <a name="index-ntpd_002dnovirtualips"></a>
647
648 <p>This is the &ldquo;do not listen to virtual interfaces&rdquo; option.
649 Do not listen to virtual interfaces, defined as those with
650 names containing a colon.  This option is deprecated.  Please
651 consider using the configuration file <code>interface</code> command, which
652 is more versatile.
653 </p><hr>
654 <a name="ntpd-modifymmtimer"></a>
655 <div class="header">
656 <p>
657 Next: <a href="#ntpd-nice" accesskey="n" rel="next">ntpd nice</a>, Previous: <a href="#ntpd-novirtualips" accesskey="p" rel="prev">ntpd novirtualips</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
658 </div>
659 <a name="modifymmtimer-option-_0028_002dM_0029"></a>
660 <h4 class="subsection">1.1.15 modifymmtimer option (-M)</h4>
661 <a name="index-ntpd_002dmodifymmtimer"></a>
662
663 <p>This is the &ldquo;modify multimedia timer (windows only)&rdquo; option.
664 </p>
665 <p>This option has some usage constraints.  It:
666 </p><ul>
667 <li> must be compiled in by defining <code>SYS_WINNT</code> during the compilation.
668 </li></ul>
669
670 <p>Set the Windows Multimedia Timer to highest resolution.  This
671 ensures the resolution does not change while ntpd is running,
672 avoiding timekeeping glitches associated with changes.
673 </p><hr>
674 <a name="ntpd-nice"></a>
675 <div class="header">
676 <p>
677 Next: <a href="#ntpd-pidfile" accesskey="n" rel="next">ntpd pidfile</a>, Previous: <a href="#ntpd-modifymmtimer" accesskey="p" rel="prev">ntpd modifymmtimer</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
678 </div>
679 <a name="nice-option-_0028_002dN_0029"></a>
680 <h4 class="subsection">1.1.16 nice option (-N)</h4>
681 <a name="index-ntpd_002dnice"></a>
682
683 <p>This is the &ldquo;run at high priority&rdquo; option.
684 To the extent permitted by the operating system, run
685 <code>ntpd</code>
686 at the highest priority.
687 </p><hr>
688 <a name="ntpd-pidfile"></a>
689 <div class="header">
690 <p>
691 Next: <a href="#ntpd-priority" accesskey="n" rel="next">ntpd priority</a>, Previous: <a href="#ntpd-nice" accesskey="p" rel="prev">ntpd nice</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
692 </div>
693 <a name="pidfile-option-_0028_002dp_0029"></a>
694 <h4 class="subsection">1.1.17 pidfile option (-p)</h4>
695 <a name="index-ntpd_002dpidfile"></a>
696
697 <p>This is the &ldquo;path to the pid file&rdquo; option.
698 This option takes a string argument.
699 Specify the name and path of the file used to record
700 <code>ntpd</code>&rsquo;s
701 process ID.
702 This is the same operation as the
703 <code>pidfile</code> <kbd>pidfile</kbd>
704 configuration file directive.
705 </p><hr>
706 <a name="ntpd-priority"></a>
707 <div class="header">
708 <p>
709 Next: <a href="#ntpd-quit" accesskey="n" rel="next">ntpd quit</a>, Previous: <a href="#ntpd-pidfile" accesskey="p" rel="prev">ntpd pidfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
710 </div>
711 <a name="priority-option-_0028_002dP_0029"></a>
712 <h4 class="subsection">1.1.18 priority option (-P)</h4>
713 <a name="index-ntpd_002dpriority"></a>
714
715 <p>This is the &ldquo;process priority&rdquo; option.
716 This option takes a number argument.
717 To the extent permitted by the operating system, run
718 <code>ntpd</code>
719 at the specified
720 <code>sched_setscheduler(SCHED_FIFO)</code>
721 priority.
722 </p><hr>
723 <a name="ntpd-quit"></a>
724 <div class="header">
725 <p>
726 Next: <a href="#ntpd-propagationdelay" accesskey="n" rel="next">ntpd propagationdelay</a>, Previous: <a href="#ntpd-priority" accesskey="p" rel="prev">ntpd priority</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
727 </div>
728 <a name="quit-option-_0028_002dq_0029"></a>
729 <h4 class="subsection">1.1.19 quit option (-q)</h4>
730 <a name="index-ntpd_002dquit"></a>
731
732 <p>This is the &ldquo;set the time and quit&rdquo; option.
733 </p>
734 <p>This option has some usage constraints.  It:
735 </p><ul>
736 <li> must not appear in combination with any of the following options:
737 saveconfigquit, wait-sync.
738 </li></ul>
739
740 <p><code>ntpd</code>
741 will not daemonize and will exit after the clock is first
742 synchronized.  This behavior mimics that of the
743 <code>ntpdate</code>
744 program, which will soon be replaced with a shell script.
745 The
746 <code>-g</code>
747 and
748 <code>-x</code>
749 options can be used with this option.
750 Note: The kernel time discipline is disabled with this option.
751 </p><hr>
752 <a name="ntpd-propagationdelay"></a>
753 <div class="header">
754 <p>
755 Next: <a href="#ntpd-saveconfigquit" accesskey="n" rel="next">ntpd saveconfigquit</a>, Previous: <a href="#ntpd-quit" accesskey="p" rel="prev">ntpd quit</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
756 </div>
757 <a name="propagationdelay-option-_0028_002dr_0029"></a>
758 <h4 class="subsection">1.1.20 propagationdelay option (-r)</h4>
759 <a name="index-ntpd_002dpropagationdelay"></a>
760
761 <p>This is the &ldquo;broadcast/propagation delay&rdquo; option.
762 This option takes a string argument.
763 Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
764 </p><hr>
765 <a name="ntpd-saveconfigquit"></a>
766 <div class="header">
767 <p>
768 Next: <a href="#ntpd-statsdir" accesskey="n" rel="next">ntpd statsdir</a>, Previous: <a href="#ntpd-propagationdelay" accesskey="p" rel="prev">ntpd propagationdelay</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
769 </div>
770 <a name="saveconfigquit-option"></a>
771 <h4 class="subsection">1.1.21 saveconfigquit option</h4>
772 <a name="index-ntpd_002dsaveconfigquit"></a>
773
774 <p>This is the &ldquo;save parsed configuration and quit&rdquo; option.
775 This option takes a string argument.
776 </p>
777 <p>This option has some usage constraints.  It:
778 </p><ul>
779 <li> must be compiled in by defining <code>SAVECONFIG</code> during the compilation.
780 </li><li> must not appear in combination with any of the following options:
781 quit, wait-sync.
782 </li></ul>
783
784 <p>Cause <code>ntpd</code> to parse its startup configuration file and save an
785 equivalent to the given filename and exit.  This option was
786 designed for automated testing.
787 </p><hr>
788 <a name="ntpd-statsdir"></a>
789 <div class="header">
790 <p>
791 Next: <a href="#ntpd-trustedkey" accesskey="n" rel="next">ntpd trustedkey</a>, Previous: <a href="#ntpd-saveconfigquit" accesskey="p" rel="prev">ntpd saveconfigquit</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
792 </div>
793 <a name="statsdir-option-_0028_002ds_0029"></a>
794 <h4 class="subsection">1.1.22 statsdir option (-s)</h4>
795 <a name="index-ntpd_002dstatsdir"></a>
796
797 <p>This is the &ldquo;statistics file location&rdquo; option.
798 This option takes a string argument.
799 Specify the directory path for files created by the statistics facility.
800 This is the same operation as the
801 <code>statsdir</code> <kbd>statsdir</kbd>
802 configuration file directive.
803 </p><hr>
804 <a name="ntpd-trustedkey"></a>
805 <div class="header">
806 <p>
807 Next: <a href="#ntpd-user" accesskey="n" rel="next">ntpd user</a>, Previous: <a href="#ntpd-statsdir" accesskey="p" rel="prev">ntpd statsdir</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
808 </div>
809 <a name="trustedkey-option-_0028_002dt_0029"></a>
810 <h4 class="subsection">1.1.23 trustedkey option (-t)</h4>
811 <a name="index-ntpd_002dtrustedkey"></a>
812
813 <p>This is the &ldquo;trusted key number&rdquo; option.
814 This option takes a string argument <samp>tkey</samp>.
815 </p>
816 <p>This option has some usage constraints.  It:
817 </p><ul>
818 <li> may appear an unlimited number of times.
819 </li></ul>
820
821 <p>Add the specified key number to the trusted key list.
822 </p><hr>
823 <a name="ntpd-user"></a>
824 <div class="header">
825 <p>
826 Next: <a href="#ntpd-updateinterval" accesskey="n" rel="next">ntpd updateinterval</a>, Previous: <a href="#ntpd-trustedkey" accesskey="p" rel="prev">ntpd trustedkey</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
827 </div>
828 <a name="user-option-_0028_002du_0029"></a>
829 <h4 class="subsection">1.1.24 user option (-u)</h4>
830 <a name="index-ntpd_002duser"></a>
831
832 <p>This is the &ldquo;run as userid (or userid:groupid)&rdquo; option.
833 This option takes a string argument.
834 </p>
835 <p>This option has some usage constraints.  It:
836 </p><ul>
837 <li> must be compiled in by defining <code>HAVE_DROPROOT</code> during the compilation.
838 </li></ul>
839
840 <p>Specify a user, and optionally a group, to switch to.
841 This option is only available if the OS supports adjusting the clock
842 without full root privileges.
843 This option is supported under NetBSD (configure with
844 <code>--enable-clockctl</code>) or Linux (configure with
845 <code>--enable-linuxcaps</code>) or Solaris (configure with <code>--enable-solarisprivs</code>).
846 </p><hr>
847 <a name="ntpd-updateinterval"></a>
848 <div class="header">
849 <p>
850 Next: <a href="#ntpd-wait_002dsync" accesskey="n" rel="next">ntpd wait-sync</a>, Previous: <a href="#ntpd-user" accesskey="p" rel="prev">ntpd user</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
851 </div>
852 <a name="updateinterval-option-_0028_002dU_0029"></a>
853 <h4 class="subsection">1.1.25 updateinterval option (-U)</h4>
854 <a name="index-ntpd_002dupdateinterval"></a>
855
856 <p>This is the &ldquo;interval in seconds between scans for new or dropped interfaces&rdquo; option.
857 This option takes a number argument.
858 Give the time in seconds between two scans for new or dropped interfaces.
859 For systems with routing socket support the scans will be performed shortly after the interface change
860 has been detected by the system.
861 Use 0 to disable scanning. 60 seconds is the minimum time between scans.
862 </p><hr>
863 <a name="ntpd-wait_002dsync"></a>
864 <div class="header">
865 <p>
866 Next: <a href="#ntpd-slew" accesskey="n" rel="next">ntpd slew</a>, Previous: <a href="#ntpd-updateinterval" accesskey="p" rel="prev">ntpd updateinterval</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
867 </div>
868 <a name="wait_002dsync-option-_0028_002dw_0029"></a>
869 <h4 class="subsection">1.1.26 wait-sync option (-w)</h4>
870 <a name="index-ntpd_002dwait_002dsync"></a>
871
872 <p>This is the &ldquo;seconds to wait for first clock sync&rdquo; option.
873 This option takes a number argument.
874 </p>
875 <p>This option has some usage constraints.  It:
876 </p><ul>
877 <li> must be compiled in by defining <code>HAVE_WORKING_FORK</code> during the compilation.
878 </li><li> must not appear in combination with any of the following options:
879 nofork, quit, saveconfigquit.
880 </li></ul>
881
882 <p>If greater than zero, alters <code>ntpd</code>&rsquo;s behavior when forking to
883 daemonize.  Instead of exiting with status 0 immediately after
884 the fork, the parent waits up to the specified number of
885 seconds for the child to first synchronize the clock.  The exit
886 status is zero (success) if the clock was synchronized,
887 otherwise it is <code>ETIMEDOUT</code>.
888 This provides the option for a script starting <code>ntpd</code> to easily
889 wait for the first set of the clock before proceeding.
890 </p><hr>
891 <a name="ntpd-slew"></a>
892 <div class="header">
893 <p>
894 Next: <a href="#ntpd-usepcc" accesskey="n" rel="next">ntpd usepcc</a>, Previous: <a href="#ntpd-wait_002dsync" accesskey="p" rel="prev">ntpd wait-sync</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
895 </div>
896 <a name="slew-option-_0028_002dx_0029"></a>
897 <h4 class="subsection">1.1.27 slew option (-x)</h4>
898 <a name="index-ntpd_002dslew"></a>
899
900 <p>This is the &ldquo;slew up to 600 seconds&rdquo; option.
901 Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
902 This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
903 Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s.
904 Thus, an adjustment as much as 600 s will take almost 14 days to complete.
905 This option can be used with the
906 <code>-g</code>
907 and
908 <code>-q</code>
909 options.
910 See the
911 <code>tinker</code>
912 configuration file directive for other options.
913 Note: The kernel time discipline is disabled with this option.
914 </p><hr>
915 <a name="ntpd-usepcc"></a>
916 <div class="header">
917 <p>
918 Next: <a href="#ntpd-pccfreq" accesskey="n" rel="next">ntpd pccfreq</a>, Previous: <a href="#ntpd-slew" accesskey="p" rel="prev">ntpd slew</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
919 </div>
920 <a name="usepcc-option"></a>
921 <h4 class="subsection">1.1.28 usepcc option</h4>
922 <a name="index-ntpd_002dusepcc"></a>
923
924 <p>This is the &ldquo;use cpu cycle counter (windows only)&rdquo; option.
925 </p>
926 <p>This option has some usage constraints.  It:
927 </p><ul>
928 <li> must be compiled in by defining <code>SYS_WINNT</code> during the compilation.
929 </li></ul>
930
931 <p>Attempt to substitute the CPU counter for <code>QueryPerformanceCounter</code>.
932 The CPU counter and <code>QueryPerformanceCounter</code> are compared, and if
933 they have the same frequency, the CPU counter (RDTSC on x86) is
934 used directly, saving the overhead of a system call.
935 </p><hr>
936 <a name="ntpd-pccfreq"></a>
937 <div class="header">
938 <p>
939 Next: <a href="#ntpd-mdns" accesskey="n" rel="next">ntpd mdns</a>, Previous: <a href="#ntpd-usepcc" accesskey="p" rel="prev">ntpd usepcc</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
940 </div>
941 <a name="pccfreq-option"></a>
942 <h4 class="subsection">1.1.29 pccfreq option</h4>
943 <a name="index-ntpd_002dpccfreq"></a>
944
945 <p>This is the &ldquo;force cpu cycle counter use (windows only)&rdquo; option.
946 This option takes a string argument.
947 </p>
948 <p>This option has some usage constraints.  It:
949 </p><ul>
950 <li> must be compiled in by defining <code>SYS_WINNT</code> during the compilation.
951 </li></ul>
952
953 <p>Force substitution the CPU counter for <code>QueryPerformanceCounter</code>.
954 The CPU counter (RDTSC on x86) is used unconditionally with the
955 given frequency (in Hz).
956 </p><hr>
957 <a name="ntpd-mdns"></a>
958 <div class="header">
959 <p>
960 Next: <a href="#ntpd-config" accesskey="n" rel="next">ntpd config</a>, Previous: <a href="#ntpd-pccfreq" accesskey="p" rel="prev">ntpd pccfreq</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
961 </div>
962 <a name="mdns-option-_0028_002dm_0029"></a>
963 <h4 class="subsection">1.1.30 mdns option (-m)</h4>
964 <a name="index-ntpd_002dmdns"></a>
965
966 <p>This is the &ldquo;register with mdns as a ntp server&rdquo; option.
967 </p>
968 <p>This option has some usage constraints.  It:
969 </p><ul>
970 <li> must be compiled in by defining <code>HAVE_DNSREGISTRATION</code> during the compilation.
971 </li></ul>
972
973 <p>Registers as an NTP server with the local mDNS server which allows
974 the server to be discovered via mDNS client lookup.
975 </p>
976
977 <hr>
978 <a name="ntpd-config"></a>
979 <div class="header">
980 <p>
981 Next: <a href="#ntpd-exit-status" accesskey="n" rel="next">ntpd exit status</a>, Previous: <a href="#ntpd-mdns" accesskey="p" rel="prev">ntpd mdns</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
982 </div>
983 <a name="presetting_002fconfiguring-ntpd"></a>
984 <h4 class="subsection">1.1.31 presetting/configuring ntpd</h4>
985
986 <p>Any option that is not marked as <i>not presettable</i> may be preset by
987 loading values from environment variables named <code>NTPD</code> and <code>NTPD_&lt;OPTION_NAME&gt;</code>.  <code>&lt;OPTION_NAME&gt;</code> must be one of
988 the options listed above in upper case and segmented with underscores.
989 The <code>NTPD</code> variable will be tokenized and parsed like
990 the command line.  The remaining variables are tested for existence and their
991 values are treated like option arguments.
992 </p>
993
994 <p>The command line options relating to configuration and/or usage help are:
995 </p>
996 <a name="version-_0028_002d_0029"></a>
997 <h4 class="subsubheading">version (-)</h4>
998
999 <p>Print the program version to standard out, optionally with licensing
1000 information, then exit 0.  The optional argument specifies how much licensing
1001 detail to provide.  The default is to print just the version.  The licensing infomation may be selected with an option argument.
1002 Only the first letter of the argument is examined:
1003 </p>
1004 <dl compact="compact">
1005 <dt>&lsquo;<samp>version</samp>&rsquo;</dt>
1006 <dd><p>Only print the version.  This is the default.
1007 </p></dd>
1008 <dt>&lsquo;<samp>copyright</samp>&rsquo;</dt>
1009 <dd><p>Name the copyright usage licensing terms.
1010 </p></dd>
1011 <dt>&lsquo;<samp>verbose</samp>&rsquo;</dt>
1012 <dd><p>Print the full copyright usage licensing terms.
1013 </p></dd>
1014 </dl>
1015
1016 <hr>
1017 <a name="ntpd-exit-status"></a>
1018 <div class="header">
1019 <p>
1020 Next: <a href="#ntpd-Usage" accesskey="n" rel="next">ntpd Usage</a>, Previous: <a href="#ntpd-config" accesskey="p" rel="prev">ntpd config</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
1021 </div>
1022 <a name="ntpd-exit-status-1"></a>
1023 <h4 class="subsection">1.1.32 ntpd exit status</h4>
1024
1025 <p>One of the following exit values will be returned:
1026 </p><dl compact="compact">
1027 <dt>&lsquo;<samp>0 (EXIT_SUCCESS)</samp>&rsquo;</dt>
1028 <dd><p>Successful program execution.
1029 </p></dd>
1030 <dt>&lsquo;<samp>1 (EXIT_FAILURE)</samp>&rsquo;</dt>
1031 <dd><p>The operation failed or the command syntax was not valid.
1032 </p></dd>
1033 </dl>
1034 <hr>
1035 <a name="ntpd-Usage"></a>
1036 <div class="header">
1037 <p>
1038 Next: <a href="#ntpd-Files" accesskey="n" rel="next">ntpd Files</a>, Previous: <a href="#ntpd-exit-status" accesskey="p" rel="prev">ntpd exit status</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
1039 </div>
1040 <a name="ntpd-Usage-1"></a>
1041 <h4 class="subsection">1.1.33 ntpd Usage</h4>
1042 <hr>
1043 <a name="ntpd-Files"></a>
1044 <div class="header">
1045 <p>
1046 Next: <a href="#ntpd-See-Also" accesskey="n" rel="next">ntpd See Also</a>, Previous: <a href="#ntpd-Usage" accesskey="p" rel="prev">ntpd Usage</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
1047 </div>
1048 <a name="ntpd-Files-1"></a>
1049 <h4 class="subsection">1.1.34 ntpd Files</h4>
1050 <hr>
1051 <a name="ntpd-See-Also"></a>
1052 <div class="header">
1053 <p>
1054 Next: <a href="#ntpd-Bugs" accesskey="n" rel="next">ntpd Bugs</a>, Previous: <a href="#ntpd-Files" accesskey="p" rel="prev">ntpd Files</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
1055 </div>
1056 <a name="ntpd-See-Also-1"></a>
1057 <h4 class="subsection">1.1.35 ntpd See Also</h4>
1058 <hr>
1059 <a name="ntpd-Bugs"></a>
1060 <div class="header">
1061 <p>
1062 Next: <a href="#ntpd-Notes" accesskey="n" rel="next">ntpd Notes</a>, Previous: <a href="#ntpd-See-Also" accesskey="p" rel="prev">ntpd See Also</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
1063 </div>
1064 <a name="ntpd-Bugs-1"></a>
1065 <h4 class="subsection">1.1.36 ntpd Bugs</h4>
1066 <hr>
1067 <a name="ntpd-Notes"></a>
1068 <div class="header">
1069 <p>
1070 Previous: <a href="#ntpd-Bugs" accesskey="p" rel="prev">ntpd Bugs</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
1071 </div>
1072 <a name="ntpd-Notes-1"></a>
1073 <h4 class="subsection">1.1.37 ntpd Notes</h4>
1074
1075 <hr>
1076 <a name="Usage"></a>
1077 <div class="header">
1078 <p>
1079 Previous: <a href="#ntpd-Invocation" accesskey="p" rel="prev">ntpd Invocation</a>, Up: <a href="#ntpd-Description" accesskey="u" rel="up">ntpd Description</a> &nbsp; </p>
1080 </div>
1081 <a name="Usage-1"></a>
1082 <h3 class="section">1.2 Usage</h3>
1083
1084 <table>
1085 <thead><tr><th width="23%">What</th><th width="23%">Default</th><th width="5%">Flag</th><th width="15%">Option</th></tr></thead>
1086 <tr><td width="23%">configuration file</td><td width="23%"><code>/etc/ntp.conf</code></td><td width="5%"><code>-c</code></td><td width="15%"><code>conffile</code></td></tr>
1087 <tr><td width="23%">frequency file</td><td width="23%">none</td><td width="5%"><code>-f</code></td><td width="15%"><code>driftfile</code></td></tr>
1088 <tr><td width="23%">leapseconds file</td><td width="23%">none</td><td width="5%"></td><td width="15%"><code>leapfile</code></td></tr>
1089 <tr><td width="23%">process ID file</td><td width="23%">none</td><td width="5%"><code>-p</code></td><td width="15%"><code>pidfile</code></td></tr>
1090 <tr><td width="23%">log file</td><td width="23%">system log</td><td width="5%"><code>-l</code></td><td width="15%"><code>logfile</code></td></tr>
1091 <tr><td width="23%">include file</td><td width="23%">none</td><td width="5%">none</td><td width="15%"><code>includefile</code></td></tr>
1092 <tr><td width="23%">statistics path</td><td width="23%"><code>/var/NTP</code></td><td width="5%"><code>-s</code></td><td width="15%"><code>statsdir</code></td></tr>
1093 <tr><td width="23%">keys path</td><td width="23%"><code>/usr/local/etc</code></td><td width="5%"><code>-k</code></td><td width="15%"><code>keysdir</code></td></tr>
1094 </table>
1095 <hr>
1096
1097
1098
1099 </body>
1100 </html>