ntpwait [-vV] [-n number] [-s secs]
The ntpwait 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.
ntpwait will send at most number queries to ntpd(8), sleeping for secs seconds after each status return that says ntpd(8) has not yet produced a synchronized and stable system clock.
ntpwait will do this quietly, unless the -v flag is provided.
-n number, --tries=number
The maximum number of times we will check ntpd to see if it has been able to synchronize and stabilize the system clock.
-s secs-between-tries, --sleep=secs-between-tries
We will sleep for secs-between-tries after each query of ntpd that returns "the time is not yet stable".
-v, --verbose
By default, ntpwait is silent. With this option, ntpwait will provide status information, including time to synchronization in seconds.
-V, --version
If you are running Python at a version older than 3.3, the report on time to synchronization may be thrown off by NTP clock stepping.
One of the following exit values will be returned:
0
1
2