3 <title>Ntp-wait User's Manual</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="Ntp-wait User's Manual">
6 <meta name="generator" content="makeinfo 4.7">
7 <link title="Top" rel="top" href="#Top">
8 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9 <meta http-equiv="Content-Style-Type" content="text/css">
10 <style type="text/css"><!--
11 pre.display { font-family:inherit }
12 pre.format { font-family:inherit }
13 pre.smalldisplay { font-family:inherit; font-size:smaller }
14 pre.smallformat { font-family:inherit; font-size:smaller }
15 pre.smallexample { font-size:smaller }
16 pre.smalllisp { font-size:smaller }
17 span.sc { font-variant:small-caps }
18 span.roman { font-family: serif; font-weight: normal; }
22 <h1 class="settitle">Ntp-wait User's Manual</h1>
25 <a name="Top"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-Description">ntp-wait Description</a>,
26 Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27 Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
31 <p>This document describes the use of the NTP Project's <code>ntp-wait</code> program.
33 <p>If there are time-sensitive applications,
34 the proper sequence of events is to
35 run <code>ntpd -g</code> as early as possible,
36 then invoke all of the non-time-sensitive process,
37 run <code>ntp-wait</code> to block
38 until the system's time has stabilized and synchronized,
39 and only then start any applicaitons (like database servers) that require
40 accurate and stable time.
42 <p>This document applies to version 4.2.8p10 of <code>ntp-wait</code>.
44 <div class="shortcontents">
45 <h2>Short Contents</h2>
51 <li><a accesskey="1" href="#ntp_002dwait-Description">ntp-wait Description</a>: Description
52 <li><a accesskey="2" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>: Invoking ntp-wait
57 <a name="ntp_002dwait-Invocation"></a>
61 <h3 class="section">0.1 Invoking ntp-wait</h3>
63 <p><a name="index-ntp_002dwait-1"></a><a name="index-Wait-for-ntpd-to-stabilize-the-system-clock-2"></a>
65 <p><code>ntp-wait</code>
71 <kbd>secs-between-tries</kbd>
72 after each status return that says
74 has not yet produced a synchronized and stable system clock.
76 <p><code>ntp-wait</code>
77 will do this quietly, unless the
80 This can be useful at boot time, to delay the boot sequence until after
81 <kbd>ntpd</kbd> <kbd>-g</kbd>
84 <p>This section was generated by <strong>AutoGen</strong>,
85 using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp-wait</code> program.
88 <li><a accesskey="1" href="#ntp_002dwait-usage">ntp-wait usage</a>: ntp-wait help/usage (<span class="option">--help</span>)
89 <li><a accesskey="2" href="#ntp_002dwait-tries">ntp-wait tries</a>: tries option (-n)
90 <li><a accesskey="3" href="#ntp_002dwait-sleep">ntp-wait sleep</a>: sleep option (-s)
91 <li><a accesskey="4" href="#ntp_002dwait-verbose">ntp-wait verbose</a>: verbose option (-v)
92 <li><a accesskey="5" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>: exit status
93 <li><a accesskey="6" href="#ntp_002dwait-Authors">ntp-wait Authors</a>: Authors
94 <li><a accesskey="7" href="#ntp_002dwait-Notes">ntp-wait Notes</a>: Notes
99 <a name="ntp_002dwait-usage"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-tries">ntp-wait tries</a>,
100 Up: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
104 <h4 class="subsection">0.1.1 ntp-wait help/usage (<span class="option">--help</span>)</h4>
106 <p><a name="index-ntp_002dwait-help-3"></a>
107 This is the automatically generated usage text for ntp-wait.
109 <p>The text printed is the same whether selected with the <code>help</code> option
110 (<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
111 the usage text by passing it through a pager program.
112 <code>more-help</code> is disabled on platforms without a working
113 <code>fork(2)</code> function. The <code>PAGER</code> environment variable is
114 used to select the program, defaulting to <span class="file">more</span>. Both will exit
115 with a status code of 0.
117 <pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p10
118 USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
120 -n, --tries=num Number of times to check ntpd
121 -s, --sleep=num How long to sleep between tries
122 -v, --verbose Be verbose
123 -?, --help Display usage information and exit
124 --more-help Pass the extended usage text through a pager
126 Options are specified by doubled hyphens and their name or by a single
127 hyphen and the flag character.
131 <a name="ntp_002dwait-tries"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-sleep">ntp-wait sleep</a>,
132 Previous: <a rel="previous" accesskey="p" href="#ntp_002dwait-usage">ntp-wait usage</a>,
133 Up: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
137 <h4 class="subsection">0.1.2 tries option (-n)</h4>
139 <p><a name="index-ntp_002dwait_002dtries-4"></a>
140 This is the “number of times to check ntpd” option.
141 This option takes a number argument.
142 The maximum number of times we will check <code>ntpd</code> to see if
143 it has been able to synchronize and stabilize the system clock.
146 <a name="ntp_002dwait-sleep"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-verbose">ntp-wait verbose</a>,
147 Previous: <a rel="previous" accesskey="p" href="#ntp_002dwait-tries">ntp-wait tries</a>,
148 Up: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
152 <h4 class="subsection">0.1.3 sleep option (-s)</h4>
154 <p><a name="index-ntp_002dwait_002dsleep-5"></a>
155 This is the “how long to sleep between tries” option.
156 This option takes a number argument <span class="file">secs-between-tries</span>.
157 We will sleep for <span class="file">secs-between-tries</span> after each query
158 of <code>ntpd</code> that returns "the time is not yet stable".
161 <a name="ntp_002dwait-verbose"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>,
162 Previous: <a rel="previous" accesskey="p" href="#ntp_002dwait-sleep">ntp-wait sleep</a>,
163 Up: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
167 <h4 class="subsection">0.1.4 verbose option (-v)</h4>
169 <p><a name="index-ntp_002dwait_002dverbose-6"></a>
170 This is the “be verbose” option.
171 By default, <code>ntp-wait</code> is silent.
172 With this option, <code>ntp-wait</code> will provide status information.
175 <a name="ntp_002dwait-exit-status"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-Authors">ntp-wait Authors</a>,
176 Previous: <a rel="previous" accesskey="p" href="#ntp_002dwait-verbose">ntp-wait verbose</a>,
177 Up: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
181 <h4 class="subsection">0.1.5 ntp-wait exit status</h4>
183 <p>One of the following exit values will be returned:
185 <dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
186 <br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
190 <a name="ntp_002dwait-Authors"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-Notes">ntp-wait Notes</a>,
191 Previous: <a rel="previous" accesskey="p" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>,
192 Up: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
196 <h4 class="subsection">0.1.6 ntp-wait Authors</h4>
200 <a name="ntp_002dwait-Notes"></a>Previous: <a rel="previous" accesskey="p" href="#ntp_002dwait-Authors">ntp-wait Authors</a>,
201 Up: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
205 <h4 class="subsection">0.1.7 ntp-wait Notes</h4>