Clock drift even though NTPD running

I'm having a problem with the clock drifting on my PC. I'M running

  • Ubuntu 10.10 on an somewhat crusty IBM e-server (1.5GB RAM, 2.4GHz CPU)

  • ntpd is running (started at run level 2)

  • servers are defined:

    server 1.us.pool.ntp.org
    server 2.us.pool.ntp.org
    server 3.us.pool.ntp.org
    server time.nrc.ca
    server ntp1.cmc.ec.gc.ca
    server ntp2.cmc.ec.gc.ca
    server wuarchive.wustl.edu
    server clock.psu.edu
    

Looking at the log file, it would seem that the ntp daemon is running, but the system clock never seems to be set, however.

If I manually set the time from a Casio "atomic" watch, the date/time displayed by the Clock applet drifts out of sync over time.

Looking at the log file (below) it would seem the ntp daemon started ok and is running.

So I am totally flummoxed right now :-(

Here's a copy of my ntp.log file.


Solution 1:

NTP daemons don't want to do a sudden massive jump in system time. For one, it borks the chronology of entries in your log files, system daemons might freak out, etc. What it does instead is "drift" your system clock into place. If you want to check how far off from "the actual time" you are you can query an ntp server:

ntpdate -q pool.ntp.org

NTP works by adjusting the length of a second on your system by a slight bit so that you slowly get the correct time. It can take a while for the drift to happen if your offset is high. What you can do though is force a hard sync once:

service ntp stop
ntpdate pool.ntp.org
service ntp start

Edit: in response to the comments below.

Set this line up in /etc/default/ntpdate

NTPDATE_USE_NTP_CONF=yes

Solution 2:

There have been some problems with NTP synchronisation in Ubuntu. Some fixes were identified and will be in the 11.04 release in April.

Colin Watson wrote a detailed blog post about this as a response to an Ubuntu Brainstorm post.