ntpd.html revision 293650
1285809Sscottl<html lang="en"> 2285809Sscottl<head> 3285809Sscottl<title>ntpd: Network Time Protocol (NTP) Daemon User's Manual</title> 4285809Sscottl<meta http-equiv="Content-Type" content="text/html"> 5285809Sscottl<meta name="description" content="ntpd: Network Time Protocol (NTP) Daemon User's Manual"> 6285809Sscottl<meta name="generator" content="makeinfo 4.7"> 7285809Sscottl<link title="Top" rel="top" href="#Top"> 8285809Sscottl<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 9285809Sscottl<meta http-equiv="Content-Style-Type" content="text/css"> 10285809Sscottl<style type="text/css"><!-- 11285809Sscottl pre.display { font-family:inherit } 12285809Sscottl pre.format { font-family:inherit } 13285809Sscottl pre.smalldisplay { font-family:inherit; font-size:smaller } 14285809Sscottl pre.smallformat { font-family:inherit; font-size:smaller } 15285809Sscottl pre.smallexample { font-size:smaller } 16285809Sscottl pre.smalllisp { font-size:smaller } 17285809Sscottl span.sc { font-variant:small-caps } 18285809Sscottl span.roman { font-family: serif; font-weight: normal; } 19285809Sscottl--></style> 20285809Sscottl</head> 21285809Sscottl<body> 22285809Sscottl<h1 class="settitle">ntpd: Network Time Protocol (NTP) Daemon User's Manual</h1> 23285809Sscottl<div class="node"> 24285809Sscottl<p><hr> 25285809Sscottl<a name="Top"></a>Next: <a rel="next" accesskey="n" href="#ntpd-Description">ntpd Description</a>, 26285809SscottlPrevious: <a rel="previous" accesskey="p" href="#dir">(dir)</a>, 27285809SscottlUp: <a rel="up" accesskey="u" href="#dir">(dir)</a> 28285809Sscottl<br> 29285809Sscottl</div> 30285809Sscottl 31285809Sscottl<h2 class="unnumbered">ntpd: Network Time Protocol (NTP) Daemon User Manual</h2> 32285809Sscottl 33285809Sscottl<p>The <code>ntpd</code> program is an operating system daemon that synchronizes the 34285809Sscottlsystem clock to remote NTP time servers or local reference clocks. 35285809SscottlIt is a complete implementation of NTP version 4 defined by RFC-5905, but 36285809Sscottlalso retains compatible with version 3 defined by RFC-1305 and versions 37285809Sscottl1 and 2, defined by RFC-1059 and RFC-1119, respectively. 38285809SscottlThe program can operate in any of several modes, including client/server, 39285809Sscottlsymmetric and broadcast modes, and with both symmetric-key and public-key 40285809Sscottlcryptography. 41285809Sscottl 42285809Sscottl <p>This document applies to version 4.2.8p5 of <code>ntpd</code>. 43285809Sscottl 44285809Sscottl<ul class="menu"> 45285809Sscottl<li><a accesskey="1" href="#ntpd-Description">ntpd Description</a>: Description 46285809Sscottl<li><a accesskey="2" href="#ntpd-Invocation">ntpd Invocation</a>: Invoking ntpd 47285809Sscottl<li><a accesskey="3" href="#Usage">Usage</a>: Usage 48285809Sscottl</ul> 49285809Sscottl 50285809Sscottl<div class="node"> 51285809Sscottl<p><hr> 52285809Sscottl<a name="ntpd-Description"></a> 53285809Sscottl<br> 54285809Sscottl</div> 55285809Sscottl 56285809Sscottl<!-- node-name, next, previous, up --> 57285809Sscottl<h3 class="section">Description</h3> 58285809Sscottl 59285809Sscottl<p>The <code>ntpd</code> program ordinarily requires 60285809Sscottla configuration file described at <a href="#ntp_002econf">ntp.conf</a>. 61285809SscottlThis configuration file contains configuration commands described on 62285809Sscottlthe pages listed above. 63285809SscottlHowever a client can discover remote servers and configure them 64285809Sscottlautomatically. 65285809SscottlThis makes it possible to deploy a fleet of workstations without 66285809Sscottlspecifying configuration details specific to the local environment. 67285809Sscottl 68285809Sscottl <p>The <code>ntpd</code> program normally operates continuously while adjusting the 69285809Sscottlsystem time and frequency, but in some cases this might not be 70285809Sscottlpractical. 71285809SscottlWith the <code>-q</code> option <code>ntpd</code> operates as in continuous mode, but 72285809Sscottlexits just after setting the clock for the first time. 73285809SscottlMost applications will probably want to specify the <code>iburst</code> 74285809Sscottloption with the <code>server</code> command. 75285809SscottlWith this option an initial volley of messages is exchanged to 76285809Sscottlgroom the data and set the clock in about ten seconds' time. 77285809SscottlIf nothing is heard after a few minutes' time, 78285809Sscottlthe daemon times out and exits without setting the clock. 79285809Sscottl 80285809Sscottl<div class="node"> 81285809Sscottl<p><hr> 82285809Sscottl<a name="ntpd-Invocation"></a> 83285809Sscottl<br> 84285809Sscottl</div> 85285809Sscottl 86285809Sscottl<h3 class="section">Invoking ntpd</h3> 87285809Sscottl 88285809Sscottl<p><a name="index-ntpd-1"></a><a name="index-NTP-daemon-program-2"></a> 89285809Sscottl 90285809Sscottl <p>The 91285809Sscottl<code>ntpd</code> 92285809Sscottlutility is an operating system daemon which sets 93285809Sscottland maintains the system time of day in synchronism with Internet 94285809Sscottlstandard time servers. 95285809SscottlIt is a complete implementation of the 96285809SscottlNetwork Time Protocol (NTP) version 4, as defined by RFC-5905, 97285809Sscottlbut also retains compatibility with 98285809Sscottlversion 3, as defined by RFC-1305, and versions 1 99285809Sscottland 2, as defined by RFC-1059 and RFC-1119, respectively. 100285809Sscottl 101285809Sscottl <p>The 102285809Sscottl<code>ntpd</code> 103285809Sscottlutility does most computations in 64-bit floating point 104285809Sscottlarithmetic and does relatively clumsy 64-bit fixed point operations 105285809Sscottlonly when necessary to preserve the ultimate precision, about 232 106285809Sscottlpicoseconds. 107285809SscottlWhile the ultimate precision is not achievable with 108285809Sscottlordinary workstations and networks of today, it may be required 109285809Sscottlwith future gigahertz CPU clocks and gigabit LANs. 110285809Sscottl 111285809Sscottl <p>Ordinarily, 112285809Sscottl<code>ntpd</code> 113285809Sscottlreads the 114285809Sscottl<code>ntp.conf(5)</code> 115285809Sscottlconfiguration file at startup time in order to determine the 116285809Sscottlsynchronization sources and operating modes. 117285809SscottlIt is also possible to 118285809Sscottlspecify a working, although limited, configuration entirely on the 119285809Sscottlcommand line, obviating the need for a configuration file. 120285809SscottlThis may 121285809Sscottlbe particularly useful when the local host is to be configured as a 122285809Sscottlbroadcast/multicast client, with all peers being determined by 123285809Sscottllistening to broadcasts at run time. 124285809Sscottl 125285809Sscottl <p>If NetInfo support is built into 126285809Sscottl<code>ntpd</code> 127285809Sscottlthen 128285809Sscottl<code>ntpd</code> 129285809Sscottlwill attempt to read its configuration from the 130285809SscottlNetInfo if the default 131285809Sscottl<code>ntp.conf(5)</code> 132285809Sscottlfile cannot be read and no file is 133285809Sscottlspecified by the 134285809Sscottl<code>-c</code> 135285809Sscottloption. 136285809Sscottl 137285809Sscottl <p>Various internal 138285809Sscottl<code>ntpd</code> 139285809Sscottlvariables can be displayed and 140285809Sscottlconfiguration options altered while the 141285809Sscottl<code>ntpd</code> 142285809Sscottlis running 143285809Sscottlusing the 144285809Sscottl<code>ntpq(1ntpqmdoc)</code> 145285809Sscottland 146285809Sscottl<code>ntpdc(1ntpdcmdoc)</code> 147285809Sscottlutility programs. 148285809Sscottl 149285809Sscottl <p>When 150285809Sscottl<code>ntpd</code> 151285809Sscottlstarts it looks at the value of 152285809Sscottl<code>umask(2)</code>, 153285809Sscottland if zero 154285809Sscottl<code>ntpd</code> 155285809Sscottlwill set the 156285809Sscottl<code>umask(2)</code> 157285809Sscottlto 022. 158285809Sscottl 159285809Sscottl <p>This section was generated by <strong>AutoGen</strong>, 160285809Sscottlusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpd</code> program. 161285809SscottlThis software is released under the NTP license, <http://ntp.org/license>. 162285809Sscottl 163285809Sscottl<ul class="menu"> 164285809Sscottl<li><a accesskey="1" href="#ntpd-usage">ntpd usage</a>: ntpd help/usage (<span class="option">--help</span>) 165285809Sscottl<li><a accesskey="2" href="#ntpd-ipv4">ntpd ipv4</a>: ipv4 option (-4) 166285809Sscottl<li><a accesskey="3" href="#ntpd-ipv6">ntpd ipv6</a>: ipv6 option (-6) 167285809Sscottl<li><a accesskey="4" href="#ntpd-authreq">ntpd authreq</a>: authreq option (-a) 168285809Sscottl<li><a accesskey="5" href="#ntpd-authnoreq">ntpd authnoreq</a>: authnoreq option (-A) 169285809Sscottl<li><a accesskey="6" href="#ntpd-configfile">ntpd configfile</a>: configfile option (-c) 170285809Sscottl<li><a accesskey="7" href="#ntpd-driftfile">ntpd driftfile</a>: driftfile option (-f) 171285809Sscottl<li><a accesskey="8" href="#ntpd-panicgate">ntpd panicgate</a>: panicgate option (-g) 172285809Sscottl<li><a accesskey="9" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>: force-step-once option (-G) 173285809Sscottl<li><a href="#ntpd-jaildir">ntpd jaildir</a>: jaildir option (-i) 174285809Sscottl<li><a href="#ntpd-interface">ntpd interface</a>: interface option (-I) 175285809Sscottl<li><a href="#ntpd-keyfile">ntpd keyfile</a>: keyfile option (-k) 176285809Sscottl<li><a href="#ntpd-logfile">ntpd logfile</a>: logfile option (-l) 177285809Sscottl<li><a href="#ntpd-novirtualips">ntpd novirtualips</a>: novirtualips option (-L) 178285809Sscottl<li><a href="#ntpd-modifymmtimer">ntpd modifymmtimer</a>: modifymmtimer option (-M) 179285809Sscottl<li><a href="#ntpd-nice">ntpd nice</a>: nice option (-N) 180285809Sscottl<li><a href="#ntpd-pidfile">ntpd pidfile</a>: pidfile option (-p) 181285809Sscottl<li><a href="#ntpd-priority">ntpd priority</a>: priority option (-P) 182285809Sscottl<li><a href="#ntpd-quit">ntpd quit</a>: quit option (-q) 183285809Sscottl<li><a href="#ntpd-propagationdelay">ntpd propagationdelay</a>: propagationdelay option (-r) 184285809Sscottl<li><a href="#ntpd-saveconfigquit">ntpd saveconfigquit</a>: saveconfigquit option 185285809Sscottl<li><a href="#ntpd-statsdir">ntpd statsdir</a>: statsdir option (-s) 186285809Sscottl<li><a href="#ntpd-trustedkey">ntpd trustedkey</a>: trustedkey option (-t) 187285809Sscottl<li><a href="#ntpd-user">ntpd user</a>: user option (-u) 188285809Sscottl<li><a href="#ntpd-updateinterval">ntpd updateinterval</a>: updateinterval option (-U) 189285809Sscottl<li><a href="#ntpd-wait_002dsync">ntpd wait-sync</a>: wait-sync option (-w) 190285809Sscottl<li><a href="#ntpd-slew">ntpd slew</a>: slew option (-x) 191285809Sscottl<li><a href="#ntpd-usepcc">ntpd usepcc</a>: usepcc option 192285809Sscottl<li><a href="#ntpd-pccfreq">ntpd pccfreq</a>: pccfreq option 193285809Sscottl<li><a href="#ntpd-mdns">ntpd mdns</a>: mdns option (-m) 194285809Sscottl<li><a href="#ntpd-config">ntpd config</a>: presetting/configuring ntpd 195285809Sscottl<li><a href="#ntpd-exit-status">ntpd exit status</a>: exit status 196285809Sscottl<li><a href="#ntpd-Usage">ntpd Usage</a>: Usage 197285809Sscottl<li><a href="#ntpd-Files">ntpd Files</a>: Files 198285809Sscottl<li><a href="#ntpd-See-Also">ntpd See Also</a>: See Also 199285809Sscottl<li><a href="#ntpd-Bugs">ntpd Bugs</a>: Bugs 200285809Sscottl<li><a href="#ntpd-Notes">ntpd Notes</a>: Notes 201285809Sscottl</ul> 202285809Sscottl 203285809Sscottl<div class="node"> 204285809Sscottl<p><hr> 205285809Sscottl<a name="ntpd-usage"></a>Next: <a rel="next" accesskey="n" href="#ntpd-ipv4">ntpd ipv4</a>, 206285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 207285809Sscottl<br> 208285809Sscottl</div> 209285809Sscottl 210285809Sscottl<h4 class="subsection">ntpd help/usage (<span class="option">--help</span>)</h4> 211285809Sscottl 212285809Sscottl<p><a name="index-ntpd-help-3"></a> 213285809SscottlThis is the automatically generated usage text for ntpd. 214285809Sscottl 215285809Sscottl <p>The text printed is the same whether selected with the <code>help</code> option 216285809Sscottl(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print 217285809Sscottlthe usage text by passing it through a pager program. 218285809Sscottl<code>more-help</code> is disabled on platforms without a working 219285809Sscottl<code>fork(2)</code> function. The <code>PAGER</code> environment variable is 220285809Sscottlused to select the program, defaulting to <span class="file">more</span>. Both will exit 221285809Sscottlwith a status code of 0. 222285809Sscottl 223285809Sscottl<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p4 224285809SscottlUsage: ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \ 225285809Sscottl [ <server1> ... <serverN> ] 226285809Sscottl Flg Arg Option-Name Description 227285809Sscottl -4 no ipv4 Force IPv4 DNS name resolution 228285809Sscottl - prohibits the option 'ipv6' 229285809Sscottl -6 no ipv6 Force IPv6 DNS name resolution 230285809Sscottl - prohibits the option 'ipv4' 231285809Sscottl -a no authreq Require crypto authentication 232285809Sscottl - prohibits the option 'authnoreq' 233285809Sscottl -A no authnoreq Do not require crypto authentication 234285809Sscottl - prohibits the option 'authreq' 235285809Sscottl -b no bcastsync Allow us to sync to broadcast servers 236285809Sscottl -c Str configfile configuration file name 237285809Sscottl -d no debug-level Increase debug verbosity level 238285809Sscottl - may appear multiple times 239285809Sscottl -D Num set-debug-level Set the debug verbosity level 240285809Sscottl - may appear multiple times 241285809Sscottl -f Str driftfile frequency drift file name 242285809Sscottl -g no panicgate Allow the first adjustment to be Big 243285809Sscottl - may appear multiple times 244285809Sscottl -G no force-step-once Step any initial offset correction. 245285809Sscottl -i Str jaildir Jail directory 246285809Sscottl -I Str interface Listen on an interface name or address 247285809Sscottl - may appear multiple times 248285809Sscottl -k Str keyfile path to symmetric keys 249285809Sscottl -l Str logfile path to the log file 250285809Sscottl -L no novirtualips Do not listen to virtual interfaces 251285809Sscottl -n no nofork Do not fork 252285809Sscottl - prohibits the option 'wait-sync' 253285809Sscottl -N no nice Run at high priority 254285809Sscottl -p Str pidfile path to the PID file 255285809Sscottl -P Num priority Process priority 256285809Sscottl -q no quit Set the time and quit 257285809Sscottl - prohibits these options: 258285809Sscottl saveconfigquit 259285809Sscottl wait-sync 260285809Sscottl -r Str propagationdelay Broadcast/propagation delay 261285809Sscottl Str saveconfigquit Save parsed configuration and quit 262285809Sscottl - prohibits these options: 263285809Sscottl quit 264285809Sscottl wait-sync 265285809Sscottl -s Str statsdir Statistics file location 266285809Sscottl -t Str trustedkey Trusted key number 267285809Sscottl - may appear multiple times 268285809Sscottl -u Str user Run as userid (or userid:groupid) 269285809Sscottl -U Num updateinterval interval in seconds between scans for new or dropped interfaces 270285809Sscottl Str var make ARG an ntp variable (RW) 271285809Sscottl - may appear multiple times 272285809Sscottl Str dvar make ARG an ntp variable (RW|DEF) 273285809Sscottl - may appear multiple times 274285809Sscottl -w Num wait-sync Seconds to wait for first clock sync 275285809Sscottl - prohibits these options: 276285809Sscottl nofork 277285809Sscottl quit 278285809Sscottl saveconfigquit 279285809Sscottl -x no slew Slew up to 600 seconds 280285809Sscottl opt version output version information and exit 281285809Sscottl -? no help display extended usage information and exit 282285809Sscottl -! no more-help extended usage information passed thru pager 283285809Sscottl 284285809SscottlOptions are specified by doubled hyphens and their name or by a single 285285809Sscottlhyphen and the flag character. 286285809Sscottl 287285809Sscottl 288285809SscottlThe following option preset mechanisms are supported: 289285809Sscottl - examining environment variables named NTPD_* 290285809Sscottl 291285809SscottlPlease send bug reports to: <http://bugs.ntp.org, bugs@ntp.org> 292285809Sscottl</pre> 293285809Sscottl <div class="node"> 294285809Sscottl<p><hr> 295285809Sscottl<a name="ntpd-ipv4"></a>Next: <a rel="next" accesskey="n" href="#ntpd-ipv6">ntpd ipv6</a>, 296285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-usage">ntpd usage</a>, 297285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 298285809Sscottl<br> 299285809Sscottl</div> 300285809Sscottl 301285809Sscottl<h4 class="subsection">ipv4 option (-4)</h4> 302285809Sscottl 303285809Sscottl<p><a name="index-ntpd_002dipv4-4"></a> 304285809SscottlThis is the “force ipv4 dns name resolution” option. 305285809Sscottl 306285809Sscottl<p class="noindent">This option has some usage constraints. It: 307285809Sscottl <ul> 308285809Sscottl<li>must not appear in combination with any of the following options: 309285809Sscottlipv6. 310285809Sscottl</ul> 311285809Sscottl 312285809Sscottl <p>Force DNS resolution of following host names on the command line 313285809Sscottlto the IPv4 namespace. 314285809Sscottl<div class="node"> 315285809Sscottl<p><hr> 316285809Sscottl<a name="ntpd-ipv6"></a>Next: <a rel="next" accesskey="n" href="#ntpd-authreq">ntpd authreq</a>, 317285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-ipv4">ntpd ipv4</a>, 318285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 319285809Sscottl<br> 320285809Sscottl</div> 321285809Sscottl 322285809Sscottl<h4 class="subsection">ipv6 option (-6)</h4> 323285809Sscottl 324285809Sscottl<p><a name="index-ntpd_002dipv6-5"></a> 325285809SscottlThis is the “force ipv6 dns name resolution” option. 326285809Sscottl 327285809Sscottl<p class="noindent">This option has some usage constraints. It: 328285809Sscottl <ul> 329285809Sscottl<li>must not appear in combination with any of the following options: 330285809Sscottlipv4. 331285809Sscottl</ul> 332285809Sscottl 333285809Sscottl <p>Force DNS resolution of following host names on the command line 334285809Sscottlto the IPv6 namespace. 335285809Sscottl<div class="node"> 336285809Sscottl<p><hr> 337285809Sscottl<a name="ntpd-authreq"></a>Next: <a rel="next" accesskey="n" href="#ntpd-authnoreq">ntpd authnoreq</a>, 338285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-ipv6">ntpd ipv6</a>, 339285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 340285809Sscottl<br> 341285809Sscottl</div> 342285809Sscottl 343285809Sscottl<h4 class="subsection">authreq option (-a)</h4> 344285809Sscottl 345285809Sscottl<p><a name="index-ntpd_002dauthreq-6"></a> 346285809SscottlThis is the “require crypto authentication” option. 347285809Sscottl 348285809Sscottl<p class="noindent">This option has some usage constraints. It: 349285809Sscottl <ul> 350285809Sscottl<li>must not appear in combination with any of the following options: 351285809Sscottlauthnoreq. 352285809Sscottl</ul> 353285809Sscottl 354285809Sscottl <p>Require cryptographic authentication for broadcast client, 355285809Sscottlmulticast client and symmetric passive associations. 356285809SscottlThis is the default. 357285809Sscottl<div class="node"> 358285809Sscottl<p><hr> 359285809Sscottl<a name="ntpd-authnoreq"></a>Next: <a rel="next" accesskey="n" href="#ntpd-configfile">ntpd configfile</a>, 360285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-authreq">ntpd authreq</a>, 361285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 362285809Sscottl<br> 363285809Sscottl</div> 364285809Sscottl 365285809Sscottl<h4 class="subsection">authnoreq option (-A)</h4> 366285809Sscottl 367285809Sscottl<p><a name="index-ntpd_002dauthnoreq-7"></a> 368285809SscottlThis is the “do not require crypto authentication” option. 369285809Sscottl 370285809Sscottl<p class="noindent">This option has some usage constraints. It: 371285809Sscottl <ul> 372285809Sscottl<li>must not appear in combination with any of the following options: 373285809Sscottlauthreq. 374285809Sscottl</ul> 375285809Sscottl 376285809Sscottl <p>Do not require cryptographic authentication for broadcast client, 377285809Sscottlmulticast client and symmetric passive associations. 378285809SscottlThis is almost never a good idea. 379285809Sscottl<div class="node"> 380285809Sscottl<p><hr> 381285809Sscottl<a name="ntpd-configfile"></a>Next: <a rel="next" accesskey="n" href="#ntpd-driftfile">ntpd driftfile</a>, 382285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-authnoreq">ntpd authnoreq</a>, 383285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 384285809Sscottl<br> 385285809Sscottl</div> 386285809Sscottl 387285809Sscottl<h4 class="subsection">configfile option (-c)</h4> 388285809Sscottl 389285809Sscottl<p><a name="index-ntpd_002dconfigfile-8"></a> 390285809SscottlThis is the “configuration file name” option. 391285809SscottlThis option takes a string argument. 392285809SscottlThe name and path of the configuration file, 393285809Sscottl<span class="file">/etc/ntp.conf</span> 394285809Sscottlby default. 395285809Sscottl<div class="node"> 396285809Sscottl<p><hr> 397285809Sscottl<a name="ntpd-driftfile"></a>Next: <a rel="next" accesskey="n" href="#ntpd-panicgate">ntpd panicgate</a>, 398285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-configfile">ntpd configfile</a>, 399285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 400285809Sscottl<br> 401285809Sscottl</div> 402285809Sscottl 403285809Sscottl<h4 class="subsection">driftfile option (-f)</h4> 404285809Sscottl 405285809Sscottl<p><a name="index-ntpd_002ddriftfile-9"></a> 406285809SscottlThis is the “frequency drift file name” option. 407285809SscottlThis option takes a string argument. 408285809SscottlThe name and path of the frequency file, 409285809Sscottl<span class="file">/etc/ntp.drift</span> 410285809Sscottlby default. 411285809SscottlThis is the same operation as the 412285809Sscottl<code>driftfile</code> <kbd>driftfile</kbd> 413285809Sscottlconfiguration specification in the 414285809Sscottl<span class="file">/etc/ntp.conf</span> 415285809Sscottlfile. 416285809Sscottl<div class="node"> 417285809Sscottl<p><hr> 418285809Sscottl<a name="ntpd-panicgate"></a>Next: <a rel="next" accesskey="n" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>, 419285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-driftfile">ntpd driftfile</a>, 420285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 421285809Sscottl<br> 422285809Sscottl</div> 423285809Sscottl 424285809Sscottl<h4 class="subsection">panicgate option (-g)</h4> 425285809Sscottl 426285809Sscottl<p><a name="index-ntpd_002dpanicgate-10"></a> 427285809SscottlThis is the “allow the first adjustment to be big” option. 428285809Sscottl 429285809Sscottl<p class="noindent">This option has some usage constraints. It: 430285809Sscottl <ul> 431285809Sscottl<li>may appear an unlimited number of times. 432285809Sscottl</ul> 433285809Sscottl 434285809Sscottl <p>Normally, 435285809Sscottl<code>ntpd</code> 436285809Sscottlexits 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, 437285809Sscottl<code>ntpd</code> 438285809Sscottlwill exit with a message to the system log. This option can be used with the 439285809Sscottl<code>-q</code> 440285809Sscottland 441285809Sscottl<code>-x</code> 442285809Sscottloptions. 443285809SscottlSee the 444285809Sscottl<code>tinker</code> 445285809Sscottlconfiguration file directive for other options. 446285809Sscottl<div class="node"> 447285809Sscottl<p><hr> 448285809Sscottl<a name="ntpd-force_002dstep_002donce"></a>Next: <a rel="next" accesskey="n" href="#ntpd-jaildir">ntpd jaildir</a>, 449285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-panicgate">ntpd panicgate</a>, 450285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 451285809Sscottl<br> 452285809Sscottl</div> 453285809Sscottl 454285809Sscottl<h4 class="subsection">force-step-once option (-G)</h4> 455285809Sscottl 456285809Sscottl<p><a name="index-ntpd_002dforce_002dstep_002donce-11"></a> 457285809SscottlThis is the “step any initial offset correction.” option. 458285809SscottlNormally, 459285809Sscottl<code>ntpd</code> 460285809Sscottlsteps the time if the time offset exceeds the step threshold, 461285809Sscottlwhich is 128 ms by default, and otherwise slews the time. 462285809SscottlThis option forces the initial offset correction to be stepped, 463285809Sscottlso the highest time accuracy can be achieved quickly. 464285809SscottlHowever, this may also cause the time to be stepped back 465285809Sscottlso this option must not be used if 466285809Sscottlapplications requiring monotonic time are running. 467285809SscottlSee the <code>tinker</code> configuration file directive for other options. 468285809Sscottl<div class="node"> 469285809Sscottl<p><hr> 470285809Sscottl<a name="ntpd-jaildir"></a>Next: <a rel="next" accesskey="n" href="#ntpd-interface">ntpd interface</a>, 471285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>, 472285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 473285809Sscottl<br> 474285809Sscottl</div> 475285809Sscottl 476285809Sscottl<h4 class="subsection">jaildir option (-i)</h4> 477285809Sscottl 478285809Sscottl<p><a name="index-ntpd_002djaildir-12"></a> 479285809SscottlThis is the “jail directory” option. 480285809SscottlThis option takes a string argument. 481285809Sscottl 482285809Sscottl<p class="noindent">This option has some usage constraints. It: 483285809Sscottl <ul> 484285809Sscottl<li>must be compiled in by defining <code>HAVE_DROPROOT</code> during the compilation. 485285809Sscottl</ul> 486285809Sscottl 487285809Sscottl <p>Chroot the server to the directory 488285809Sscottl<kbd>jaildir</kbd> 489285809Sscottl. 490285809SscottlThis option also implies that the server attempts to drop root privileges at startup. 491285809SscottlYou may need to also specify a 492285809Sscottl<code>-u</code> 493285809Sscottloption. 494285809SscottlThis option is only available if the OS supports adjusting the clock 495285809Sscottlwithout full root privileges. 496285809SscottlThis option is supported under NetBSD (configure with 497285809Sscottl<code>--enable-clockctl</code>) or Linux (configure with 498285809Sscottl<code>--enable-linuxcaps</code>) or Solaris (configure with <code>--enable-solarisprivs</code>). 499285809Sscottl<div class="node"> 500285809Sscottl<p><hr> 501285809Sscottl<a name="ntpd-interface"></a>Next: <a rel="next" accesskey="n" href="#ntpd-keyfile">ntpd keyfile</a>, 502285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-jaildir">ntpd jaildir</a>, 503285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 504285809Sscottl<br> 505285809Sscottl</div> 506285809Sscottl 507285809Sscottl<h4 class="subsection">interface option (-I)</h4> 508285809Sscottl 509285809Sscottl<p><a name="index-ntpd_002dinterface-13"></a> 510285809SscottlThis is the “listen on an interface name or address” option. 511285809SscottlThis option takes a string argument <span class="file">iface</span>. 512285809Sscottl 513285809Sscottl<p class="noindent">This option has some usage constraints. It: 514285809Sscottl <ul> 515285809Sscottl<li>may appear an unlimited number of times. 516285809Sscottl</ul> 517285809Sscottl 518285809Sscottl <p>Open the network address given, or all the addresses associated with the 519285809Sscottlgiven interface name. This option may appear multiple times. This option 520285809Sscottlalso implies not opening other addresses, except wildcard and localhost. 521285809SscottlThis option is deprecated. Please consider using the configuration file 522285809Sscottl<code>interface</code> command, which is more versatile. 523285809Sscottl<div class="node"> 524285809Sscottl<p><hr> 525285809Sscottl<a name="ntpd-keyfile"></a>Next: <a rel="next" accesskey="n" href="#ntpd-logfile">ntpd logfile</a>, 526285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-interface">ntpd interface</a>, 527285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 528285809Sscottl<br> 529285809Sscottl</div> 530285809Sscottl 531285809Sscottl<h4 class="subsection">keyfile option (-k)</h4> 532285809Sscottl 533285809Sscottl<p><a name="index-ntpd_002dkeyfile-14"></a> 534285809SscottlThis is the “path to symmetric keys” option. 535285809SscottlThis option takes a string argument. 536285809SscottlSpecify the name and path of the symmetric key file. 537285809Sscottl<span class="file">/etc/ntp.keys</span> 538285809Sscottlis the default. 539285809SscottlThis is the same operation as the 540285809Sscottl<code>keys</code> <kbd>keyfile</kbd> 541285809Sscottlconfiguration file directive. 542285809Sscottl<div class="node"> 543285809Sscottl<p><hr> 544285809Sscottl<a name="ntpd-logfile"></a>Next: <a rel="next" accesskey="n" href="#ntpd-novirtualips">ntpd novirtualips</a>, 545285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-keyfile">ntpd keyfile</a>, 546285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 547285809Sscottl<br> 548285809Sscottl</div> 549285809Sscottl 550285809Sscottl<h4 class="subsection">logfile option (-l)</h4> 551285809Sscottl 552285809Sscottl<p><a name="index-ntpd_002dlogfile-15"></a> 553285809SscottlThis is the “path to the log file” option. 554285809SscottlThis option takes a string argument. 555285809SscottlSpecify the name and path of the log file. 556285809SscottlThe default is the system log file. 557285809SscottlThis is the same operation as the 558285809Sscottl<code>logfile</code> <kbd>logfile</kbd> 559285809Sscottlconfiguration file directive. 560285809Sscottl<div class="node"> 561285809Sscottl<p><hr> 562285809Sscottl<a name="ntpd-novirtualips"></a>Next: <a rel="next" accesskey="n" href="#ntpd-modifymmtimer">ntpd modifymmtimer</a>, 563285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-logfile">ntpd logfile</a>, 564285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 565285809Sscottl<br> 566285809Sscottl</div> 567285809Sscottl 568285809Sscottl<h4 class="subsection">novirtualips option (-L)</h4> 569285809Sscottl 570285809Sscottl<p><a name="index-ntpd_002dnovirtualips-16"></a> 571285809SscottlThis is the “do not listen to virtual interfaces” option. 572285809SscottlDo not listen to virtual interfaces, defined as those with 573285809Sscottlnames containing a colon. This option is deprecated. Please 574285809Sscottlconsider using the configuration file <code>interface</code> command, which 575285809Sscottlis more versatile. 576285809Sscottl<div class="node"> 577285809Sscottl<p><hr> 578285809Sscottl<a name="ntpd-modifymmtimer"></a>Next: <a rel="next" accesskey="n" href="#ntpd-nice">ntpd nice</a>, 579285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-novirtualips">ntpd novirtualips</a>, 580285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 581285809Sscottl<br> 582285809Sscottl</div> 583285809Sscottl 584285809Sscottl<h4 class="subsection">modifymmtimer option (-M)</h4> 585285809Sscottl 586285809Sscottl<p><a name="index-ntpd_002dmodifymmtimer-17"></a> 587285809SscottlThis is the “modify multimedia timer (windows only)” option. 588285809Sscottl 589285809Sscottl<p class="noindent">This option has some usage constraints. It: 590285809Sscottl <ul> 591285809Sscottl<li>must be compiled in by defining <code>SYS_WINNT</code> during the compilation. 592285809Sscottl</ul> 593285809Sscottl 594285809Sscottl <p>Set the Windows Multimedia Timer to highest resolution. This 595285809Sscottlensures the resolution does not change while ntpd is running, 596285809Sscottlavoiding timekeeping glitches associated with changes. 597285809Sscottl<div class="node"> 598285809Sscottl<p><hr> 599285809Sscottl<a name="ntpd-nice"></a>Next: <a rel="next" accesskey="n" href="#ntpd-pidfile">ntpd pidfile</a>, 600285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-modifymmtimer">ntpd modifymmtimer</a>, 601285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 602285809Sscottl<br> 603285809Sscottl</div> 604285809Sscottl 605285809Sscottl<h4 class="subsection">nice option (-N)</h4> 606285809Sscottl 607285809Sscottl<p><a name="index-ntpd_002dnice-18"></a> 608285809SscottlThis is the “run at high priority” option. 609285809SscottlTo the extent permitted by the operating system, run 610285809Sscottl<code>ntpd</code> 611285809Sscottlat the highest priority. 612285809Sscottl<div class="node"> 613285809Sscottl<p><hr> 614285809Sscottl<a name="ntpd-pidfile"></a>Next: <a rel="next" accesskey="n" href="#ntpd-priority">ntpd priority</a>, 615285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-nice">ntpd nice</a>, 616285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 617285809Sscottl<br> 618285809Sscottl</div> 619285809Sscottl 620285809Sscottl<h4 class="subsection">pidfile option (-p)</h4> 621285809Sscottl 622285809Sscottl<p><a name="index-ntpd_002dpidfile-19"></a> 623285809SscottlThis is the “path to the pid file” option. 624285809SscottlThis option takes a string argument. 625285809SscottlSpecify the name and path of the file used to record 626285809Sscottl<code>ntpd</code>'s 627285809Sscottlprocess ID. 628285809SscottlThis is the same operation as the 629285809Sscottl<code>pidfile</code> <kbd>pidfile</kbd> 630285809Sscottlconfiguration file directive. 631285809Sscottl<div class="node"> 632285809Sscottl<p><hr> 633285809Sscottl<a name="ntpd-priority"></a>Next: <a rel="next" accesskey="n" href="#ntpd-quit">ntpd quit</a>, 634285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-pidfile">ntpd pidfile</a>, 635285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 636285809Sscottl<br> 637285809Sscottl</div> 638285809Sscottl 639285809Sscottl<h4 class="subsection">priority option (-P)</h4> 640285809Sscottl 641285809Sscottl<p><a name="index-ntpd_002dpriority-20"></a> 642285809SscottlThis is the “process priority” option. 643285809SscottlThis option takes a number argument. 644285809SscottlTo the extent permitted by the operating system, run 645285809Sscottl<code>ntpd</code> 646285809Sscottlat the specified 647285809Sscottl<code>sched_setscheduler(SCHED_FIFO)</code> 648285809Sscottlpriority. 649285809Sscottl<div class="node"> 650285809Sscottl<p><hr> 651285809Sscottl<a name="ntpd-quit"></a>Next: <a rel="next" accesskey="n" href="#ntpd-propagationdelay">ntpd propagationdelay</a>, 652285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-priority">ntpd priority</a>, 653285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 654285809Sscottl<br> 655285809Sscottl</div> 656285809Sscottl 657285809Sscottl<h4 class="subsection">quit option (-q)</h4> 658285809Sscottl 659285809Sscottl<p><a name="index-ntpd_002dquit-21"></a> 660285809SscottlThis is the “set the time and quit” option. 661285809Sscottl 662285809Sscottl<p class="noindent">This option has some usage constraints. It: 663285809Sscottl <ul> 664285809Sscottl<li>must not appear in combination with any of the following options: 665285809Sscottlsaveconfigquit, wait-sync. 666285809Sscottl</ul> 667285809Sscottl 668285809Sscottl <p><code>ntpd</code> 669285809Sscottlwill not daemonize and will exit after the clock is first 670285809Sscottlsynchronized. This behavior mimics that of the 671285809Sscottl<code>ntpdate</code> 672285809Sscottlprogram, which will soon be replaced with a shell script. 673285809SscottlThe 674285809Sscottl<code>-g</code> 675285809Sscottland 676285809Sscottl<code>-x</code> 677285809Sscottloptions can be used with this option. 678285809SscottlNote: The kernel time discipline is disabled with this option. 679285809Sscottl<div class="node"> 680285809Sscottl<p><hr> 681285809Sscottl<a name="ntpd-propagationdelay"></a>Next: <a rel="next" accesskey="n" href="#ntpd-saveconfigquit">ntpd saveconfigquit</a>, 682285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-quit">ntpd quit</a>, 683285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 684285809Sscottl<br> 685285809Sscottl</div> 686285809Sscottl 687285809Sscottl<h4 class="subsection">propagationdelay option (-r)</h4> 688285809Sscottl 689285809Sscottl<p><a name="index-ntpd_002dpropagationdelay-22"></a> 690285809SscottlThis is the “broadcast/propagation delay” option. 691285809SscottlThis option takes a string argument. 692285809SscottlSpecify 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. 693285809Sscottl<div class="node"> 694285809Sscottl<p><hr> 695285809Sscottl<a name="ntpd-saveconfigquit"></a>Next: <a rel="next" accesskey="n" href="#ntpd-statsdir">ntpd statsdir</a>, 696285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-propagationdelay">ntpd propagationdelay</a>, 697285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 698285809Sscottl<br> 699285809Sscottl</div> 700285809Sscottl 701285809Sscottl<h4 class="subsection">saveconfigquit option</h4> 702285809Sscottl 703285809Sscottl<p><a name="index-ntpd_002dsaveconfigquit-23"></a> 704285809SscottlThis is the “save parsed configuration and quit” option. 705285809SscottlThis option takes a string argument. 706285809Sscottl 707285809Sscottl<p class="noindent">This option has some usage constraints. It: 708285809Sscottl <ul> 709285809Sscottl<li>must be compiled in by defining <code>SAVECONFIG</code> during the compilation. 710285809Sscottl<li>must not appear in combination with any of the following options: 711285809Sscottlquit, wait-sync. 712285809Sscottl</ul> 713285809Sscottl 714285809Sscottl <p>Cause <code>ntpd</code> to parse its startup configuration file and save an 715285809Sscottlequivalent to the given filename and exit. This option was 716285809Sscottldesigned for automated testing. 717285809Sscottl<div class="node"> 718285809Sscottl<p><hr> 719285809Sscottl<a name="ntpd-statsdir"></a>Next: <a rel="next" accesskey="n" href="#ntpd-trustedkey">ntpd trustedkey</a>, 720285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-saveconfigquit">ntpd saveconfigquit</a>, 721285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 722285809Sscottl<br> 723285809Sscottl</div> 724285809Sscottl 725285809Sscottl<h4 class="subsection">statsdir option (-s)</h4> 726285809Sscottl 727285809Sscottl<p><a name="index-ntpd_002dstatsdir-24"></a> 728285809SscottlThis is the “statistics file location” option. 729285809SscottlThis option takes a string argument. 730285809SscottlSpecify the directory path for files created by the statistics facility. 731285809SscottlThis is the same operation as the 732285809Sscottl<code>statsdir</code> <kbd>statsdir</kbd> 733285809Sscottlconfiguration file directive. 734285809Sscottl<div class="node"> 735285809Sscottl<p><hr> 736285809Sscottl<a name="ntpd-trustedkey"></a>Next: <a rel="next" accesskey="n" href="#ntpd-user">ntpd user</a>, 737285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-statsdir">ntpd statsdir</a>, 738285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 739285809Sscottl<br> 740285809Sscottl</div> 741285809Sscottl 742285809Sscottl<h4 class="subsection">trustedkey option (-t)</h4> 743285809Sscottl 744285809Sscottl<p><a name="index-ntpd_002dtrustedkey-25"></a> 745285809SscottlThis is the “trusted key number” option. 746285809SscottlThis option takes a string argument <span class="file">tkey</span>. 747285809Sscottl 748285809Sscottl<p class="noindent">This option has some usage constraints. It: 749285809Sscottl <ul> 750285809Sscottl<li>may appear an unlimited number of times. 751285809Sscottl</ul> 752285809Sscottl 753285809Sscottl <p>Add the specified key number to the trusted key list. 754285809Sscottl<div class="node"> 755285809Sscottl<p><hr> 756285809Sscottl<a name="ntpd-user"></a>Next: <a rel="next" accesskey="n" href="#ntpd-updateinterval">ntpd updateinterval</a>, 757285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-trustedkey">ntpd trustedkey</a>, 758285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 759285809Sscottl<br> 760285809Sscottl</div> 761285809Sscottl 762285809Sscottl<h4 class="subsection">user option (-u)</h4> 763285809Sscottl 764285809Sscottl<p><a name="index-ntpd_002duser-26"></a> 765285809SscottlThis is the “run as userid (or userid:groupid)” option. 766285809SscottlThis option takes a string argument. 767285809Sscottl 768285809Sscottl<p class="noindent">This option has some usage constraints. It: 769285809Sscottl <ul> 770285809Sscottl<li>must be compiled in by defining <code>HAVE_DROPROOT</code> during the compilation. 771285809Sscottl</ul> 772285809Sscottl 773285809Sscottl <p>Specify a user, and optionally a group, to switch to. 774285809SscottlThis option is only available if the OS supports adjusting the clock 775285809Sscottlwithout full root privileges. 776285809SscottlThis option is supported under NetBSD (configure with 777285809Sscottl<code>--enable-clockctl</code>) or Linux (configure with 778285809Sscottl<code>--enable-linuxcaps</code>) or Solaris (configure with <code>--enable-solarisprivs</code>). 779285809Sscottl<div class="node"> 780285809Sscottl<p><hr> 781285809Sscottl<a name="ntpd-updateinterval"></a>Next: <a rel="next" accesskey="n" href="#ntpd-wait_002dsync">ntpd wait-sync</a>, 782285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-user">ntpd user</a>, 783285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 784285809Sscottl<br> 785285809Sscottl</div> 786285809Sscottl 787285809Sscottl<h4 class="subsection">updateinterval option (-U)</h4> 788285809Sscottl 789285809Sscottl<p><a name="index-ntpd_002dupdateinterval-27"></a> 790285809SscottlThis is the “interval in seconds between scans for new or dropped interfaces” option. 791285809SscottlThis option takes a number argument. 792285809SscottlGive the time in seconds between two scans for new or dropped interfaces. 793285809SscottlFor systems with routing socket support the scans will be performed shortly after the interface change 794285809Sscottlhas been detected by the system. 795285809SscottlUse 0 to disable scanning. 60 seconds is the minimum time between scans. 796285809Sscottl<div class="node"> 797285809Sscottl<p><hr> 798285809Sscottl<a name="ntpd-wait_002dsync"></a>Next: <a rel="next" accesskey="n" href="#ntpd-slew">ntpd slew</a>, 799285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-updateinterval">ntpd updateinterval</a>, 800285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 801285809Sscottl<br> 802285809Sscottl</div> 803285809Sscottl 804285809Sscottl<h4 class="subsection">wait-sync option (-w)</h4> 805285809Sscottl 806285809Sscottl<p><a name="index-ntpd_002dwait_002dsync-28"></a> 807285809SscottlThis is the “seconds to wait for first clock sync” option. 808285809SscottlThis option takes a number argument. 809285809Sscottl 810285809Sscottl<p class="noindent">This option has some usage constraints. It: 811285809Sscottl <ul> 812285809Sscottl<li>must be compiled in by defining <code>HAVE_WORKING_FORK</code> during the compilation. 813285809Sscottl<li>must not appear in combination with any of the following options: 814285809Sscottlnofork, quit, saveconfigquit. 815285809Sscottl</ul> 816285809Sscottl 817285809Sscottl <p>If greater than zero, alters <code>ntpd</code>'s behavior when forking to 818285809Sscottldaemonize. Instead of exiting with status 0 immediately after 819285809Sscottlthe fork, the parent waits up to the specified number of 820285809Sscottlseconds for the child to first synchronize the clock. The exit 821285809Sscottlstatus is zero (success) if the clock was synchronized, 822285809Sscottlotherwise it is <code>ETIMEDOUT</code>. 823285809SscottlThis provides the option for a script starting <code>ntpd</code> to easily 824285809Sscottlwait for the first set of the clock before proceeding. 825285809Sscottl<div class="node"> 826285809Sscottl<p><hr> 827285809Sscottl<a name="ntpd-slew"></a>Next: <a rel="next" accesskey="n" href="#ntpd-usepcc">ntpd usepcc</a>, 828285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-wait_002dsync">ntpd wait-sync</a>, 829285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 830285809Sscottl<br> 831285809Sscottl</div> 832285809Sscottl 833285809Sscottl<h4 class="subsection">slew option (-x)</h4> 834285809Sscottl 835285809Sscottl<p><a name="index-ntpd_002dslew-29"></a> 836285809SscottlThis is the “slew up to 600 seconds” option. 837285809SscottlNormally, 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. 838285809SscottlThis option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually. 839285809SscottlNote: 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. 840285809SscottlThus, an adjustment as much as 600 s will take almost 14 days to complete. 841285809SscottlThis option can be used with the 842285809Sscottl<code>-g</code> 843285809Sscottland 844285809Sscottl<code>-q</code> 845285809Sscottloptions. 846285809SscottlSee the 847285809Sscottl<code>tinker</code> 848285809Sscottlconfiguration file directive for other options. 849285809SscottlNote: The kernel time discipline is disabled with this option. 850285809Sscottl<div class="node"> 851285809Sscottl<p><hr> 852285809Sscottl<a name="ntpd-usepcc"></a>Next: <a rel="next" accesskey="n" href="#ntpd-pccfreq">ntpd pccfreq</a>, 853285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-slew">ntpd slew</a>, 854285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 855285809Sscottl<br> 856285809Sscottl</div> 857285809Sscottl 858285809Sscottl<h4 class="subsection">usepcc option</h4> 859285809Sscottl 860285809Sscottl<p><a name="index-ntpd_002dusepcc-30"></a> 861285809SscottlThis is the “use cpu cycle counter (windows only)” option. 862285809Sscottl 863285809Sscottl<p class="noindent">This option has some usage constraints. It: 864285809Sscottl <ul> 865285809Sscottl<li>must be compiled in by defining <code>SYS_WINNT</code> during the compilation. 866285809Sscottl</ul> 867285809Sscottl 868285809Sscottl <p>Attempt to substitute the CPU counter for <code>QueryPerformanceCounter</code>. 869285809SscottlThe CPU counter and <code>QueryPerformanceCounter</code> are compared, and if 870285809Sscottlthey have the same frequency, the CPU counter (RDTSC on x86) is 871285809Sscottlused directly, saving the overhead of a system call. 872285809Sscottl<div class="node"> 873285809Sscottl<p><hr> 874285809Sscottl<a name="ntpd-pccfreq"></a>Next: <a rel="next" accesskey="n" href="#ntpd-mdns">ntpd mdns</a>, 875285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-usepcc">ntpd usepcc</a>, 876285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 877285809Sscottl<br> 878285809Sscottl</div> 879285809Sscottl 880285809Sscottl<h4 class="subsection">pccfreq option</h4> 881285809Sscottl 882285809Sscottl<p><a name="index-ntpd_002dpccfreq-31"></a> 883285809SscottlThis is the “force cpu cycle counter use (windows only)” option. 884285809SscottlThis option takes a string argument. 885285809Sscottl 886285809Sscottl<p class="noindent">This option has some usage constraints. It: 887285809Sscottl <ul> 888285809Sscottl<li>must be compiled in by defining <code>SYS_WINNT</code> during the compilation. 889285809Sscottl</ul> 890285809Sscottl 891285809Sscottl <p>Force substitution the CPU counter for <code>QueryPerformanceCounter</code>. 892285809SscottlThe CPU counter (RDTSC on x86) is used unconditionally with the 893285809Sscottlgiven frequency (in Hz). 894285809Sscottl<div class="node"> 895285809Sscottl<p><hr> 896285809Sscottl<a name="ntpd-mdns"></a>Next: <a rel="next" accesskey="n" href="#ntpd-config">ntpd config</a>, 897285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-pccfreq">ntpd pccfreq</a>, 898285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 899285809Sscottl<br> 900285809Sscottl</div> 901285809Sscottl 902285809Sscottl<h4 class="subsection">mdns option (-m)</h4> 903285809Sscottl 904285809Sscottl<p><a name="index-ntpd_002dmdns-32"></a> 905285809SscottlThis is the “register with mdns as a ntp server” option. 906285809Sscottl 907285809Sscottl<p class="noindent">This option has some usage constraints. It: 908285809Sscottl <ul> 909285809Sscottl<li>must be compiled in by defining <code>HAVE_DNSREGISTRATION</code> during the compilation. 910285809Sscottl</ul> 911285809Sscottl 912285809Sscottl <p>Registers as an NTP server with the local mDNS server which allows 913285809Sscottlthe server to be discovered via mDNS client lookup. 914285809Sscottl 915285809Sscottl<div class="node"> 916285809Sscottl<p><hr> 917285809Sscottl<a name="ntpd-config"></a>Next: <a rel="next" accesskey="n" href="#ntpd-exit-status">ntpd exit status</a>, 918285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-mdns">ntpd mdns</a>, 919285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 920285809Sscottl<br> 921285809Sscottl</div> 922285809Sscottl 923285809Sscottl<h4 class="subsection">presetting/configuring ntpd</h4> 924285809Sscottl 925285809Sscottl<p>Any option that is not marked as <i>not presettable</i> may be preset by 926285809Sscottlloading values from environment variables named <code>NTPD</code> and <code>NTPD_<OPTION_NAME></code>. <code><OPTION_NAME></code> must be one of 927285809Sscottlthe options listed above in upper case and segmented with underscores. 928285809SscottlThe <code>NTPD</code> variable will be tokenized and parsed like 929285809Sscottlthe command line. The remaining variables are tested for existence and their 930285809Sscottlvalues are treated like option arguments. 931285809Sscottl 932285809Sscottl <p>The command line options relating to configuration and/or usage help are: 933285809Sscottl 934285809Sscottl<h5 class="subsubheading">version (-)</h5> 935285809Sscottl 936285809Sscottl<p>Print the program version to standard out, optionally with licensing 937285809Sscottlinformation, then exit 0. The optional argument specifies how much licensing 938285809Sscottldetail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument. 939285809SscottlOnly the first letter of the argument is examined: 940285809Sscottl 941285809Sscottl <dl> 942285809Sscottl<dt><span class="samp">version</span><dd>Only print the version. This is the default. 943285809Sscottl<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms. 944285809Sscottl<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms. 945285809Sscottl</dl> 946285809Sscottl 947285809Sscottl<div class="node"> 948285809Sscottl<p><hr> 949285809Sscottl<a name="ntpd-exit-status"></a>Next: <a rel="next" accesskey="n" href="#ntpd-Usage">ntpd Usage</a>, 950285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-config">ntpd config</a>, 951285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 952285809Sscottl<br> 953285809Sscottl</div> 954285809Sscottl 955285809Sscottl<h4 class="subsection">ntpd exit status</h4> 956285809Sscottl 957285809Sscottl<p>One of the following exit values will be returned: 958285809Sscottl <dl> 959285809Sscottl<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution. 960285809Sscottl<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid. 961285809Sscottl</dl> 962285809Sscottl <div class="node"> 963285809Sscottl<p><hr> 964285809Sscottl<a name="ntpd-Usage"></a>Next: <a rel="next" accesskey="n" href="#ntpd-Files">ntpd Files</a>, 965285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-exit-status">ntpd exit status</a>, 966285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 967285809Sscottl<br> 968285809Sscottl</div> 969285809Sscottl 970285809Sscottl<h4 class="subsection">ntpd Usage</h4> 971285809Sscottl 972285809Sscottl<div class="node"> 973285809Sscottl<p><hr> 974285809Sscottl<a name="ntpd-Files"></a>Next: <a rel="next" accesskey="n" href="#ntpd-See-Also">ntpd See Also</a>, 975285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-Usage">ntpd Usage</a>, 976285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 977285809Sscottl<br> 978285809Sscottl</div> 979285809Sscottl 980285809Sscottl<h4 class="subsection">ntpd Files</h4> 981285809Sscottl 982285809Sscottl<div class="node"> 983285809Sscottl<p><hr> 984285809Sscottl<a name="ntpd-See-Also"></a>Next: <a rel="next" accesskey="n" href="#ntpd-Bugs">ntpd Bugs</a>, 985285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-Files">ntpd Files</a>, 986285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 987285809Sscottl<br> 988285809Sscottl</div> 989285809Sscottl 990285809Sscottl<h4 class="subsection">ntpd See Also</h4> 991285809Sscottl 992285809Sscottl<div class="node"> 993285809Sscottl<p><hr> 994285809Sscottl<a name="ntpd-Bugs"></a>Next: <a rel="next" accesskey="n" href="#ntpd-Notes">ntpd Notes</a>, 995285809SscottlPrevious: <a rel="previous" accesskey="p" href="#ntpd-See-Also">ntpd See Also</a>, 996285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 997285809Sscottl<br> 998285809Sscottl</div> 999285809Sscottl 1000285809Sscottl<h4 class="subsection">ntpd Bugs</h4> 1001285809Sscottl 1002285809Sscottl<div class="node"> 1003285809Sscottl<p><hr> 1004285809Sscottl<a name="ntpd-Notes"></a>Previous: <a rel="previous" accesskey="p" href="#ntpd-Bugs">ntpd Bugs</a>, 1005285809SscottlUp: <a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a> 1006285809Sscottl<br> 1007285809Sscottl</div> 1008285809Sscottl 1009285809Sscottl<h4 class="subsection">ntpd Notes</h4> 1010285809Sscottl 1011285809Sscottl<div class="node"> 1012285809Sscottl<p><hr> 1013285809Sscottl<a name="Usage"></a> 1014285809Sscottl<br> 1015285809Sscottl</div> 1016285809Sscottl 1017285809Sscottl<!-- node-name, next, previous, up --> 1018285809Sscottl<h3 class="section">Usage</h3> 1019285809Sscottl 1020285809Sscottl