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, that can be used to query a Network Time Protocol (NTP) server and display the time offset of the system clock relative to the server clock. Run as root, it can correct the system clock to this offset as well. It can be run as an interactive command or from a cron job.

This document applies to version 4.2.7p225 of ntp-wait.

The program implements the SNTP protocol as defined by RFC 5905, the NTPv4 IETF specification.

Short Contents



Description

By default, ntp-wait writes the local data and time (i.e., not UTC) to the standard output in the format:

     1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs

where YYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time, (+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC), and the +4.567 +/- 0.089 secs indicates the time offset and error bound of the system clock relative to the server clock.



Invoking ntp-wait

This section was generated by AutoGen, the aginfo template and the option descriptions for the ntp-wait program. It documents the ntp-wait usage text and option meanings.

This software is released under a specialized copyright license.


Next: , Up: ntp-wait Invocation

ntp-wait usage help (-?)

This is the automatically generated usage text for ntp-wait:

/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.]


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.



Usage

The simplest use of this program is as an unprivileged command to check the current time, offset, and error in the local clock. For example:

    ntp-wait ntpserver.somewhere

With suitable privilege, it can be run as a command or in a crom job to reset the local clock from a reliable server, like the ntpdate and rdate commands. For example:

    ntp-wait -a ntpserver.somewhere