Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-30-2006, 04:40 PM   #1
Registered: Jun 2005
Posts: 374

Rep: Reputation: 30
NTP on servers and clocks still drifting apart

I have a variety of servers on a variety of distros all running NTPd using the same 2 local timeservers to keep their clocks synced. The timeservers work and I can manually sync to them via ntpdate, but I have noticed that some of the servers drift when left unattended. They all have the ntpd daemon running the in the background all the time, as verified with ps -ef|grep ntp. The timeservers are always synced to the exact same second whenever I check them.

The only difference that I can see between the servers that keep time and the ones that drift several minutes apart are running as ntp user and others are running as root.

Is it possible that the ntp user doesn't have enough privilege to change the system time to keep it in sync?

Although, I'm not even sure that this is the reason since I don't think that even all the root running ones are perfectly in sync as they should be, although most of those are.

What are your experiences with ntpd?

Any ideas why my ntpd isn't keep the servers synced to the second like it is supposed to?

Old 10-30-2006, 04:47 PM   #2
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 272Reputation: 272Reputation: 272
My first thought is are the two local timeservers sync'd with each other and keeping time. If one of them is drifting, some random sampling of your clients would be off at any one time. EDIT: sorry, after re-reading, it seems you checked this....

My second guess is that maybe the update interval for the clients isn't uniform and some of them are not updating frequently enough. How long does it take for them to drift?
Old 10-30-2006, 04:56 PM   #3
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
It could be a permissions issue. If your script is running ntpdate with the option -s (which I believe most installations do), you won't see a permissions error when the script is actually run, it will be sent to syslog. So if you aren't watching syslog, it can actually fail with a permissions error without you even knowing. But then, you said ntpd was actually running...

That said, some hardware clocks just suck. The clock on my desktop will drift a second off of my ntp server after only about 10 minutes.

I don't fully understand your situation, but why not have only a single server running ntpd, and have all of the machines on the LAN sync to that, rather than all of them trying to sync to an Internet based server?
Old 10-30-2006, 06:57 PM   #4
Registered: Jun 2005
Posts: 374

Original Poster
Rep: Reputation: 30
"2 local timeservers" - I have local ntp servers on my lan and the servers are syncing to them in the same order in their ntp.conf files. I don't know how often ntpd does it's sync thingy, but it seems they drift a few minutes apart after not looking at them for a few days.

I've checked syslog but the ntpd doesn't seem to complain about anything. In fact, it doesn't mention anything other than when it starts/stops. Perhaps I should increase the logging verbosity or something.
Old 10-30-2006, 09:41 PM   #5
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
Or just do the quick 'n' dirty and set up a cron job. I never could get ntp to work right, so I just said screw it and set up a cron job every night to run rdate and sync that way.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Put 2 clocks madmax1143 Linux - Software 2 07-21-2006 09:36 AM
Syncronize Clocks newuser455 Linux - Newbie 2 07-15-2005 09:23 PM
NTP cannot work with timeserver, NTP-d can jerryvapps Linux - Networking 0 08-04-2004 03:04 PM
Drifting, falling mouse pointer on Tecra S1 pneum0nic Linux - Laptop and Netbook 0 12-19-2003 03:11 PM
Synchronising servers' clocks Paulo Ges Linux - Hardware 1 09-05-2003 01:31 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:19 PM.

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