This document describes the use of the NTP Project's ntp-wait
program.
If there are time-sensitive applications,
the proper sequence of events is to
run ntpd -g
as early as possible,
then invoke all of the non-time-sensitive process,
run ntp-wait
to block
until the system's time has stabilized and synchronized,
and only then start any applicaitons (like database servers) that require
accurate and stable time.
This document applies to version 4.2.8p12 of ntp-wait
.
ntp-wait
will send at most
num-tries
queries to
ntpd(8)
,
sleeping for
secs-between-tries
after each status return that says
ntpd(8)
has not yet produced a synchronized and stable system clock.
ntp-wait
will do this quietly, unless the
-v
flag is provided.
This can be useful at boot time, to delay the boot sequence until after
ntpd -g
has set the time.
This section was generated by AutoGen,
using the agtexi-cmd
template and the option descriptions for the ntp-wait
program.
This is the automatically generated usage text for ntp-wait.
The text printed is the same whether selected with the help
option
(--help) or the more-help
option (--more-help). more-help
will print
the usage text by passing it through a pager program.
more-help
is disabled on platforms without a working
fork(2)
function. The PAGER
environment variable is
used to select the program, defaulting to more. Both will exit
with a status code of 0.
ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p12 USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]... -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.
This is the “number of times to check ntpd” option.
This option takes a number argument.
The maximum number of times we will check ntpd
to see if
it has been able to synchronize and stabilize the system clock.
This is the “how long to sleep between tries” option.
This option takes a number argument secs-between-tries.
We will sleep for secs-between-tries after each query
of ntpd
that returns "the time is not yet stable".
This is the “be verbose” option.
By default, ntp-wait
is silent.
With this option, ntp-wait
will provide status information.
One of the following exit values will be returned: