„What time is it?” Using rdate/ntpdate to set time on Linux server¶
ntpdate¶
Ntpdate sets the local date and time on your machine by polling the Network Time Protocol (NTP - RFC 1305) server given as the server arguments to determine the correct time.
The accuracy and reliability of ntpdate depends on the number of servers and the number of polls each time it is run and the interval between runs.
Ntpdate can be run manually as necessary to set the host clock, or it can be run from the host startup script to set the clock at boot time.
Using ntpdate with cron scripts is no substitute for the NTP daemon, which uses sophisticated algorithms to maximize accuracy and reliability while minimizing resource use.
Finally, since ntpdate does not discipline the host clock frequency as does ntpd, the accuracy using ntpdate is limited.
Installation of ntpdate is simple apt-get install ntpdate
.
Usage of ntpdate¶
ntpdate -t 3 pl.pool.ntp.org
hwclock --systohc
List of polish ntp servers¶
ntp.certum.pl
ntp1.tp.pl
ntp1.net.icm.edu.pl
vega.cbk.poznan.pl
rdate¶
Rdate is a tool for querying the current time from a network server and, optionally, setting the system time (for detailed protocol specification see rdate RFC - RFC 868).
Rdate uses the Time Protocol which is generally considered obsolete and has been replaced by the Network Time Protocol (NTP).
Rate is generally used only on systems where NTP is not available, or in specialized circumstances where it is required that system time be set correctly as soon as possible during initial setup, before services which may be vulnerable to time-changes.
Installation of rdate is simple apt-get install rdate
.
Usage of rdate¶
rdate -s vega.cbk.poznan.pl
hwclock --systohc
List of polish rdate servers¶
task.gda.pl
vega.cbk.poznan.pl