LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-22-2011, 06:49 AM   #1
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

Rep: Reputation: 40
ntp doesn't update system time


I'm having problems with the time on one of my computers. It's loosing nearly 4 minute per hour. I installed the ntp program, but for some reason it won't work on this computer (a fresh install of Ubuntu 11.04 32bit).

The defaults didn't work the same as my other computers. I used the command to stop apparmor (sudo invoke-rc.d apparmor teardown) in case that was the problem. As far as I know, no firewall is started by default. I checked and couldn't find any.

My /etc/ntp.conf file is exactly as it is on the machine that is working:

egrep -v "^#|^$" /etc/ntp.conf
Code:
driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org
server ntp.ubuntu.com
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1
After a few minutes the machine that works will have an out put of the command “ntpq -p” with:
Code:
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*69.50.219.51    128.138.188.172  2 u    1   64   37  124.878   -8.041  40.524
+vf1.bbnx.net    128.4.1.1        2 u    3   64   37   72.858   -6.568   2.455
+abyss.simplysam 69.36.224.15     2 u    -   64   37  119.258   -4.199   1.423
-ntp.sunflower.c 128.206.12.130   3 u    3   64   37   71.650   83.194   1.216
-europium.canoni 193.79.237.14    2 u   64   64   17  111.547  -10.939   0.620
The machine that fails will never have the symbols, “*,+, and -”, prefixes. The machine that file's “ntpq -p” output is:
Code:
 smtp.envirahost 128.138.188.172  2 u    5   64  177   57.014  33716.6 13531.3
 rikku.vrillusio 209.51.161.238   2 u    5   64  177   42.774  33710.4 13484.5
 mirror          204.9.54.119     2 u    2   64  177   54.015  33889.3 13472.6
 barricade.rack9 192.43.244.18    2 u   66   64   77   43.133  30487.7 11514.3
 europium.canoni 193.79.237.14    2 u    3   64  177  106.577  33812.1 13484.2
No ntp.drift file is created by the machine that fails. I verified that the ntp.conf file is working by placing an intentionally misspelled command in it "xxxx". The syslog shows and error at the line with the incorrect command.

I also tried creating a blank ntp.drift file for ntp to use. It complained of a mal-formed ntp.drift file. So I removed the file I created so that it'll create it's own at the right time.

I've done lots of research. The ntp pool page ( http://www.pool.ntp.org/en/use.html ) says the star “*” is a very important component, as it shows which server is in use. The “*” never appears with the machine that fails.

Can someone advise me what I might be missing in this occasion or any other test I can perform to identify why ntp is failing on this machine.

Thanks in advance for any suggestions or comments.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
Old 05-22-2011, 08:26 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
NTP has a maximum sanity drift; this machine is exceeding that. Your best option is to cron ntpdate to run every minute, which will keep you within 4 seconds.
 
1 members found this post helpful.
Old 05-22-2011, 08:35 AM   #3
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by macemoneta View Post
NTP has a maximum sanity drift; this machine is exceeding that. Your best option is to cron ntpdate to run every minute, which will keep you within 4 seconds.
Thanks.

By the way, this machine, instance, is running off a usb drive. I'll backup up the pen drive today and clonezilling it to a regular hard drive.

I'm sure the slow pen drive is the culprit of the sanity drift issue. I'll post the results after it's running on a normal hard drive.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
Old 05-22-2011, 11:19 AM   #4
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

Original Poster
Rep: Reputation: 40
I got the problem resolved. First I'll mention the steps, which the last one resolving the issue.

I ran the system without the 11:04 gdm. The problem persisted. Then I cloned the pen drive installation to a hard drive and ran the system from the hard drive. That didn't do it. I also ran the system without the X11. The problem persisted.

I kind of scratched my head because it's running on an I7 with high performance nvidia graphics card with the latest drivers.

I don't usually make changes to the cmos, except for basic things like boot preference. So rather than going through all the items in the cmos and thinking there must be a problem with the hardware clock, I used the cmos option to load the default settings. Then booted the OS.

Now the ntp is working perfectly, just as all the other computers in my shop.

Thanks again, Macemoneta, for pointing me into the right direction to watch the sanity output.

– L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Log Date/time doesn't change with system time saurabhchokshi Linux - Software 5 07-07-2010 12:27 AM
update system time from internet logicalfuzz Slackware 24 10-23-2008 06:27 PM
system time goes ahead....even with NTP rimvydazas Linux - Server 7 09-02-2007 03:45 AM
ntp client update time from windows ? minhsys Linux - Server 2 02-26-2007 02:31 AM
Sync KDE/System Time w/ NTP carlosinfl Linux - General 6 03-15-2006 03:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 05:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration