6.1 NTPDate

NTPDate is used to set the local time and date by using NTP servers. The NTP servers are determined by specifying them in the NTPDate command line argument.

Usage:

NTPDate [-bBdhoquv] [-a key] [-e authdelay] [-k keyfile] [-o version] [-p samples] [-s logfile] [-t timeout] server [ ... ]

Table 6-1 NTPDate Parameters

Parameter

Description

-a key

Enables the authentication function and specifies the key identifier to be used for authentication as the argument keyntpdate. The keys and key identifiers must match in both the client and server key files.

The default is to disable the authentication function.

-B

Forces the time to always be slewed, even if the measured offset is greater than + or - 128 ms.

The default is to step the time if the offset is greater than + or - 128 ms.

NOTE:If the offset is greater than + or - 128 ms, it takes a long time (hours) to slew the clock to the correct value. During this time, the host should not be used to synchronize clients.

-b

Forces the time to be stepped, rather than slewed (default). This option should be used when called from a startup file at boot time.

-d

Enables the debugging mode. In the debugging mode, NTPDate goes through all the steps, but does not adjust the local clock. Information useful for general debugging is also displayed.

-e authdelay

Specifies the processing delay to perform an authentication function as the value authdelay, in seconds and fraction (see Section 6.5, XNTPD for details). This number is usually small enough to be negligible for most purposes, although specifying a value might improve timekeeping on very slow CPUs.

-h

Displays the help.

-k keyfile

Specifies the path for the authentication key file as the string keyfile. The default is sys:\etc\ntp.keys. This file should be in the format described in XNTPD.

-o version

Specifies the NTP version for outgoing packets as the integer version, which can be 1 or 2. This allows NTPDate to be used with older NTP versions.

IMPORTANT:If the -o option is not used, the default is set to 3.

-p samples

Specifies the number of samples to be acquired from each server as the integer samples, with values from 1 to 8 inclusive. The default is 4.

-q

Query only. Do not set the clock.

-s logfile

Enables logging of the XNTPD progress screen into the logfile.

-t timeout

Specifies the maximum time waiting for a server response as the value timeout, in seconds and fractions. The value is rounded off to a multiple of 0.2 seconds. The default is 1 second, which is a value suitable for polling across a LAN.

-u

Directs NTPDate to use an unprivileged port or outgoing packets. This is most useful when you are behind a firewall that blocks incoming traffic to privileged ports and you want to synchronize with hosts beyond the firewall. The -d option always uses unprivileged ports.

-v

Be verbose. This option logs NTPDate’s version identification string.