Ntp-wait User's Manual


Next: , Previous: (dir), Up: (dir)

Simple Network Time Protocol User Manual

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.7p364 of ntp-wait.

Short Contents



Description

The ntp-wait program blocks until ntpd is in synchronized state. This can be useful at boot time, to delay the boot sequence until after ntpd -g has set the time.



Invoking 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 section was generated by AutoGen, using the agtexi-cmd template and the option descriptions for the ntp-wait program. This software is released under the NTP license, <http://ntp.org/license>.


Next: , Up: ntp-wait Invocation

ntp-wait help/usage (--help)

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.

/deacon/backroom/snaps/ntp-dev/A.snap/scripts/ntp-wait version [unknown] calling Getopt::Std::getopts (version 1.05 [paranoid]),
running under Perl version 5.8.8.

Usage: ntp-wait [-OPTIONS [-MORE_OPTIONS]] [--] [PROGRAM_ARG1 ...]

The following single-character options are accepted:
        With arguments: -n -s
        Boolean (without arguments): -v

Options may be merged together.  -- stops processing of options.
Space is not required between options and their arguments.
  [Now continuing due to backward compatibility and excessive paranoia.
   See ``perldoc Getopt::Std'' about $Getopt::Std::STANDARD_HELP_VERSION.]


Next: , Previous: ntp-wait, Up: ntp-wait Invocation

option (-n)

This is the “number of times to check ntpd” option. This option takes an argument number num-tries. The maximum number of times we will check ntpd to see if it has been able to synchronize and stabilize the system clock.


Next: , Previous: ntp-wait, Up: ntp-wait Invocation

option (-s)

This is the “how long to sleep between tries” option. This option takes an argument number secs-between-tries. We will sleep for secs-between-tries after each query of ntpd that returns "the time is not yet stable".


Next: , Previous: ntp-wait, Up: ntp-wait Invocation

option (-v)

This is the “be verbose” option. By default, ntp-wait is silent. With this option, ntp-wait will provide status information.


Next: , Previous: ntp-wait, Up: ntp-wait Invocation

presetting/configuring ntp-wait

Any option that is not marked as not presettable may be preset by loading values from environment variables named NTP-WAIT and NTP-WAIT_<OPTION_NAME>. <OPTION_NAME> must be one of the options listed above in upper case and segmented with underscores. The NTP-WAIT variable will be tokenized and parsed like the command line. The remaining variables are tested for existence and their values are treated like option arguments.

The command line options relating to configuration and/or usage help are:

version (-)

Print the program version to standard out, optionally with licensing information, then exit 0. The optional argument specifies how much licensing detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument. Only the first letter of the argument is examined:

version
Only print the version. This is the default.
copyright
Name the copyright usage licensing terms.
verbose
Print the full copyright usage licensing terms.


Next: , Previous: ntp-wait config, Up: ntp-wait Invocation

ntp-wait exit status

One of the following exit values will be returned:

0 (EXIT_SUCCESS)
Successful program execution.
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.


Next: , Previous: ntp-wait exit status, Up: ntp-wait Invocation

ntp-wait Authors


Previous: ntp-wait Authors, Up: ntp-wait Invocation

ntp-wait Notes