1052d159aSCy Schubert<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2052d159aSCy Schubert<html>
3052d159aSCy Schubert<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
42b15cb3dSCy Schubert<head>
5052d159aSCy Schubert<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6052d159aSCy Schubert<title>Ntp-wait User&rsquo;s Manual</title>
7052d159aSCy Schubert
8052d159aSCy Schubert<meta name="description" content="Ntp-wait User&rsquo;s Manual">
9052d159aSCy Schubert<meta name="keywords" content="Ntp-wait User&rsquo;s Manual">
10052d159aSCy Schubert<meta name="resource-type" content="document">
11052d159aSCy Schubert<meta name="distribution" content="global">
12052d159aSCy Schubert<meta name="Generator" content="makeinfo">
13052d159aSCy Schubert<link href="#Top" rel="start" title="Top">
14052d159aSCy Schubert<link href="dir.html#Top" rel="up" title="(dir)">
15052d159aSCy Schubert<style type="text/css">
16052d159aSCy Schubert<!--
17052d159aSCy Schuberta.summary-letter {text-decoration: none}
18052d159aSCy Schubertblockquote.indentedblock {margin-right: 0em}
19052d159aSCy Schubertblockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
20052d159aSCy Schubertblockquote.smallquotation {font-size: smaller}
21052d159aSCy Schubertdiv.display {margin-left: 3.2em}
22052d159aSCy Schubertdiv.example {margin-left: 3.2em}
23052d159aSCy Schubertdiv.lisp {margin-left: 3.2em}
24052d159aSCy Schubertdiv.smalldisplay {margin-left: 3.2em}
25052d159aSCy Schubertdiv.smallexample {margin-left: 3.2em}
26052d159aSCy Schubertdiv.smalllisp {margin-left: 3.2em}
27052d159aSCy Schubertkbd {font-style: oblique}
282b15cb3dSCy Schubertpre.display {font-family: inherit}
292b15cb3dSCy Schubertpre.format {font-family: inherit}
30052d159aSCy Schubertpre.menu-comment {font-family: serif}
31052d159aSCy Schubertpre.menu-preformatted {font-family: serif}
322b15cb3dSCy Schubertpre.smalldisplay {font-family: inherit; font-size: smaller}
332b15cb3dSCy Schubertpre.smallexample {font-size: smaller}
34052d159aSCy Schubertpre.smallformat {font-family: inherit; font-size: smaller}
352b15cb3dSCy Schubertpre.smalllisp {font-size: smaller}
36052d159aSCy Schubertspan.nolinebreak {white-space: nowrap}
37052d159aSCy Schubertspan.roman {font-family: initial; font-weight: normal}
38052d159aSCy Schubertspan.sansserif {font-family: sans-serif; font-weight: normal}
39052d159aSCy Schubertul.no-bullet {list-style: none}
40052d159aSCy Schubert-->
41052d159aSCy Schubert</style>
42052d159aSCy Schubert
43052d159aSCy Schubert
442b15cb3dSCy Schubert</head>
45052d159aSCy Schubert
46052d159aSCy Schubert<body lang="en">
47052d159aSCy Schubert<h1 class="settitle" align="center">Ntp-wait User&rsquo;s Manual</h1>
48052d159aSCy Schubert
49052d159aSCy Schubert
50052d159aSCy Schubert
51052d159aSCy Schubert
52052d159aSCy Schubert
53052d159aSCy Schubert<a name="Top"></a>
54052d159aSCy Schubert<div class="header">
55052d159aSCy Schubert<p>
56052d159aSCy SchubertPrevious: <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>
572b15cb3dSCy Schubert</div>
58052d159aSCy Schubert<h1 class="node-heading">Top</h1>
592b15cb3dSCy Schubert
60052d159aSCy Schubert<p>This document describes the use of the NTP Project&rsquo;s <code>ntp-wait</code> program.
61052d159aSCy Schubert</p>
622b15cb3dSCy Schubert<p>If there are time-sensitive applications,
632b15cb3dSCy Schubertthe proper sequence of events is to
642b15cb3dSCy Schubertrun <code>ntpd -g</code> as early as possible,
652b15cb3dSCy Schubertthen invoke all of the non-time-sensitive process,
662b15cb3dSCy Schubertrun <code>ntp-wait</code> to block
67052d159aSCy Schubertuntil the system&rsquo;s time has stabilized and synchronized,
682b15cb3dSCy Schubertand only then start any applicaitons (like database servers) that require
692b15cb3dSCy Schubertaccurate and stable time.
70052d159aSCy Schubert</p>
71052d159aSCy Schubert<p>This document applies to version 4.2.8p13 of <code>ntp-wait</code>.
72052d159aSCy Schubert</p>
73052d159aSCy Schubert<a name="SEC_Overview"></a>
74052d159aSCy Schubert<h2 class="shortcontents-heading">Short Table of Contents</h2>
752b15cb3dSCy Schubert
762b15cb3dSCy Schubert<div class="shortcontents">
77052d159aSCy Schubert<li><a name="stoc-Invoking-ntp_002dwait" href="#toc-Invoking-ntp_002dwait">1 Invoking ntp-wait</a></li>
78052d159aSCy Schubert
792b15cb3dSCy Schubert</div>
802b15cb3dSCy Schubert
812b15cb3dSCy Schubert
82052d159aSCy Schubert<table class="menu" border="0" cellspacing="0">
83052d159aSCy Schubert<tr><td align="left" valign="top">&bull; ntp-wait Description:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
84052d159aSCy Schubert</td></tr>
85052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-Invocation" accesskey="2">ntp-wait Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntp-wait
86052d159aSCy Schubert</td></tr>
87052d159aSCy Schubert</table>
88052d159aSCy Schubert
89052d159aSCy Schubert<hr>
902b15cb3dSCy Schubert<a name="ntp_002dwait-Invocation"></a>
91052d159aSCy Schubert<div class="header">
92052d159aSCy Schubert<p>
93052d159aSCy SchubertUp: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
942b15cb3dSCy Schubert</div>
95052d159aSCy Schubert<a name="Invoking-ntp_002dwait"></a>
96052d159aSCy Schubert<h3 class="section">1 Invoking ntp-wait</h3>
97052d159aSCy Schubert<a name="index-ntp_002dwait"></a>
98052d159aSCy Schubert<a name="index-Wait-for-ntpd-to-stabilize-the-system-clock"></a>
992b15cb3dSCy Schubert
1002b15cb3dSCy Schubert
1012b15cb3dSCy Schubert
1022b15cb3dSCy Schubert<p><code>ntp-wait</code>
1032b15cb3dSCy Schubertwill send at most
1042b15cb3dSCy Schubert<kbd>num-tries</kbd>
1052b15cb3dSCy Schubertqueries to
1062b15cb3dSCy Schubert<code>ntpd(8)</code>,
1072b15cb3dSCy Schubertsleeping for
1082b15cb3dSCy Schubert<kbd>secs-between-tries</kbd>
1092b15cb3dSCy Schubertafter each status return that says
1102b15cb3dSCy Schubert<code>ntpd(8)</code>
1112b15cb3dSCy Schuberthas not yet produced a synchronized and stable system clock.
112052d159aSCy Schubert</p>
1132b15cb3dSCy Schubert<p><code>ntp-wait</code>
1142b15cb3dSCy Schubertwill do this quietly, unless the
1152b15cb3dSCy Schubert<code>-v</code>
1162b15cb3dSCy Schubertflag is provided.
1172b15cb3dSCy SchubertThis can be useful at boot time, to delay the boot sequence until after
1182b15cb3dSCy Schubert<kbd>ntpd</kbd> <kbd>-g</kbd>
1192b15cb3dSCy Schuberthas set the time.
120052d159aSCy Schubert</p>
1212b15cb3dSCy Schubert<p>This section was generated by <strong>AutoGen</strong>,
1222b15cb3dSCy Schubertusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp-wait</code> program.
123052d159aSCy Schubert</p>
124052d159aSCy Schubert<table class="menu" border="0" cellspacing="0">
125052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-usage" accesskey="1">ntp-wait usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntp-wait help/usage (<samp>--help</samp>)
126052d159aSCy Schubert</td></tr>
127052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-tries" accesskey="2">ntp-wait tries</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">tries option (-n)
128052d159aSCy Schubert</td></tr>
129052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-sleep" accesskey="3">ntp-wait sleep</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">sleep option (-s)
130052d159aSCy Schubert</td></tr>
131052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-verbose" accesskey="4">ntp-wait verbose</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">verbose option (-v)
132052d159aSCy Schubert</td></tr>
133052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-exit-status" accesskey="5">ntp-wait exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
134052d159aSCy Schubert</td></tr>
135052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-Authors" accesskey="6">ntp-wait Authors</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authors
136052d159aSCy Schubert</td></tr>
137052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-Notes" accesskey="7">ntp-wait Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
138052d159aSCy Schubert</td></tr>
139052d159aSCy Schubert</table>
1402b15cb3dSCy Schubert
141052d159aSCy Schubert<hr>
142052d159aSCy Schubert<a name="ntp_002dwait-usage"></a>
143052d159aSCy Schubert<div class="header">
144052d159aSCy Schubert<p>
145052d159aSCy SchubertNext: <a href="#ntp_002dwait-tries" accesskey="n" rel="next">ntp-wait tries</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
1462b15cb3dSCy Schubert</div>
147052d159aSCy Schubert<a name="ntp_002dwait-help_002fusage-_0028_002d_002dhelp_0029"></a>
148052d159aSCy Schubert<h4 class="subsection">1.1 ntp-wait help/usage (<samp>--help</samp>)</h4>
149052d159aSCy Schubert<a name="index-ntp_002dwait-help"></a>
1502b15cb3dSCy Schubert
151052d159aSCy Schubert<p>This is the automatically generated usage text for ntp-wait.
152052d159aSCy Schubert</p>
1532b15cb3dSCy Schubert<p>The text printed is the same whether selected with the <code>help</code> option
154052d159aSCy Schubert(<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>).  <code>more-help</code> will print
1552b15cb3dSCy Schubertthe usage text by passing it through a pager program.
1562b15cb3dSCy Schubert<code>more-help</code> is disabled on platforms without a working
1572b15cb3dSCy Schubert<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
158052d159aSCy Schubertused to select the program, defaulting to <samp>more</samp>.  Both will exit
1592b15cb3dSCy Schubertwith a status code of 0.
160052d159aSCy Schubert</p>
161052d159aSCy Schubert<div class="example">
162052d159aSCy Schubert<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p13
1632b15cb3dSCy SchubertUSAGE: ntp-wait [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
1642b15cb3dSCy Schubert
1652b15cb3dSCy Schubert    -n, --tries=num              Number of times to check ntpd
1662b15cb3dSCy Schubert    -s, --sleep=num              How long to sleep between tries
1672b15cb3dSCy Schubert    -v, --verbose                Be verbose
1682b15cb3dSCy Schubert    -?, --help                   Display usage information and exit
1692b15cb3dSCy Schubert        --more-help              Pass the extended usage text through a pager
1702b15cb3dSCy Schubert
1712b15cb3dSCy SchubertOptions are specified by doubled hyphens and their name or by a single
1722b15cb3dSCy Schuberthyphen and the flag character.
173052d159aSCy Schubert</pre></div>
174052d159aSCy Schubert
175052d159aSCy Schubert<hr>
176052d159aSCy Schubert<a name="ntp_002dwait-tries"></a>
177052d159aSCy Schubert<div class="header">
178052d159aSCy Schubert<p>
179052d159aSCy SchubertNext: <a href="#ntp_002dwait-sleep" accesskey="n" rel="next">ntp-wait sleep</a>, Previous: <a href="#ntp_002dwait-usage" accesskey="p" rel="prev">ntp-wait usage</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
1802b15cb3dSCy Schubert</div>
181052d159aSCy Schubert<a name="tries-option-_0028_002dn_0029"></a>
182052d159aSCy Schubert<h4 class="subsection">1.2 tries option (-n)</h4>
183052d159aSCy Schubert<a name="index-ntp_002dwait_002dtries"></a>
1842b15cb3dSCy Schubert
185052d159aSCy Schubert<p>This is the &ldquo;number of times to check ntpd&rdquo; option.
1862b15cb3dSCy SchubertThis option takes a number argument.
1872b15cb3dSCy Schubert        The maximum number of times we will check <code>ntpd</code> to see if
1882b15cb3dSCy Schubert        it has been able to synchronize and stabilize the system clock.
189052d159aSCy Schubert</p><hr>
190052d159aSCy Schubert<a name="ntp_002dwait-sleep"></a>
191052d159aSCy Schubert<div class="header">
192052d159aSCy Schubert<p>
193052d159aSCy SchubertNext: <a href="#ntp_002dwait-verbose" accesskey="n" rel="next">ntp-wait verbose</a>, Previous: <a href="#ntp_002dwait-tries" accesskey="p" rel="prev">ntp-wait tries</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
1942b15cb3dSCy Schubert</div>
195052d159aSCy Schubert<a name="sleep-option-_0028_002ds_0029"></a>
196052d159aSCy Schubert<h4 class="subsection">1.3 sleep option (-s)</h4>
197052d159aSCy Schubert<a name="index-ntp_002dwait_002dsleep"></a>
1982b15cb3dSCy Schubert
199052d159aSCy Schubert<p>This is the &ldquo;how long to sleep between tries&rdquo; option.
200052d159aSCy SchubertThis option takes a number argument <samp>secs-between-tries</samp>.
201052d159aSCy Schubert        We will sleep for <samp>secs-between-tries</samp> after each query
202052d159aSCy Schubert        of <code>ntpd</code> that returns &quot;the time is not yet stable&quot;.
203052d159aSCy Schubert</p><hr>
204052d159aSCy Schubert<a name="ntp_002dwait-verbose"></a>
205052d159aSCy Schubert<div class="header">
206052d159aSCy Schubert<p>
207052d159aSCy SchubertNext: <a href="#ntp_002dwait-exit-status" accesskey="n" rel="next">ntp-wait exit status</a>, Previous: <a href="#ntp_002dwait-sleep" accesskey="p" rel="prev">ntp-wait sleep</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
2082b15cb3dSCy Schubert</div>
209052d159aSCy Schubert<a name="verbose-option-_0028_002dv_0029"></a>
210052d159aSCy Schubert<h4 class="subsection">1.4 verbose option (-v)</h4>
211052d159aSCy Schubert<a name="index-ntp_002dwait_002dverbose"></a>
2122b15cb3dSCy Schubert
213052d159aSCy Schubert<p>This is the &ldquo;be verbose&rdquo; option.
2142b15cb3dSCy Schubert        By default, <code>ntp-wait</code> is silent.
2152b15cb3dSCy Schubert        With this option, <code>ntp-wait</code> will provide status information.
216052d159aSCy Schubert</p><hr>
217052d159aSCy Schubert<a name="ntp_002dwait-exit-status"></a>
218052d159aSCy Schubert<div class="header">
219052d159aSCy Schubert<p>
220052d159aSCy SchubertNext: <a href="#ntp_002dwait-Authors" accesskey="n" rel="next">ntp-wait Authors</a>, Previous: <a href="#ntp_002dwait-verbose" accesskey="p" rel="prev">ntp-wait verbose</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
2212b15cb3dSCy Schubert</div>
222052d159aSCy Schubert<a name="ntp_002dwait-exit-status-1"></a>
223052d159aSCy Schubert<h4 class="subsection">1.5 ntp-wait exit status</h4>
2242b15cb3dSCy Schubert
2252b15cb3dSCy Schubert<p>One of the following exit values will be returned:
226052d159aSCy Schubert</p><dl compact="compact">
227052d159aSCy Schubert<dt>&lsquo;<samp>0 (EXIT_SUCCESS)</samp>&rsquo;</dt>
228052d159aSCy Schubert<dd><p>Successful program execution.
229052d159aSCy Schubert</p></dd>
230052d159aSCy Schubert<dt>&lsquo;<samp>1 (EXIT_FAILURE)</samp>&rsquo;</dt>
231052d159aSCy Schubert<dd><p>The operation failed or the command syntax was not valid.
232052d159aSCy Schubert</p></dd>
2332b15cb3dSCy Schubert</dl>
234052d159aSCy Schubert<hr>
235052d159aSCy Schubert<a name="ntp_002dwait-Authors"></a>
236052d159aSCy Schubert<div class="header">
237052d159aSCy Schubert<p>
238052d159aSCy SchubertNext: <a href="#ntp_002dwait-Notes" accesskey="n" rel="next">ntp-wait Notes</a>, Previous: <a href="#ntp_002dwait-exit-status" accesskey="p" rel="prev">ntp-wait exit status</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
2392b15cb3dSCy Schubert</div>
240052d159aSCy Schubert<a name="ntp_002dwait-Authors-1"></a>
241052d159aSCy Schubert<h4 class="subsection">1.6 ntp-wait Authors</h4>
242052d159aSCy Schubert<hr>
243052d159aSCy Schubert<a name="ntp_002dwait-Notes"></a>
244052d159aSCy Schubert<div class="header">
245052d159aSCy Schubert<p>
246052d159aSCy SchubertPrevious: <a href="#ntp_002dwait-Authors" accesskey="p" rel="prev">ntp-wait Authors</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
2472b15cb3dSCy Schubert</div>
248052d159aSCy Schubert<a name="ntp_002dwait-Notes-1"></a>
249052d159aSCy Schubert<h4 class="subsection">1.7 ntp-wait Notes</h4>
250052d159aSCy Schubert<hr>
2512b15cb3dSCy Schubert
2522b15cb3dSCy Schubert
2532b15cb3dSCy Schubert
254052d159aSCy Schubert</body>
255052d159aSCy Schubert</html>
256