[ntp:questions] ntpd reads from shared memory but doesn't act on it

J. Jobin jobin at hotmail.com
Fri Sep 11 01:20:17 UTC 2009



Thanks Dave.

I figured out the part about writing regularly into shared memory. However for some reason, it wouldn't work when I was writing every minute. I tried a bunch of other values and eventually, I have it now that it writes into shared memory every 1 second. So, now it all works. NTP reads it from shared memory and adjusts time successfully.

The reason why I can't have an external source is because of customer requirements. They will not have any such external NTP server. However, they still wish to use NTP. Using shared memory is what we came up with as a solution. They will be able to provide a correct reference time and feed it to the shared memory via our API. NTP will take over from there.

Thanks for the additional information too. I appreciate your taking the time.

jobin

> From: davehart at gmail.com
> Date: Mon, 7 Sep 2009 21:14:20 +0000
> Subject: Re: [ntp:questions] ntpd reads from shared memory but doesn't act on 	it
> To: jobin at hotmail.com
> CC: questions at lists.ntp.org
> 
> On Wed, Sep 2, 2009 at 6:19 PM, J. Jobin wrote:
> > I'm trying to get ntpd to read from shared memory and then
> > adjust the time accordingly. Problem is it seems to read the
> > value that I put into shared memory but doesn't seem to
> > adjust the time accordingly.
> 
> So you've written a single timestamp into shared memory, never updated
> it, and you're surprised that ntpd doesn't like your shared memory
> reference clock that's frozen?  Time doesn't stand still...
> 
> > I don't want my ntpd to talk to external servers. The intention
> > is that a script will write values into shared memory and ntpd
> > should read this and adjust accordingly.
> 
> That should work if the script managed to write credible timestamps on
> an ongoing basis.  If that script is basing its updates on the system
> clock, you're going to find it works poorly as ntpd is manipulating
> that system clock, so you've created a feedback loop.
> 
> To run ntpd without an external time source, you need to calibrate its
> drift (if you care about time intervals being correct), configure it
> in orphan mode or using the local clock driver (ick, but orphan mode
> requires 4.2.5 ntp-dev so you may have no choice), and then you need
> maintain the temperature of your system extremely consistently and
> hope the crystal doesn't age on you.
> 
> I suspect you haven't received any other replies because we're baffled
> what you're trying to accomplish.  Why use ntpd in the first place,
> what do you hope it will do for you?
> 
> Cheers,
> Dave Hart

_________________________________________________________________
Hotmail® is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_faster:082009


More information about the questions mailing list