Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
Can you post your whole ntp.conf file? What do you get if you run the "ntpq" command and type "peers"? –  BenTobin Feb 17 '11 at 22:46
add comment

2 Answers

up vote 4 down vote accepted

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/defaults/ntpdate

NTPDATE_USE_NTP_CONF=yes
share|improve this answer
    
I tried the ntpdate -q and got an interesting message 18 Feb 08:24:30 ntpdate[13940]: no server suitable for synchronization found. So now I'm wondering if there is something blocking my ability to sync the clock; corporate firewall rules perhaps? –  droffo Feb 18 '11 at 14:25
    
Hmm - I tried the same on my Asus eee 900 netbook (also with Ubuntu 10.10) and I get the same message while connected to the corp network. I'll try again later from a Starbucks or home and see if I get the same results. –  droffo Feb 18 '11 at 14:30
    
Correction. Should be: /etc/default/ntpdate –  david6 Jan 2 '13 at 0:25
    
NTPDATE does not appear to honour the setting: NTPDATE_USE_NTP_CONF=yes in the config file (/etc/default/ntpdate). –  david6 Jan 2 '13 at 2:30
add comment

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.

share|improve this answer
    
Thanks - that was a good article. Maybe I'll should just wait till 11.04 comes out! –  droffo Feb 18 '11 at 14:23
    
This does not address issues raised in: bugs.launchpad.net/ubuntu/+source/ntp/+bug/176844 –  david6 Jan 2 '13 at 2:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.