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

Re: ntpdate from cron -- DON'T DO THAT!



On Sun, 2002-12-22 at 00:51, N. Thomas wrote:
> * 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
> putting:
> 
>     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.
> 
> hth,
> thomas

Thank you very much for this information.
I was one of the people using ntpdate in a cron job, although it was not
because I was lazy, all my servers have ntpd, I only used ntpdate on
clients.
>From now, I'll only run ntpd on all my clients (and once again, I took
the time reading the ntpd documentation) and not ntpdate anymore.

Thanks.

Antoine




Reply to: