2019-03-07 13:01:16 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
< html >
2023-05-11 18:17:53 +00:00
<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
2014-12-20 22:52:39 +00:00
< head >
2019-03-07 13:01:16 +00:00
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" >
< title > Ntp-wait User’ s Manual< / title >
< meta name = "description" content = "Ntp-wait User’s Manual" >
< meta name = "keywords" content = "Ntp-wait User’s Manual" >
< meta name = "resource-type" content = "document" >
< meta name = "distribution" content = "global" >
< meta name = "Generator" content = "makeinfo" >
< link href = "#Top" rel = "start" title = "Top" >
< link href = "dir.html#Top" rel = "up" title = "(dir)" >
< style type = "text/css" >
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
< / style >
2014-12-20 22:52:39 +00:00
< / head >
2019-03-07 13:01:16 +00:00
< body lang = "en" >
< h1 class = "settitle" align = "center" > Ntp-wait User’ s Manual< / h1 >
2014-12-20 22:52:39 +00:00
2023-05-11 18:17:53 +00:00
< span id = "Top" > < / span > < div class = "header" >
2019-03-07 13:01:16 +00:00
< p >
Previous: < a href = "dir.html#Top" accesskey = "p" rel = "prev" > (dir)< / a > , Up: < a href = "dir.html#Top" accesskey = "u" rel = "up" > (dir)< / a > < / p >
< / div >
< h1 class = "node-heading" > Top< / h1 >
< p > This document describes the use of the NTP Project’ s < code > ntp-wait< / code > program.
< / p >
< p > If there are time-sensitive applications,
2014-12-20 22:52:39 +00:00
the proper sequence of events is to
run < code > ntpd -g< / code > as early as possible,
then invoke all of the non-time-sensitive process,
run < code > ntp-wait< / code > to block
2019-03-07 13:01:16 +00:00
until the system’ s time has stabilized and synchronized,
2014-12-20 22:52:39 +00:00
and only then start any applicaitons (like database servers) that require
accurate and stable time.
2019-03-07 13:01:16 +00:00
< / p >
2023-06-06 12:26:44 +00:00
< p > This document applies to version 4.2.8p17 of < code > ntp-wait< / code > .
2019-03-07 13:01:16 +00:00
< / p >
2023-05-11 18:17:53 +00:00
< span id = "SEC_Overview" > < / span >
2019-03-07 13:01:16 +00:00
< h2 class = "shortcontents-heading" > Short Table of Contents< / h2 >
2014-12-20 22:52:39 +00:00
< div class = "shortcontents" >
2023-05-11 18:17:53 +00:00
< li > < a id = "stoc-Invoking-ntp_002dwait" href = "#toc-Invoking-ntp_002dwait" > 1 Invoking ntp-wait< / a > < / li >
2019-03-07 13:01:16 +00:00
2014-12-20 22:52:39 +00:00
< / div >
2019-03-07 13:01:16 +00:00
< table class = "menu" border = "0" cellspacing = "0" >
2023-05-11 18:17:53 +00:00
< tr > < td align = "left" valign = "top" > • ntp-wait Description< / td > < td > < / td > < td align = "left" valign = "top" > Description
2019-03-07 13:01:16 +00:00
< / td > < / tr >
2023-05-11 18:17:53 +00:00
< tr > < td align = "left" valign = "top" > • < a href = "#ntp_002dwait-Invocation" accesskey = "2" > ntp-wait Invocation< / a > < / td > < td > < / td > < td align = "left" valign = "top" > Invoking ntp-wait
2019-03-07 13:01:16 +00:00
< / td > < / tr >
< / table >
< hr >
2023-05-11 18:17:53 +00:00
< span id = "ntp_002dwait-Invocation" > < / span > < div class = "header" >
2019-03-07 13:01:16 +00:00
< p >
Up: < a href = "#Top" accesskey = "u" rel = "up" > Top< / a > < / p >
2014-12-20 22:52:39 +00:00
< / div >
2023-05-11 18:17:53 +00:00
< span id = "Invoking-ntp_002dwait" > < / span > < h3 class = "section" > 1 Invoking ntp-wait< / h3 >
< span id = "index-ntp_002dwait" > < / span >
< span id = "index-Wait-for-ntpd-to-stabilize-the-system-clock" > < / span >
2014-12-20 22:52:39 +00:00
2019-03-07 13:01:16 +00:00
< p > < code > ntp-wait< / code >
2014-12-20 22:52:39 +00:00
will send at most
< kbd > num-tries< / kbd >
queries to
< code > ntpd(8)< / code > ,
sleeping for
< kbd > secs-between-tries< / kbd >
after each status return that says
< code > ntpd(8)< / code >
has not yet produced a synchronized and stable system clock.
2019-03-07 13:01:16 +00:00
< / p >
< p > < code > ntp-wait< / code >
2014-12-20 22:52:39 +00:00
will do this quietly, unless the
< code > -v< / code >
2019-03-07 13:01:16 +00:00
flag is provided.
2014-12-20 22:52:39 +00:00
This can be useful at boot time, to delay the boot sequence until after
< kbd > ntpd< / kbd > < kbd > -g< / kbd >
has set the time.
2019-03-07 13:01:16 +00:00
< / p >
< p > This section was generated by < strong > AutoGen< / strong > ,
2014-12-20 22:52:39 +00:00
using the < code > agtexi-cmd< / code > template and the option descriptions for the < code > ntp-wait< / code > program.
2019-03-07 13:01:16 +00:00
< / p >
< table class = "menu" border = "0" cellspacing = "0" >
2023-05-11 18:17:53 +00:00
< tr > < td align = "left" valign = "top" > • < a href = "#ntp_002dwait-usage" accesskey = "1" > ntp-wait usage< / a > < / td > < td > < / td > < td align = "left" valign = "top" > ntp-wait help/usage (< samp > --help< / samp > )
2019-03-07 13:01:16 +00:00
< / td > < / tr >
2023-05-11 18:17:53 +00:00
< tr > < td align = "left" valign = "top" > • < a href = "#ntp_002dwait-tries" accesskey = "2" > ntp-wait tries< / a > < / td > < td > < / td > < td align = "left" valign = "top" > tries option (-n)
2019-03-07 13:01:16 +00:00
< / td > < / tr >
2023-05-11 18:17:53 +00:00
< tr > < td align = "left" valign = "top" > • < a href = "#ntp_002dwait-sleep" accesskey = "3" > ntp-wait sleep< / a > < / td > < td > < / td > < td align = "left" valign = "top" > sleep option (-s)
2019-03-07 13:01:16 +00:00
< / td > < / tr >
2023-05-11 18:17:53 +00:00
< tr > < td align = "left" valign = "top" > • < a href = "#ntp_002dwait-verbose" accesskey = "4" > ntp-wait verbose< / a > < / td > < td > < / td > < td align = "left" valign = "top" > verbose option (-v)
2019-03-07 13:01:16 +00:00
< / td > < / tr >
2023-05-11 18:17:53 +00:00
< tr > < td align = "left" valign = "top" > • < a href = "#ntp_002dwait-exit-status" accesskey = "5" > ntp-wait exit status< / a > < / td > < td > < / td > < td align = "left" valign = "top" > exit status
2019-03-07 13:01:16 +00:00
< / td > < / tr >
2023-05-11 18:17:53 +00:00
< tr > < td align = "left" valign = "top" > • < a href = "#ntp_002dwait-Authors" accesskey = "6" > ntp-wait Authors< / a > < / td > < td > < / td > < td align = "left" valign = "top" > Authors
2019-03-07 13:01:16 +00:00
< / td > < / tr >
2023-05-11 18:17:53 +00:00
< tr > < td align = "left" valign = "top" > • < a href = "#ntp_002dwait-Notes" accesskey = "7" > ntp-wait Notes< / a > < / td > < td > < / td > < td align = "left" valign = "top" > Notes
2019-03-07 13:01:16 +00:00
< / td > < / tr >
< / table >
< hr >
2023-05-11 18:17:53 +00:00
< span id = "ntp_002dwait-usage" > < / span > < div class = "header" >
2019-03-07 13:01:16 +00:00
< p >
Next: < 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 > < / p >
2014-12-20 22:52:39 +00:00
< / div >
2023-05-11 18:17:53 +00:00
< span id = "ntp_002dwait-help_002fusage-_0028_002d_002dhelp_0029" > < / span > < h4 class = "subsection" > 1.1 ntp-wait help/usage (< samp > --help< / samp > )< / h4 >
< span id = "index-ntp_002dwait-help" > < / span >
2019-03-07 13:01:16 +00:00
< p > This is the automatically generated usage text for ntp-wait.
< / p >
< p > The text printed is the same whether selected with the < code > help< / code > option
(< samp > --help< / samp > ) or the < code > more-help< / code > option (< samp > --more-help< / samp > ). < code > more-help< / code > will print
the usage text by passing it through a pager program.
2014-12-20 22:52:39 +00:00
< code > more-help< / code > is disabled on platforms without a working
< code > fork(2)< / code > function. The < code > PAGER< / code > environment variable is
2019-03-07 13:01:16 +00:00
used to select the program, defaulting to < samp > more< / samp > . Both will exit
2014-12-20 22:52:39 +00:00
with a status code of 0.
2019-03-07 13:01:16 +00:00
< / p >
< div class = "example" >
2023-06-06 12:26:44 +00:00
< pre class = "example" > ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p17
2019-03-07 13:01:16 +00:00
USAGE: ntp-wait [ -< flag> [< val> ] | --< name> [{=| }< val> ] ]...
2014-12-20 22:52:39 +00:00
-n, --tries=num Number of times to check ntpd
-s, --sleep=num How long to sleep between tries
-v, --verbose Be verbose
-?, --help Display usage information and exit
--more-help Pass the extended usage text through a pager
Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.
2019-03-07 13:01:16 +00:00
< / pre > < / div >
2014-12-20 22:52:39 +00:00
2019-03-07 13:01:16 +00:00
< hr >
2023-05-11 18:17:53 +00:00
< span id = "ntp_002dwait-tries" > < / span > < div class = "header" >
2019-03-07 13:01:16 +00:00
< p >
Next: < 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 > < / p >
< / div >
2023-05-11 18:17:53 +00:00
< span id = "tries-option-_0028_002dn_0029" > < / span > < h4 class = "subsection" > 1.2 tries option (-n)< / h4 >
< span id = "index-ntp_002dwait_002dtries" > < / span >
2014-12-20 22:52:39 +00:00
2019-03-07 13:01:16 +00:00
< p > This is the “ number of times to check ntpd” option.
This option takes a number argument.
2014-12-20 22:52:39 +00:00
The maximum number of times we will check < code > ntpd< / code > to see if
2019-03-07 13:01:16 +00:00
it has been able to synchronize and stabilize the system clock.
< / p > < hr >
2023-05-11 18:17:53 +00:00
< span id = "ntp_002dwait-sleep" > < / span > < div class = "header" >
2019-03-07 13:01:16 +00:00
< p >
Next: < 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 > < / p >
2014-12-20 22:52:39 +00:00
< / div >
2023-05-11 18:17:53 +00:00
< span id = "sleep-option-_0028_002ds_0029" > < / span > < h4 class = "subsection" > 1.3 sleep option (-s)< / h4 >
< span id = "index-ntp_002dwait_002dsleep" > < / span >
2019-03-07 13:01:16 +00:00
< p > This is the “ how long to sleep between tries” option.
This option takes a number argument < samp > secs-between-tries< / samp > .
We will sleep for < samp > secs-between-tries< / samp > after each query
of < code > ntpd< / code > that returns " the time is not yet stable" .
< / p > < hr >
2023-05-11 18:17:53 +00:00
< span id = "ntp_002dwait-verbose" > < / span > < div class = "header" >
2019-03-07 13:01:16 +00:00
< p >
Next: < 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 > < / p >
2014-12-20 22:52:39 +00:00
< / div >
2023-05-11 18:17:53 +00:00
< span id = "verbose-option-_0028_002dv_0029" > < / span > < h4 class = "subsection" > 1.4 verbose option (-v)< / h4 >
< span id = "index-ntp_002dwait_002dverbose" > < / span >
2019-03-07 13:01:16 +00:00
< p > This is the “ be verbose” option.
By default, < code > ntp-wait< / code > is silent.
With this option, < code > ntp-wait< / code > will provide status information.
< / p > < hr >
2023-05-11 18:17:53 +00:00
< span id = "ntp_002dwait-exit-status" > < / span > < div class = "header" >
2019-03-07 13:01:16 +00:00
< p >
Next: < 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 > < / p >
2014-12-20 22:52:39 +00:00
< / div >
2023-05-11 18:17:53 +00:00
< span id = "ntp_002dwait-exit-status-1" > < / span > < h4 class = "subsection" > 1.5 ntp-wait exit status< / h4 >
2014-12-20 22:52:39 +00:00
< p > One of the following exit values will be returned:
2019-03-07 13:01:16 +00:00
< / p > < dl compact = "compact" >
< dt > ‘ < samp > 0 (EXIT_SUCCESS)< / samp > ’ < / dt >
< dd > < p > Successful program execution.
< / p > < / dd >
< dt > ‘ < samp > 1 (EXIT_FAILURE)< / samp > ’ < / dt >
< dd > < p > The operation failed or the command syntax was not valid.
< / p > < / dd >
2014-12-20 22:52:39 +00:00
< / dl >
2019-03-07 13:01:16 +00:00
< hr >
2023-05-11 18:17:53 +00:00
< span id = "ntp_002dwait-Authors" > < / span > < div class = "header" >
2019-03-07 13:01:16 +00:00
< p >
Next: < 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 > < / p >
2014-12-20 22:52:39 +00:00
< / div >
2023-05-11 18:17:53 +00:00
< span id = "ntp_002dwait-Authors-1" > < / span > < h4 class = "subsection" > 1.6 ntp-wait Authors< / h4 >
2019-03-07 13:01:16 +00:00
< hr >
2023-05-11 18:17:53 +00:00
< span id = "ntp_002dwait-Notes" > < / span > < div class = "header" >
2019-03-07 13:01:16 +00:00
< p >
Previous: < 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 > < / p >
2014-12-20 22:52:39 +00:00
< / div >
2023-05-11 18:17:53 +00:00
< span id = "ntp_002dwait-Notes-1" > < / span > < h4 class = "subsection" > 1.7 ntp-wait Notes< / h4 >
2019-03-07 13:01:16 +00:00
< hr >
2014-12-20 22:52:39 +00:00
2019-03-07 13:01:16 +00:00
< / body >
< / html >