Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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?
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?
"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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.