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

Notices


Reply
  Search this Thread
Old 05-22-2007, 05:53 AM   #1
humbletech99
Member
 
Registered: Jun 2005
Posts: 374

Rep: Reputation: 30
ntpd not keeping time accurate


I'm running ntpd on my servers to keep their times synced with my 2 ntp servers (both windows 2003 server domain controllers).

The problem is that the ntpd is not keeping the time accurate and the clocks are drifting. I'm sure that when ntp is working properly the time is supposed to be second accurate, but it's not happening here.

The clocks are drifting 15-180 seconds away from the time of the master ntp servers within a few days. I then have to ntpdate to adjust the clocks back to the right time manually which is silly (in fact I have to stop ntpd, then ntpdate, then start ntpd as they use the same socket)

Below is my ntpd.conf without the comments:
Code:
server x.x.x.1
server x.x.x.2
driftfile       /var/lib/ntp/ntp.drift
restrict default ignore
restrict 127.0.0.1
Ntpd is running as root so there is no lack of permissions.

Both ntp servers are second accurate and their time is identical down to the split second. So why aren't the unix boxes keeping time using ntpd?
 
Old 05-22-2007, 07:46 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You are restricting it to 127.0.0.1 (loopback) so you're telling it to only to allow it access to itself. You should have restrict entries for each of your time servers:

e.g.
restrict xx.xx.xx.xx mask 255.255.255.255 nomodify notrap noquery
restrict xx.xx.xx.xx mask 255.255.255.255 nomodify notrap noquery
restrict 192.5.41.40 mask 255.255.255.255 nomodify notrap noquery
restrict 192.5.41.41 mask 255.255.255.255 nomodify notrap noquery

(The latter two entries are tick and tock at the US Naval Observatory - nice fall backs to have - you'd have to add server entries for those as well).

Also once you've set your system time I'd suggest running:
hwclock --systohc

That will insure your hardware clock is in sync and doesn't cause issues - I've seen other users here have issues that seemed to have been because the hardware clock was overriding things.
 
Old 05-22-2007, 09:41 AM   #3
humbletech99
Member
 
Registered: Jun 2005
Posts: 374

Original Poster
Rep: Reputation: 30
I suspected this might be the case, ok I'll try that. Thanks.
 
  


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
sound is mute & time is not accurate @ Unstable, 2.6 janus_tr Debian 3 08-25-2006 12:25 PM
ntpd not correcting local time plythgam Linux - Software 1 08-16-2004 04:12 PM
Keeping my clock accurate with crontab jspaceman Slackware 7 02-27-2004 03:12 PM
System time not staying accurate sp|k3 Linux - General 10 01-02-2004 06:14 PM
How do I keep accurate time? teeno Linux - Software 8 10-11-2003 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:20 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