[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ntpdate from cron -- DON'T DO THAT!

* Sonny Kupka <sonny@nothnbut.net> [2002-12-21 10:46:12 -0600]:
> I have ntpdate installed on woody.. and it's not automagically keeping my 
> system in sync..

Contrary to what you may have heard, ntpdate does not keep your system
clock synced. Also ignore the foolish recommendations to run ntpdate
from a cron job.

ntpdate works like date(1), but it sets your clock's time to that of an
ntp server (or servers) instead of having it specified by you.

If you want to keep your clock in sync use ntpd -- that's what it was
designed for. It uses many sophisticated algorithms and statistical
methods to accomplish this. After some time, it can even figure out how
"bad" your system clock is (i.e. its drift) and compensate for it, even
if your network connection goes out.

Unfortunately, some people, instead of taking the time to read the ntp
documentation and writing a proper ntp.conf file, took the easy route
and started running ntpdate from cron.

This caused two problems, firstly it did not keep very good time:
immediately after you called ntpdate, your clock would begin to drift
again. And  more importantly, every hour or so, the ntp servers were
being affected by a "thunderclap" effect, the result of everybody

    0 * * * * /usr/local/bin/ntpdate

or something similar into their crontab files. The ntp daemon does not
do this as it randomizes the time it waits between queries.

For this reason, Dr. Mills (ntp author) has deprecated ntpdate, and
indeed, he will be removing it completely from a future release.


N. Thomas
Etiamsi occiderit me, in ipso sperabo

Reply to: