LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ntp time 12 minutes slow (https://www.linuxquestions.org/questions/linux-software-2/ntp-time-12-minutes-slow-754898/)

GregLee 09-13-2009 03:50 PM

ntp time 12 minutes slow
 
My Linux system shows a current time with the date command that is 12-14 minutes behind the time shown by my DirecTV satellite receiver or my wife's MS Vista system. ntpd is running; it's polling several ntp servers; ntpstat claims that the system time is accurate to 11ms. What could be going wrong?

michaelk 09-13-2009 04:07 PM

Post the output of the command
ntpq -p

GregLee 09-13-2009 05:36 PM

Code:

# ntpq -p
    remote          refid      st t when poll reach  delay  offset  jitter
==============================================================================
 redline.mednor. 209.81.9.7      2 u  350 1024  337  82.043  795371. 2333.87
 ns1.anodized.co 173.14.47.149    2 u  113 1024  377  137.579  793749. 1916.71
 198.186.191.229 199.165.76.11    2 u  21 1024  377  75.466  795758. 1815.77
*LOCAL(0)        .LOCL.          10 l  31  64  377    0.000    0.000  0.001
 net.its.hawaii. .STEP.          16 u  14d 1024    0    0.000    0.000  0.000


michaelk 09-13-2009 05:49 PM

Basically none of the time servers are good enough to use (look at the values for offset and jitter) so ntp has defaulted to your local clock. Note the * beside LOCAL(0).

What does your /etc/ntp.conf file contain for servers?
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org


Offset is the difference between your clock and the server.

Jitter is a measurement of stability of the timer server.

Changing the clock within a couple of minutes will help sync your system to a ntp server faster.

GregLee 09-13-2009 06:23 PM

Quote:

Originally Posted by michaelk (Post 3681509)
Basically none of the time servers are good enough to use (look at the values for offset and jitter) so ntp has defaulted to your local clock. Note the * beside LOCAL(0).

What does your /etc/ntp.conf file contain for servers?

Oh, so that's what "*" means. But I don't know what is the problem with the last server listed. Here are the servers requested in ntp.conf:
Code:

server 0.fedora.pool.ntp.org
server 1.fedora.pool.ntp.org
server 2.fedora.pool.ntp.org
server 127.127.1.0
server ntp.hawaii.edu

I quess I shouldn't have 127.127.1.0 in there, so that ntpd will look outside my system. Wait ... I've removed the line "server 127.127.1.0" from /etc/ntp.conf, restarted ntpd, waited about 4 minutes, and now my system time appears to be correct. Problem solved; thanks loads.

michaelk 09-13-2009 06:40 PM

BTW server 127.127.1.0 is a fake time server when your computer can not connect to the internet. Restarting ntpd was probably all that was needed. At least its working now.

TB0ne 09-13-2009 10:09 PM

Quote:

Originally Posted by GregLee (Post 3681542)
Oh, so that's what "*" means. But I don't know what is the problem with the last server listed. Here are the servers requested in ntp.conf:
Code:

server 0.fedora.pool.ntp.org
server 1.fedora.pool.ntp.org
server 2.fedora.pool.ntp.org
server 127.127.1.0
server ntp.hawaii.edu

I quess I shouldn't have 127.127.1.0 in there, so that ntpd will look outside my system. Wait ... I've removed the line "server 127.127.1.0" from /etc/ntp.conf, restarted ntpd, waited about 4 minutes, and now my system time appears to be correct. Problem solved; thanks loads.

These aren't VM servers by any chance, are they?? Linux guests under VMware ESX had a bug, causing time to drift quickly. It would eventually get so far out of whack, that NTP would die, or go back to local-reference.

VMware and/or RedHat (can't remember right now), released a patch that supposedly fixed it.

michaelk 09-14-2009 06:36 AM

I do not think that VM servers are allowed in the ntp pool but I could be wrong.

Shadow_7 09-14-2009 11:22 AM

I don't do anything that requires that sort of constant syncing. I just run "ntpdate time-b.nist.gov" every so often and that is good enough. I'm rarely more than five minutes off if I do that at least once a month. Baring any sort of power outage, heavy media processing / game playing, or other things that toys with the system clock. One caveat is that I do have to lower my network usage (dial-up connection) to have it work.


All times are GMT -5. The time now is 02:46 PM.