problem with Time in Dapper

Daniel Pittman daniel at rimspace.net
Wed Oct 25 07:44:56 UTC 2006


Richard Johnson <nixternal at ubuntu.com> writes:
> On Monday 23 October 2006 20:10, Howard Coles Jr. wrote:
>
>> I have two machines running Dapper, one a desktop the other my laptop.
>>
>> The Desktop generally stays running all the time, for weeks on end.
>> The problem is the time drifts horribly.  In about 2 days the time
>> will be fast by at least 20 Minutes.  I have stopped it from checking
>> the hardware, and I have made sure the ntpd daemon is starting, but
>> no matter what it drifts.

[...]

> Sorry, if someone already put this, I appologize, but I am not about
> to read through everyone of the replies right now ;)
>
> Here is how you fix your problem. 

[... edit /etc/crontab and ...]

> On the line prior to the # at the end

[...]

> add the following line:
>
> 0  *    * * *   root    ntpdate -s ntp.ubuntu.com
>
> Once you have added that line, do the following:

I hate to say it Richard, but this is a pretty bad solution to keeping
time stable on any machine.  It will work, but it is very hard on the
software and system overall.

ntpdate is a tool designed to make gross corrections to the clock: it
simply sets the system clock to the appropriate time, no matter what.

So, if you were off by a tenth of a second time jump.  Off by ten
seconds, time jumps.  Off by an hour, time jumps.

Now, for an "off by an hour" machine that is probably the right thing to
do.  For one that is almost right, though, this is a pretty bad
solution -- software doesn't like time jumping about, and can react
pretty badly.[1]

Oh, and your suggestion uses a single server, so if ntp.ubuntu.com ever
has the wrong time your machine will slavishly follow suit and have the
wrong time as well.[2]


Anyway, running the ntp daemon is much nicer.  It has very good
properties for keeping the clock in sync.  It never jumps the clock, but
rather corrects it carefully so nothing ever sees a sudden change.

It pays serious attention to the properties of the clock in your
computer, so that it can correct for things like drift and accuracy
errors.

It carefully checks the time coming in from the server and, if it is low
quality, refuses to use it.  Given multiple servers it even checks them
against each other and rejects any that are not connected to reality.


So, while your suggestion will work it will have a host of other
problems.  On a single user desktop you may never notice them, but it
isn't a good thing to configure as a general rule.

Regards,
        Daniel

Footnotes: 
[1]  As in, you can see software fail to function at all, hang, serve
     outdated content, misuse caches, etc.

[2]  Yes, this /does/ happen in the real world.

-- 
Digital Infrastructure Solutions -- making IT simple, stable and secure
Phone: 0401 155 707        email: contact at digital-infrastructure.com.au
                 http://digital-infrastructure.com.au/





More information about the kubuntu-users mailing list