[ntp:questions] Winnt Shared Memory Refclock

David Kuechenmeister kplus13 at yahoo.com
Tue Nov 4 19:20:08 UTC 2003


I took Piotr Trojanek's advice and wrote some code to read the ISA bus
clock and then deposit the results in shared memory. Thanks Piotr,
this works much better than my other effor.

I do have a couple questions.

First, it seems like the refclock_shm driver will either work very
well, with a very small stable offset and jitter, or not so well. The
not so well case is marked by a slow increase in the offset value, in
one case from about 1 msec to 45 msec, while the jitter was around 10
msec on the first couple polls and decreased gradually. After an hour,
NTP didn't appear that it would minimize the offset, though. How can I
configure the shared memory driver to converge and sync to the source
more deterministically? I've configured the driver with the bare
minimum in the ntp.conf file -- server 127.127.28.2 What kind of debug
output would help here?

Second, it is obvious that the clock is driving NTP, but the status on
line 2 is wrong. Is that only because there is no record_clock_stats()
call in the refclock_shm driver?

ntpq> clocklist
status=0101 clk_noreply, last_clk_noreply,
device="SHM/Shared memory interface", timecode=, poll=144, noreply=1,
badformat=0, baddata=0, fudgetime1=0.000, stratum=0, refid=SHM,
flags=0
ntpq> peers
     remote           refid      st t when poll reach   delay   offset
 jitter
==============================================================================
*SHM(2)          .SHM.            0 l   30   64  377    0.000    2.435
  0.281

Third, is the operation mode, either 0 or 1, set only by the
user-written shared memory driver and then used in the refclock_shm
module? Or should I make the my clock driver check for the op-mode?

Thanks,
David Kuechenmeister



More information about the questions mailing list