1290001Sglebius<html lang="en">
2290001Sglebius<head>
3290001Sglebius<title>Ntp-wait User's Manual</title>
4290001Sglebius<meta http-equiv="Content-Type" content="text/html">
5290001Sglebius<meta name="description" content="Ntp-wait User's Manual">
6290001Sglebius<meta name="generator" content="makeinfo 4.7">
7290001Sglebius<link title="Top" rel="top" href="#Top">
8290001Sglebius<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9290001Sglebius<meta http-equiv="Content-Style-Type" content="text/css">
10290001Sglebius<style type="text/css"><!--
11290001Sglebius  pre.display { font-family:inherit }
12290001Sglebius  pre.format  { font-family:inherit }
13290001Sglebius  pre.smalldisplay { font-family:inherit; font-size:smaller }
14290001Sglebius  pre.smallformat  { font-family:inherit; font-size:smaller }
15290001Sglebius  pre.smallexample { font-size:smaller }
16290001Sglebius  pre.smalllisp    { font-size:smaller }
17290001Sglebius  span.sc { font-variant:small-caps }
18290001Sglebius  span.roman { font-family: serif; font-weight: normal; } 
19290001Sglebius--></style>
20290001Sglebius</head>
21290001Sglebius<body>
22290001Sglebius<h1 class="settitle">Ntp-wait User's Manual</h1>
23290001Sglebius<div class="node">
24290001Sglebius<p><hr>
25290001Sglebius<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-Description">ntp-wait Description</a>,
26290001SglebiusPrevious:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27290001SglebiusUp:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
28290001Sglebius<br>
29290001Sglebius</div>
30290001Sglebius
31290001Sglebius  <p>This document describes the use of the NTP Project's <code>ntp-wait</code> program.
32290001Sglebius
33290001Sglebius  <p>If there are time-sensitive applications,
34290001Sglebiusthe proper sequence of events is to
35290001Sglebiusrun <code>ntpd -g</code> as early as possible,
36290001Sglebiusthen invoke all of the non-time-sensitive process,
37290001Sglebiusrun <code>ntp-wait</code> to block
38290001Sglebiusuntil the system's time has stabilized and synchronized,
39290001Sglebiusand only then start any applicaitons (like database servers) that require
40290001Sglebiusaccurate and stable time.
41290001Sglebius
42310419Sdelphij  <p>This document applies to version 4.2.8p9 of <code>ntp-wait</code>.
43290001Sglebius
44290001Sglebius<div class="shortcontents">
45290001Sglebius<h2>Short Contents</h2>
46290001Sglebius<ul>
47290001Sglebius</ul>
48290001Sglebius</div>
49290001Sglebius
50290001Sglebius<ul class="menu">
51290001Sglebius<li><a accesskey="1" href="#ntp_002dwait-Description">ntp-wait Description</a>:             Description
52290001Sglebius<li><a accesskey="2" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>: 		Invoking ntp-wait
53290001Sglebius</ul>
54290001Sglebius
55290001Sglebius<div class="node">
56290001Sglebius<p><hr>
57290001Sglebius<a name="ntp_002dwait-Invocation"></a>
58290001Sglebius<br>
59290001Sglebius</div>
60290001Sglebius
61290001Sglebius<h3 class="section">0.1 Invoking ntp-wait</h3>
62290001Sglebius
63290001Sglebius<p><a name="index-ntp_002dwait-1"></a><a name="index-Wait-for-ntpd-to-stabilize-the-system-clock-2"></a>
64290001Sglebius
65290001Sglebius  <p><code>ntp-wait</code>
66290001Sglebiuswill send at most
67290001Sglebius<kbd>num-tries</kbd>
68290001Sglebiusqueries to
69290001Sglebius<code>ntpd(8)</code>,
70290001Sglebiussleeping for
71290001Sglebius<kbd>secs-between-tries</kbd>
72290001Sglebiusafter each status return that says
73290001Sglebius<code>ntpd(8)</code>
74290001Sglebiushas not yet produced a synchronized and stable system clock.
75290001Sglebius
76290001Sglebius  <p><code>ntp-wait</code>
77290001Sglebiuswill do this quietly, unless the
78290001Sglebius<code>-v</code>
79290001Sglebiusflag is provided. 
80290001SglebiusThis can be useful at boot time, to delay the boot sequence until after
81290001Sglebius<kbd>ntpd</kbd> <kbd>-g</kbd>
82290001Sglebiushas set the time.
83290001Sglebius
84290001Sglebius  <p>This section was generated by <strong>AutoGen</strong>,
85290001Sglebiususing the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp-wait</code> program.
86290001Sglebius
87290001Sglebius<ul class="menu">
88290001Sglebius<li><a accesskey="1" href="#ntp_002dwait-usage">ntp-wait usage</a>:                   ntp-wait help/usage (<span class="option">--help</span>)
89290001Sglebius<li><a accesskey="2" href="#ntp_002dwait-tries">ntp-wait tries</a>:                   tries option (-n)
90290001Sglebius<li><a accesskey="3" href="#ntp_002dwait-sleep">ntp-wait sleep</a>:                   sleep option (-s)
91290001Sglebius<li><a accesskey="4" href="#ntp_002dwait-verbose">ntp-wait verbose</a>:                 verbose option (-v)
92290001Sglebius<li><a accesskey="5" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>:             exit status
93290001Sglebius<li><a accesskey="6" href="#ntp_002dwait-Authors">ntp-wait Authors</a>:                 Authors
94290001Sglebius<li><a accesskey="7" href="#ntp_002dwait-Notes">ntp-wait Notes</a>:                   Notes
95290001Sglebius</ul>
96290001Sglebius
97290001Sglebius<div class="node">
98290001Sglebius<p><hr>
99290001Sglebius<a name="ntp_002dwait-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-tries">ntp-wait tries</a>,
100290001SglebiusUp:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
101290001Sglebius<br>
102290001Sglebius</div>
103290001Sglebius
104290001Sglebius<h4 class="subsection">0.1.1 ntp-wait help/usage (<span class="option">--help</span>)</h4>
105290001Sglebius
106290001Sglebius<p><a name="index-ntp_002dwait-help-3"></a>
107290001SglebiusThis is the automatically generated usage text for ntp-wait.
108290001Sglebius
109290001Sglebius  <p>The text printed is the same whether selected with the <code>help</code> option
110290001Sglebius(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>).  <code>more-help</code> will print
111290001Sglebiusthe usage text by passing it through a pager program. 
112290001Sglebius<code>more-help</code> is disabled on platforms without a working
113290001Sglebius<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
114290001Sglebiusused to select the program, defaulting to <span class="file">more</span>.  Both will exit
115290001Sglebiuswith a status code of 0.
116290001Sglebius
117310419Sdelphij<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p9
118290001SglebiusUSAGE: ntp-wait [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
119290001Sglebius
120290001Sglebius    -n, --tries=num              Number of times to check ntpd
121290001Sglebius    -s, --sleep=num              How long to sleep between tries
122290001Sglebius    -v, --verbose                Be verbose
123290001Sglebius    -?, --help                   Display usage information and exit
124290001Sglebius        --more-help              Pass the extended usage text through a pager
125290001Sglebius
126290001SglebiusOptions are specified by doubled hyphens and their name or by a single
127290001Sglebiushyphen and the flag character.
128290001Sglebius</pre>
129290001Sglebius  <div class="node">
130290001Sglebius<p><hr>
131290001Sglebius<a name="ntp_002dwait-tries"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-sleep">ntp-wait sleep</a>,
132290001SglebiusPrevious:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-usage">ntp-wait usage</a>,
133290001SglebiusUp:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
134290001Sglebius<br>
135290001Sglebius</div>
136290001Sglebius
137290001Sglebius<h4 class="subsection">0.1.2 tries option (-n)</h4>
138290001Sglebius
139290001Sglebius<p><a name="index-ntp_002dwait_002dtries-4"></a>
140290001SglebiusThis is the &ldquo;number of times to check ntpd&rdquo; option. 
141290001SglebiusThis option takes a number argument. 
142290001Sglebius        The maximum number of times we will check <code>ntpd</code> to see if
143290001Sglebius        it has been able to synchronize and stabilize the system clock. 
144290001Sglebius<div class="node">
145290001Sglebius<p><hr>
146290001Sglebius<a name="ntp_002dwait-sleep"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-verbose">ntp-wait verbose</a>,
147290001SglebiusPrevious:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-tries">ntp-wait tries</a>,
148290001SglebiusUp:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
149290001Sglebius<br>
150290001Sglebius</div>
151290001Sglebius
152290001Sglebius<h4 class="subsection">0.1.3 sleep option (-s)</h4>
153290001Sglebius
154290001Sglebius<p><a name="index-ntp_002dwait_002dsleep-5"></a>
155290001SglebiusThis is the &ldquo;how long to sleep between tries&rdquo; option. 
156290001SglebiusThis option takes a number argument <span class="file">secs-between-tries</span>. 
157290001Sglebius        We will sleep for <span class="file">secs-between-tries</span> after each query
158290001Sglebius        of <code>ntpd</code> that returns "the time is not yet stable". 
159290001Sglebius<div class="node">
160290001Sglebius<p><hr>
161290001Sglebius<a name="ntp_002dwait-verbose"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>,
162290001SglebiusPrevious:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-sleep">ntp-wait sleep</a>,
163290001SglebiusUp:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
164290001Sglebius<br>
165290001Sglebius</div>
166290001Sglebius
167290001Sglebius<h4 class="subsection">0.1.4 verbose option (-v)</h4>
168290001Sglebius
169290001Sglebius<p><a name="index-ntp_002dwait_002dverbose-6"></a>
170290001SglebiusThis is the &ldquo;be verbose&rdquo; option. 
171290001Sglebius        By default, <code>ntp-wait</code> is silent. 
172290001Sglebius        With this option, <code>ntp-wait</code> will provide status information. 
173290001Sglebius<div class="node">
174290001Sglebius<p><hr>
175290001Sglebius<a name="ntp_002dwait-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-Authors">ntp-wait Authors</a>,
176290001SglebiusPrevious:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-verbose">ntp-wait verbose</a>,
177290001SglebiusUp:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
178290001Sglebius<br>
179290001Sglebius</div>
180290001Sglebius
181290001Sglebius<h4 class="subsection">0.1.5 ntp-wait exit status</h4>
182290001Sglebius
183290001Sglebius<p>One of the following exit values will be returned:
184290001Sglebius     <dl>
185290001Sglebius<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution. 
186290001Sglebius<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid. 
187290001Sglebius</dl>
188290001Sglebius  <div class="node">
189290001Sglebius<p><hr>
190290001Sglebius<a name="ntp_002dwait-Authors"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-Notes">ntp-wait Notes</a>,
191290001SglebiusPrevious:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>,
192290001SglebiusUp:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
193290001Sglebius<br>
194290001Sglebius</div>
195290001Sglebius
196290001Sglebius<h4 class="subsection">0.1.6 ntp-wait Authors</h4>
197290001Sglebius
198290001Sglebius<div class="node">
199290001Sglebius<p><hr>
200290001Sglebius<a name="ntp_002dwait-Notes"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-Authors">ntp-wait Authors</a>,
201290001SglebiusUp:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
202290001Sglebius<br>
203290001Sglebius</div>
204290001Sglebius
205290001Sglebius<h4 class="subsection">0.1.7 ntp-wait Notes</h4>
206290001Sglebius
207290001Sglebius</body></html>
208290001Sglebius
209