The ntpdate program sets the local date and time. ntpdate determines the correct date and time by polling the NTP server on the specified server or servers.
ntpdate |
[-ds] [-o <version#>] [-p <zeitstempel_anzahl>] [-t <timeout>] [-a key] <server |
ntpdate must be executed on the local computer by the POSIX administrator. Several timestamps are received from each of the specified servers; the most suitable is then chosen with the help of the NTP algorithms for selecting an NTP clock.
ntpdate can be included in a startup script to synchronize the clock during POSIX-START and/or executed regularly via cron. Using at least three to four servers rather than one produces better results and reduces the susceptibility of servers to functional failures.
ntpdate can only be executed when the ntpd daemon is not running on the same computer.
The ntpdate program is to be discontinued in the future. You should therefore consider whether you should switch to using ntpd with the -q option in good time.
Options
Further information on the options described below and those which are not listed is available, for example, in the HTML documentation.
-d
This option can be used to simulate an ntpdate action, i.e. without actually carrying it out.
Furthermore, it also provides debugging information.
-s
This option instructs ntpdate to log the actions via the syslog function (output in /var/adm/syslog), instead of using the standard output. This option is useful when ntpdate is executed by cron.
-o <version#>
This option can be used to specify a different version number than the default value of 4 for use in the transmitted NTP packets.
The possible values are 1, 2, 3 or 4.
-p <number_of_timstamps>
This option can be used to set the number of timestamps received by ntpdate to values from 1 to 8.
The default value is 4.
-t <timeout>
This option can be used to specify the time to wait for an answer. The timeout isrounded up or down to a multiple of 0.2 seconds.
The default value is 1 second.
-a <key>
Activates the authentication function and specifies the key indicator which is to be used for authentication. The keys and the key indicators must match in the client and server key files.
<server>
Specifies one or more computers from which the timestamp is to be requested.