NAME | SYNOPSIS | DESCRIPTION | OPTIONS | FILES | ATTRIBUTES | SEE ALSO | NOTES
The ntpdate utility sets the local date and time. To determine the correct time, ntpdate polls the Network Time Protocol (NTP) servers that are given as arguments to ntpdate. This utility must be run as root on the local host. It obtains a number of samples from each of the servers and applies the standard NTP clock filter and selection algorithms to select the best sample to set the local date and time.
The reliability and precision of ntpdate improve dramatically as the number of servers increases. You can use a single server but you get better performance and greater resistance to inaccuracy for each server. The more servers you use, the more precise the result.
You can run ntpdate manually to set the host clock, or it can be run from the host startup script to set the clock at boot time. See sysadm.ini(4CC) for further information. This is useful in some cases to set the clock initially before starting the NTP daemon ntpd. As ntpdate does not discipline the host clock frequency as ntpd does, the accuracy you get using ntpdate is limited.
Time adjustments are made by ntpdate in one of two ways. If ntpdate determines the clock is in error more than 0.5 second, it will step the time by calling the system settimeofday() routine. If the error is less than 0.5 seconds, ntpdate will slew the time by calling the system adjtime() routine.
The ntpdate utility declines to set the date if an NTP server daemon, such as ntpd(1M), is running on the same host.
The following options are supported:
Authenticate transactions, using the key number, key. The keys and key numbers must match in both the client and server key files. The default is to disable the authentication function.
Step the time using the settimeofday() system call, rather than slewed (default) using the adjtime() system call. This option is used when called from a startup file at boot time.
Force the time to always be slewed using the adjtime() system call, even if the measured offset is greater than +-0.5 s. The default is to step the time using settimeofday() if the offset is greater than +-0.5 s. If the offset is much greater than +-0.5 s it can take a several hours to slew the clock to the correct value. During this time do not use the host to synchronize clients.
Enable the debugging mode, in which ntpdate displays all the steps it would go through to adjust the local clock, but does not actually adjust the clock. Information useful for general debugging is also be printed.
Specify an authentication processing delay, authdelay in seconds. See ntpd for details. This number is usually small enough to be negligible for purposes of ntpdate. However, specifying a value improves timekeeping on very slow CPU's.
Read keys from the file keyfile instead of the default file, /etc/ntp.keys. keyfile should be in the format described in ntpd.
Specify the NTP version for outgoing packets as the integer version, which can be 1 or 2. The default is 3. This allows ntpdate to be used with older NTP versions.
Set the number of samples ntpdate acquires from each server. samples can be between 1 and 8 inclusive. The default is 4.
Query only. Do not set the clock.
Log actions by way of the sysLog facility rather than to the standard output.
Set the time ntpdate spends, waiting for a response. The length of time to wait for a response is the timeout value divided by 0.2, in seconds. The default is 5 second, a value suitable for polling across a LAN.
Use an unprivileged port to send the packets from. This option is 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.
Be verbose. This option causes ntpdate's version identification string to be logged.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
The slew adjustment is 50% larger than the measured offset, as this helps to keep a badly drifting clock more accurate.
The version of NTP incorporated in ChorusOS is ntp-4.0.99i.
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | FILES | ATTRIBUTES | SEE ALSO | NOTES