You are not logged in.

#1 2006-05-18 21:48:08

battra
Member
From: Earth.US.Illinois.Chicago
Registered: 2006-05-12
Posts: 71

ntp.drift is always empty (SOLVED)

START EDIT 
I noticed old entries in daemon.log to the effect of "Frequency format error in /var/lib/ntp/ntp.drift".  I think this may be because I created an empty file.  Maybe, I should have let the daemon create the file.  Anyways, it does appear that it was attempting to write to ntp.drift at the correct location.  But, I don't plan on investigating further.  Already uninstalled ntp and installed openntp.  Sticking with openntp.
END EDIT


I searched the forums and followed directions on both the forums and the wiki.  I also followed the directions here:
http://ntp.isc.org/bin/view/Support/AccessRestrictions

And, my NTP actually seems to be working.  If I purposely mis-set the time off by 10 minutes, after a while it corrects/resets itself to the correct time, as the log shows:

18 May 16:20:06 ntpd[4251]: synchronized to 140.221.9.20, stratum 2
18 May 16:34:23 ntpd[4251]: time reset +341.326743 s

However, my ntp.drift file is always empty and never gets updated.

Does anybody know what I'm missing?

Here's my ntp.conf:

server ntp-1.mcs.anl.gov
server ntp-1.cso.uiuc.edu
driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp.log
restrict default ignore
restrict 127.0.0.1
restrict 140.221.9.20 noquery nomodify notrap nopeer
restrict 130.126.24.24 noquery nomodify notrap nopeer

I've checked to see if the ntp.drift file was being created somewhere else like /etc/ntp.drift.  But, the only ntp.drift file on my system is the empty one I created in /var/lib/ntp/ntp.drift.  I've also opened up port 123 on my router for good measure.

Why isn't it reading my driftfile directive in ntp.conf and writing to that file?


"I know nothing except the fact of my ignorance."
- Socrates

Offline

#2 2006-05-18 21:50:05

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: ntp.drift is always empty (SOLVED)

I had the same problem and fought with it for hours and hours. Then I discovered openntp and suddenly felt very foolish   wink

Offline

#3 2006-05-18 23:17:13

battra
Member
From: Earth.US.Illinois.Chicago
Registered: 2006-05-12
Posts: 71

Re: ntp.drift is always empty (SOLVED)

Thanks.  Installed openntp - more consistent with the KISS principle anyways, I guess. 
smile


"I know nothing except the fact of my ignorance."
- Socrates

Offline

#4 2006-05-19 02:01:07

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: ntp.drift is always empty (SOLVED)

no prob. I still keep ntpd installed to make sure openntp is doing it's job:

[tyler@eLINUXe ~]$ ntpdate -q clock1.unc.edu
server 152.2.21.1, stratum 2, offset -0.049621, delay 0.04730
18 May 21:59:50 ntpdate[9578]: adjust time server 152.2.21.1 offset -0.049621 sec

8)

Offline

#5 2006-05-21 22:26:24

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: ntp.drift is always empty (SOLVED)

How long were you waiting to see if your drift file was altered?  If memory serves me correctly, you have to wait until it has consistent check ups for around 7 hours or something (maybe more, I don't remember the exact number) before it will update your drift file.  The timing between polls changes quite a bit from when you first turn on NTP to the point where it has consistent polling.

Offline

#6 2006-05-23 20:16:55

battra
Member
From: Earth.US.Illinois.Chicago
Registered: 2006-05-12
Posts: 71

Re: ntp.drift is always empty (SOLVED)

elasticdog wrote:

How long were you waiting to see if your drift file was altered?  If memory serves me correctly, you have to wait until it has consistent check ups for around 7 hours or something (maybe more, I don't remember the exact number) before it will update your drift file.  The timing between polls changes quite a bit from when you first turn on NTP to the point where it has consistent polling.

Interesting.  I waited a few hours, but not 7.  I could've sworn that it wrote to that file sooner in my previous NTP intallations.  Can't remember for sure, though.  In any case, thanks for the info.  I'm currently using openntp.


"I know nothing except the fact of my ignorance."
- Socrates

Offline

#7 2006-11-25 15:31:41

Convergence
Member
Registered: 2005-07-02
Posts: 374

Re: ntp.drift is always empty (SOLVED)

I would leave ntpd running for a week, and still get no drift file.  I just changed the location of the drift file to /etc/ntp.drift in the config, and it seems to be working now.  by the way, it wrote a drift file as soon as I started the daemon.


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#8 2006-11-27 21:36:46

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: ntp.drift is always empty (SOLVED)

Convergence wrote:

I would leave ntpd running for a week, and still get no drift file.  I just changed the location of the drift file to /etc/ntp.drift in the config, and it seems to be working now.  by the way, it wrote a drift file as soon as I started the daemon.

That sounds like a permissions issue to me...I think I have mine currently set up at /etc/ntp.drift as well, so I must have changed the configuration at some point like you did.  I agree that it creates the file immediately, but did it actually put a drift value in the file right away?  It's been a long time since I've messed with it (since it's all set up and working now), but that's what I think I read somewhere.

Offline

Board footer

Powered by FluxBB