Technical data

Configuring and Managing NTP
12.8 NTP Utilities
12.8.1 Setting the Date and Time with NTPDATE
The NTPDATE program sets the local date and time by polling a specified server
or servers to determine the correct time. A number of samples are obtained from
each of the servers specified, and a subset of the NTP clock filter and selection
algorithms are applied to select the best samples. The accuracy and reliability
of NTPDATE depends on the number of servers it polls, the number of polls it
makes each time it runs, and the interval length between runs.
Run NTPDATE manually to set the host clock or from the host startup file to set
the clock at boot time. It is useful in some cases to set the clock manually before
you start NTP. NTPDATE makes time adjustments (called ‘‘stepping the time’’) by
calling the OpenVMS routine SYS$SETIME.
Note
NTPDATE will not set the date if an NTP server is running on the same
host.
Table 12–3 describes the NTPDATE command options. To use these options,
define the NTPDATE command, as follows:
NTPDATE:==$SYS$SYSTEM:TCPIP$NTPDATE.EXE
Enter commands using the following format:
NTPDATE [option...] host [host...]
For example, the following command sets the clock based on the time provided
from one of the specified hosts (BIRDY, OWL, or FRED):
$ NTPDATE BIRDY OWL FRED
NTP sets the date and time by polling the servers you specify as arguments to
the command. Samples are obtained from each of the specified servers. NTP then
analyzes the results to select the best server to use as a time source.
Table 12–3 NTPDATE Options
Option Description
-d
Changes the time and prints information useful for debugging.
-o version
Specifies the NTP version (1 or 2) for outgoing packets (for
compatibility with older versions of NTP). Version 3 is the default.
-p n
Specifies the number of samples NTPDATE acquires from each server.
The default is four. You can specify from one to eight.
-q
Specifies a query only; does not set the clock.
12.8.2 Tracing a Time Source with NTPTRACE
Use the NTPTRACE utility to determine the source from which an NTP server
obtains its time. NTPTRACE follows the chain of time servers back to the master
time source.
To run NTPTRACE, define a foreign command as follows:
$ NTPTRACE:==$SYS$SYSTEM:TCPIP$NTPTRACE.EXE
12–16 Configuring and Managing NTP