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

Re: Message about ntp when updating



Bob Proulx wrote, on 01/11/12 18:32:
> Sthu Deus wrote:
>> Not answering to Your question, but as mine opinion - if You do not
>> intend other hosts to be sync-ing time w/ this host, I think You need
>> the service at all.
> 
> Time is important to most internet hosts.  We always hate to see email
> from users with a date of 1970 for example.  I would always install
> the ntp package to ensure that time is updated on the local host machine.
> 
>> For sync-ing time from Internet for the host You can use ntpdate in
>> cron/anacron for example.
> 
> Please no.  Syncing time from cron is very bad.  It causes the clock
> to be stepped and can create very hard to debug behavior.  Setting the
> clock from cron is the worst way to do this.
> 
> For example if a process is set to trigger at a particular time and
> the cron task changes the time out from under it then it will either
> trigger early or late or possibly not at all.  For example on a file
> server the time is used to set timestamps of files which is used by
> the make program and jittery clocks can cause all kinds of strange
> make behavior.  And those are just a couple of examples of weird
> behavior that is possible.
> 
> It is much better to use a smart time protocol aware daemon such as
> ntpd which knows how to smoothly adjust the time so that every clock
> tick is seen and the time is kept updated without clock steps.
> 
> Bob

Here I'm using "rdate -an" in a cron job with something like the following

  rdate -acnv $NTPHOST

the "-a" option uses "the adjtime(2) call to gradually skew the local time to
the remote time rather than just hopping."
-- 
Best regards,
Jörg-Volker.



Reply to: