]> CyberLeo.Net >> Repos - FreeBSD/releng/10.3.git/blob - contrib/ntp/scripts/ntp-wait/ntp-wait.html
Fix multiple vulnerabilities in ntp. [SA-18:02.ntp]
[FreeBSD/releng/10.3.git] / contrib / ntp / scripts / ntp-wait / ntp-wait.html
1 <html lang="en">
2 <head>
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; } 
19 --></style>
20 </head>
21 <body>
22 <h1 class="settitle">Ntp-wait User's Manual</h1>
23 <div class="node">
24 <p><hr>
25 <a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-Description">ntp-wait Description</a>,
26 Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27 Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
28 <br>
29 </div>
30
31   <p>This document describes the use of the NTP Project's <code>ntp-wait</code> program.
32
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.
41
42   <p>This document applies to version 4.2.8p11 of <code>ntp-wait</code>.
43
44 <div class="shortcontents">
45 <h2>Short Contents</h2>
46 <ul>
47 </ul>
48 </div>
49
50 <ul class="menu">
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
53 </ul>
54
55 <div class="node">
56 <p><hr>
57 <a name="ntp_002dwait-Invocation"></a>
58 <br>
59 </div>
60
61 <h3 class="section">0.1 Invoking ntp-wait</h3>
62
63 <p><a name="index-ntp_002dwait-1"></a><a name="index-Wait-for-ntpd-to-stabilize-the-system-clock-2"></a>
64
65   <p><code>ntp-wait</code>
66 will send at most
67 <kbd>num-tries</kbd>
68 queries to
69 <code>ntpd(8)</code>,
70 sleeping for
71 <kbd>secs-between-tries</kbd>
72 after each status return that says
73 <code>ntpd(8)</code>
74 has not yet produced a synchronized and stable system clock.
75
76   <p><code>ntp-wait</code>
77 will do this quietly, unless the
78 <code>-v</code>
79 flag is provided. 
80 This can be useful at boot time, to delay the boot sequence until after
81 <kbd>ntpd</kbd> <kbd>-g</kbd>
82 has set the time.
83
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.
86
87 <ul class="menu">
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
95 </ul>
96
97 <div class="node">
98 <p><hr>
99 <a name="ntp_002dwait-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-tries">ntp-wait tries</a>,
100 Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
101 <br>
102 </div>
103
104 <h4 class="subsection">0.1.1 ntp-wait help/usage (<span class="option">--help</span>)</h4>
105
106 <p><a name="index-ntp_002dwait-help-3"></a>
107 This is the automatically generated usage text for ntp-wait.
108
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.
116
117 <pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p11
118 USAGE: ntp-wait [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
119
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
125
126 Options are specified by doubled hyphens and their name or by a single
127 hyphen and the flag character.
128 </pre>
129   <div class="node">
130 <p><hr>
131 <a name="ntp_002dwait-tries"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-sleep">ntp-wait sleep</a>,
132 Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-usage">ntp-wait usage</a>,
133 Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
134 <br>
135 </div>
136
137 <h4 class="subsection">0.1.2 tries option (-n)</h4>
138
139 <p><a name="index-ntp_002dwait_002dtries-4"></a>
140 This is the &ldquo;number of times to check ntpd&rdquo; 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. 
144 <div class="node">
145 <p><hr>
146 <a name="ntp_002dwait-sleep"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-verbose">ntp-wait verbose</a>,
147 Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-tries">ntp-wait tries</a>,
148 Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
149 <br>
150 </div>
151
152 <h4 class="subsection">0.1.3 sleep option (-s)</h4>
153
154 <p><a name="index-ntp_002dwait_002dsleep-5"></a>
155 This is the &ldquo;how long to sleep between tries&rdquo; 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". 
159 <div class="node">
160 <p><hr>
161 <a name="ntp_002dwait-verbose"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>,
162 Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-sleep">ntp-wait sleep</a>,
163 Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
164 <br>
165 </div>
166
167 <h4 class="subsection">0.1.4 verbose option (-v)</h4>
168
169 <p><a name="index-ntp_002dwait_002dverbose-6"></a>
170 This is the &ldquo;be verbose&rdquo; option. 
171         By default, <code>ntp-wait</code> is silent. 
172         With this option, <code>ntp-wait</code> will provide status information. 
173 <div class="node">
174 <p><hr>
175 <a name="ntp_002dwait-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-Authors">ntp-wait Authors</a>,
176 Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-verbose">ntp-wait verbose</a>,
177 Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
178 <br>
179 </div>
180
181 <h4 class="subsection">0.1.5 ntp-wait exit status</h4>
182
183 <p>One of the following exit values will be returned:
184      <dl>
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. 
187 </dl>
188   <div class="node">
189 <p><hr>
190 <a name="ntp_002dwait-Authors"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-Notes">ntp-wait Notes</a>,
191 Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>,
192 Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
193 <br>
194 </div>
195
196 <h4 class="subsection">0.1.6 ntp-wait Authors</h4>
197
198 <div class="node">
199 <p><hr>
200 <a name="ntp_002dwait-Notes"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-Authors">ntp-wait Authors</a>,
201 Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
202 <br>
203 </div>
204
205 <h4 class="subsection">0.1.7 ntp-wait Notes</h4>
206
207 </body></html>
208