[ntp:questions] ntpd reads from shared memory but doesn't act on it
davehart at gmail.com
Mon Sep 7 21:14:20 UTC 2009
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?
More information about the questions