The ntpdate command sets the local date and time by polling the NTP servers specified to determine the correct time. It obtains a number of samples from each server specified and applies the standard NTP clock filter and selection algorithms to selec...
显示全部The ntpdate command sets the local date and time by polling the NTP servers specified to determine the correct time. It obtains a number of samples from each server specified and applies the standard NTP clock filter and selection algorithms to select the best of the samples.
The ntpdate command makes time adjustments in one of the following ways:
If it determines that the clock is off by more than 0.5 seconds, it steps the clock's time by calling the settimeofday subroutine. This is the preferred method at boot time.
If it determines that the clock is off by less than 0.5 seconds, it slews the clock's time by calling the adjtime subroutine with the offset. This method tends to keep a badly drifting clock more accurate, though at some expense to stability. When running the ntpdate command on a regular basis from the cron command instead of running a daemon, doing so once every hour or two results in precise enough timekeeping to avoid stepping the clock.
收起