1275970Scy<html lang="en"> 2275970Scy<head> 3275970Scy<title>Ntp-wait User's Manual</title> 4275970Scy<meta http-equiv="Content-Type" content="text/html"> 5275970Scy<meta name="description" content="Ntp-wait User's Manual"> 6275970Scy<meta name="generator" content="makeinfo 4.7"> 7275970Scy<link title="Top" rel="top" href="#Top"> 8275970Scy<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 9275970Scy<meta http-equiv="Content-Style-Type" content="text/css"> 10275970Scy<style type="text/css"><!-- 11275970Scy pre.display { font-family:inherit } 12275970Scy pre.format { font-family:inherit } 13275970Scy pre.smalldisplay { font-family:inherit; font-size:smaller } 14275970Scy pre.smallformat { font-family:inherit; font-size:smaller } 15275970Scy pre.smallexample { font-size:smaller } 16275970Scy pre.smalllisp { font-size:smaller } 17275970Scy span.sc { font-variant:small-caps } 18275970Scy span.roman { font-family: serif; font-weight: normal; } 19275970Scy--></style> 20275970Scy</head> 21275970Scy<body> 22275970Scy<h1 class="settitle">Ntp-wait User's Manual</h1> 23275970Scy<div class="node"> 24275970Scy<p><hr> 25275970Scy<a name="Top"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-Description">ntp-wait Description</a>, 26275970ScyPrevious: <a rel="previous" accesskey="p" href="#dir">(dir)</a>, 27275970ScyUp: <a rel="up" accesskey="u" href="#dir">(dir)</a> 28275970Scy<br> 29275970Scy</div> 30275970Scy 31275970Scy <p>This document describes the use of the NTP Project's <code>ntp-wait</code> program. 32275970Scy 33275970Scy <p>If there are time-sensitive applications, 34275970Scythe proper sequence of events is to 35275970Scyrun <code>ntpd -g</code> as early as possible, 36275970Scythen invoke all of the non-time-sensitive process, 37275970Scyrun <code>ntp-wait</code> to block 38275970Scyuntil the system's time has stabilized and synchronized, 39275970Scyand only then start any applicaitons (like database servers) that require 40275970Scyaccurate and stable time. 41275970Scy 42338531Sdelphij <p>This document applies to version 4.2.8p12 of <code>ntp-wait</code>. 43275970Scy 44275970Scy<div class="shortcontents"> 45275970Scy<h2>Short Contents</h2> 46275970Scy<ul> 47275970Scy</ul> 48275970Scy</div> 49275970Scy 50275970Scy<ul class="menu"> 51275970Scy<li><a accesskey="1" href="#ntp_002dwait-Description">ntp-wait Description</a>: Description 52275970Scy<li><a accesskey="2" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>: Invoking ntp-wait 53275970Scy</ul> 54275970Scy 55275970Scy<div class="node"> 56275970Scy<p><hr> 57275970Scy<a name="ntp_002dwait-Invocation"></a> 58275970Scy<br> 59275970Scy</div> 60275970Scy 61275970Scy<h3 class="section">0.1 Invoking ntp-wait</h3> 62275970Scy 63275970Scy<p><a name="index-ntp_002dwait-1"></a><a name="index-Wait-for-ntpd-to-stabilize-the-system-clock-2"></a> 64275970Scy 65275970Scy <p><code>ntp-wait</code> 66275970Scywill send at most 67275970Scy<kbd>num-tries</kbd> 68275970Scyqueries to 69275970Scy<code>ntpd(8)</code>, 70275970Scysleeping for 71275970Scy<kbd>secs-between-tries</kbd> 72275970Scyafter each status return that says 73275970Scy<code>ntpd(8)</code> 74275970Scyhas not yet produced a synchronized and stable system clock. 75275970Scy 76275970Scy <p><code>ntp-wait</code> 77275970Scywill do this quietly, unless the 78275970Scy<code>-v</code> 79275970Scyflag is provided. 80275970ScyThis can be useful at boot time, to delay the boot sequence until after 81275970Scy<kbd>ntpd</kbd> <kbd>-g</kbd> 82275970Scyhas set the time. 83275970Scy 84275970Scy <p>This section was generated by <strong>AutoGen</strong>, 85275970Scyusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp-wait</code> program. 86275970Scy 87275970Scy<ul class="menu"> 88275970Scy<li><a accesskey="1" href="#ntp_002dwait-usage">ntp-wait usage</a>: ntp-wait help/usage (<span class="option">--help</span>) 89275970Scy<li><a accesskey="2" href="#ntp_002dwait-tries">ntp-wait tries</a>: tries option (-n) 90275970Scy<li><a accesskey="3" href="#ntp_002dwait-sleep">ntp-wait sleep</a>: sleep option (-s) 91275970Scy<li><a accesskey="4" href="#ntp_002dwait-verbose">ntp-wait verbose</a>: verbose option (-v) 92275970Scy<li><a accesskey="5" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>: exit status 93275970Scy<li><a accesskey="6" href="#ntp_002dwait-Authors">ntp-wait Authors</a>: Authors 94275970Scy<li><a accesskey="7" href="#ntp_002dwait-Notes">ntp-wait Notes</a>: Notes 95275970Scy</ul> 96275970Scy 97275970Scy<div class="node"> 98275970Scy<p><hr> 99275970Scy<a name="ntp_002dwait-usage"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-tries">ntp-wait tries</a>, 100275970ScyUp: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a> 101275970Scy<br> 102275970Scy</div> 103275970Scy 104275970Scy<h4 class="subsection">0.1.1 ntp-wait help/usage (<span class="option">--help</span>)</h4> 105275970Scy 106275970Scy<p><a name="index-ntp_002dwait-help-3"></a> 107275970ScyThis is the automatically generated usage text for ntp-wait. 108275970Scy 109275970Scy <p>The text printed is the same whether selected with the <code>help</code> option 110275970Scy(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print 111275970Scythe usage text by passing it through a pager program. 112275970Scy<code>more-help</code> is disabled on platforms without a working 113275970Scy<code>fork(2)</code> function. The <code>PAGER</code> environment variable is 114275970Scyused to select the program, defaulting to <span class="file">more</span>. Both will exit 115275970Scywith a status code of 0. 116275970Scy 117338531Sdelphij<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p12 118275970ScyUSAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 119275970Scy 120275970Scy -n, --tries=num Number of times to check ntpd 121275970Scy -s, --sleep=num How long to sleep between tries 122275970Scy -v, --verbose Be verbose 123275970Scy -?, --help Display usage information and exit 124275970Scy --more-help Pass the extended usage text through a pager 125275970Scy 126275970ScyOptions are specified by doubled hyphens and their name or by a single 127275970Scyhyphen and the flag character. 128275970Scy</pre> 129275970Scy <div class="node"> 130275970Scy<p><hr> 131275970Scy<a name="ntp_002dwait-tries"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-sleep">ntp-wait sleep</a>, 132275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntp_002dwait-usage">ntp-wait usage</a>, 133275970ScyUp: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a> 134275970Scy<br> 135275970Scy</div> 136275970Scy 137275970Scy<h4 class="subsection">0.1.2 tries option (-n)</h4> 138275970Scy 139275970Scy<p><a name="index-ntp_002dwait_002dtries-4"></a> 140275970ScyThis is the “number of times to check ntpd” option. 141275970ScyThis option takes a number argument. 142275970Scy The maximum number of times we will check <code>ntpd</code> to see if 143275970Scy it has been able to synchronize and stabilize the system clock. 144275970Scy<div class="node"> 145275970Scy<p><hr> 146275970Scy<a name="ntp_002dwait-sleep"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-verbose">ntp-wait verbose</a>, 147275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntp_002dwait-tries">ntp-wait tries</a>, 148275970ScyUp: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a> 149275970Scy<br> 150275970Scy</div> 151275970Scy 152275970Scy<h4 class="subsection">0.1.3 sleep option (-s)</h4> 153275970Scy 154275970Scy<p><a name="index-ntp_002dwait_002dsleep-5"></a> 155275970ScyThis is the “how long to sleep between tries” option. 156275970ScyThis option takes a number argument <span class="file">secs-between-tries</span>. 157275970Scy We will sleep for <span class="file">secs-between-tries</span> after each query 158275970Scy of <code>ntpd</code> that returns "the time is not yet stable". 159275970Scy<div class="node"> 160275970Scy<p><hr> 161275970Scy<a name="ntp_002dwait-verbose"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>, 162275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntp_002dwait-sleep">ntp-wait sleep</a>, 163275970ScyUp: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a> 164275970Scy<br> 165275970Scy</div> 166275970Scy 167275970Scy<h4 class="subsection">0.1.4 verbose option (-v)</h4> 168275970Scy 169275970Scy<p><a name="index-ntp_002dwait_002dverbose-6"></a> 170275970ScyThis is the “be verbose” option. 171275970Scy By default, <code>ntp-wait</code> is silent. 172275970Scy With this option, <code>ntp-wait</code> will provide status information. 173275970Scy<div class="node"> 174275970Scy<p><hr> 175275970Scy<a name="ntp_002dwait-exit-status"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-Authors">ntp-wait Authors</a>, 176275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntp_002dwait-verbose">ntp-wait verbose</a>, 177275970ScyUp: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a> 178275970Scy<br> 179275970Scy</div> 180275970Scy 181275970Scy<h4 class="subsection">0.1.5 ntp-wait exit status</h4> 182275970Scy 183275970Scy<p>One of the following exit values will be returned: 184275970Scy <dl> 185275970Scy<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution. 186275970Scy<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid. 187275970Scy</dl> 188275970Scy <div class="node"> 189275970Scy<p><hr> 190275970Scy<a name="ntp_002dwait-Authors"></a>Next: <a rel="next" accesskey="n" href="#ntp_002dwait-Notes">ntp-wait Notes</a>, 191275970ScyPrevious: <a rel="previous" accesskey="p" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>, 192275970ScyUp: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a> 193275970Scy<br> 194275970Scy</div> 195275970Scy 196275970Scy<h4 class="subsection">0.1.6 ntp-wait Authors</h4> 197275970Scy 198275970Scy<div class="node"> 199275970Scy<p><hr> 200275970Scy<a name="ntp_002dwait-Notes"></a>Previous: <a rel="previous" accesskey="p" href="#ntp_002dwait-Authors">ntp-wait Authors</a>, 201275970ScyUp: <a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a> 202275970Scy<br> 203275970Scy</div> 204275970Scy 205275970Scy<h4 class="subsection">0.1.7 ntp-wait Notes</h4> 206275970Scy 207275970Scy</body></html> 208275970Scy 209