[ntp:questions] Using ntpd with custom clock

Kennedy, Paul P.Kennedy at fugro.com.au
Wed Oct 17 08:41:37 UTC 2012

Forgive me if I am wrong, but this is a very odd request.  As far as I
can tell, the request is for the NTP corrections to the system clock to
be used to correct a different clock.

I cannot quite understand how this is of practical use.  It is like
diagnosing the faults on your car engine and then applying the
corrections to a train engine.


-----Original Message-----
From: questions-bounces+p.kennedy=fugro.com.au at lists.ntp.org
[mailto:questions-bounces+p.kennedy=fugro.com.au at lists.ntp.org] On
Behalf Of Rob
Sent: Wednesday, 17 October 2012 3:06 PM
To: questions at lists.ntp.org
Subject: Re: [ntp:questions] Using ntpd with custom clock

Chuck Swiger <cswiger at mac.com> wrote:
> Hi--
> On Oct 16, 2012, at 2:49 PM, Felipe Blauth wrote:
>> 2012/10/16 Brian Utterback <brian.utterback at oracle.com>
>>> I think the original poster is asking to do something a little bit
different than the usual. If I am reading it right, he is not asking how
to get ntpd to read a custom clock as a source of time (which as noted
is what a refclock is for). I think he is asking how to get ntpd to
*set* a custom clock, treating it as it would the system clock, so as to
sync the custom clock with the upstream NTP server time.
>> That's exactly what I want to do.
> OK.  You can either hook into ntpd's calls to get/settimeofday() and
adjtime() as you initially suggested, or perhaps look into the SHM
driver.  The latter is a generic interface that puts clock timestamps
into shared memory; but you can read from SHM instead of writing, if you
like-- would be easier if you have something like a GPS receiver and
gpsd populating the SHM timestamps.

Funny that, after you initially seem to indicate that you have
understood the question, you still come up with the SHM driver that is a

questions mailing list
questions at lists.ntp.org

More information about the questions mailing list