[ntp:questions] Help on refclock_shm for WINNT

David Kuechenmeister kplus13 at yahoo.com
Wed Nov 5 21:55:05 UTC 2003


Maybe having some data along with my question will generate some
interest.
Here's the problem. I have a driver that reads an IRIG-B time card off
of the ISA bus. Then I stuff the irig time, as well as the clock time,
into the shared memory structure. I set the valid and count flags as
needed and take another sample. I'm doing that once per second. It
shouldn't matter much how often I sample the clock, right? The
hardware clock is the standard and the refclock_shm driver should
weight it's time heavily when setting the system clock. Or so I
thought.

It turns out that my IRIG-B time is just a hint to NTP about what time
it is. NTP starts off with a fairly small offset, drift, and
dispersion. It allows the offset to drift to a pretty large value
before it starts to reign it back in again. After drifting to an
offset of 50 or 60 msec, NTP will finally start converging on an
eventual solution of around 1 msec of drift.

The whole cycle takes several hours. I don't see this kind of behavior
from the traditional servers and I don't have any experience with
other refclock models.

My IRIG-B time code generator is one of Datum's GPS sync'd models, so
I don't think it is drifting.

On the troubleshooting help page, it was mentioned that this sort of
behavior could occur if the local clock had a large amount of drift,
or if the Time Of Year chip was not disabled. With another server, I
have logged drift values of around 40 ppm for the computer. I don't
think the Intel architecture(DELL) has Time Of Year chips. Please
correct me if that is incorrect.

I'd appreciate any insight into how to discipline the clock faster.
I've looked at Jonathan Buzzard's shared memory clock and I see he is
doing some averaging on his time values. I don't think it's needed in
my clock, since I'm polling for the time, rather than handling the
serial interrupt. If that assumption is incorrect, I'd appreciate a
correction there, too.

Following is some data. I didn't run it to the maximum offset, but it
has run out to anywhere from 40 to 70 msec. If there any more useful
pages, please let me know.

Regards,
David Kuechenmeister

ntpq> rv 15332
status=8014 unreach, conf, 1 event, event_reach,
srcadr=SHM(2), srcport=123, dstadr=127.0.0.1, dstport=123, leap=00,
stratum=0, precision=-10, rootdelay=0.000, rootdispersion=0.000,
refid=IRIG, reach=000, unreach=0, hmode=3, pmode=4, hpoll=6, ppoll=6,
flash=00 ok, keyid=0, ttl=0, offset=0.000, delay=0.000,
dispersion=0.000, jitter=4000.000,
reftime=c353e66b.1df3b63a  Wed, Nov  5 2003 21:13:15.117,
org=00000000.00000000  Thu, Feb  7 2036  6:28:16.000,
rec=00000000.00000000  Thu, Feb  7 2036  6:28:16.000,
xmt=00000000.00000000  Thu, Feb  7 2036  6:28:16.000,
filtdelay=     0.00    0.00    0.00    0.00    0.00    0.00    0.00   
0.00,
filtoffset=    0.00    0.00    0.00    0.00    0.00    0.00    0.00   
0.00,
filtdisp=   16000.0 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0
16000.0

ntpq> pe
     remote           refid      st t when poll reach   delay   offset
 jitter
==============================================================================
 SHM(2)          .IRIG.           0 l    -   64    0    0.000    0.000
4000.00

ntpq> rv 15332
status=9024 reach, conf, 2 events, event_reach,
srcadr=SHM(2), srcport=123, dstadr=127.0.0.1, dstport=123, leap=00,
stratum=0, precision=-10, rootdelay=0.000, rootdispersion=0.000,
refid=IRIG, reach=001, unreach=0, hmode=3, pmode=4, hpoll=6, ppoll=6,
flash=00 ok, keyid=0, ttl=0, offset=-1.706, delay=0.000,
dispersion=7937.992, jitter=0.008,
reftime=c353e64b.0d0e55ff  Wed, Nov  5 2003 21:12:43.051,
org=c353e64b.0d0e55ff  Wed, Nov  5 2003 21:12:43.051,
rec=c353e68c.b93ba0f8  Wed, Nov  5 2003 21:13:48.723,
xmt=c353e68c.b9336fd1  Wed, Nov  5 2003 21:13:48.723,
filtdelay=     0.00    0.00    0.00    0.00    0.00    0.00    0.00   
0.00,
filtoffset=   -1.71    0.00    0.00    0.00    0.00    0.00    0.00   
0.00,
filtdisp=      0.98 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0
16000.0

ntpq> rv
status=c035 sync_alarm, sync_unspec, 3 events, event_clock_reset,
version="ntpd 4.2.0 Mon Nov 03 21:30:53 2003 (20)",
processor="unknown",
system="WINDOWS/NT", leap=11, stratum=16, precision=-17,
rootdelay=0.000, rootdispersion=941.465, peer=0, refid=STEP,
reftime=00000000.00000000  Thu, Feb  7 2036  6:28:16.000, poll=4,
clock=c353e699.8d157e7a  Wed, Nov  5 2003 21:14:01.551, state=2,
offset=0.000, frequency=9.246, jitter=0.245, stability=0.000

ntpq> rv 15332
status=9024 reach, conf, 2 events, event_reach,
srcadr=SHM(2), srcport=123, dstadr=127.0.0.1, dstport=123, leap=00,
stratum=0, precision=-10, rootdelay=0.000, rootdispersion=0.000,
refid=IRIG, reach=001, unreach=0, hmode=3, pmode=4, hpoll=6, ppoll=6,
flash=00 ok, keyid=0, ttl=0, offset=-1.706, delay=0.000,
dispersion=7937.992, jitter=0.008,
reftime=c353e64b.0d0e55ff  Wed, Nov  5 2003 21:12:43.051,
org=c353e64b.0d0e55ff  Wed, Nov  5 2003 21:12:43.051,
rec=c353e68c.b93ba0f8  Wed, Nov  5 2003 21:13:48.723,
xmt=c353e68c.b9336fd1  Wed, Nov  5 2003 21:13:48.723,
filtdelay=     0.00    0.00    0.00    0.00    0.00    0.00    0.00   
0.00,
filtoffset=   -1.71    0.00    0.00    0.00    0.00    0.00    0.00   
0.00,
filtdisp=      0.98 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0
16000.0

ntpq> rv 15332
status=9624 reach, conf, sel_sys.peer, 2 events, event_reach,
srcadr=SHM(2), srcport=123, dstadr=127.0.0.1, dstport=123, leap=00,
stratum=0, precision=-10, rootdelay=0.000, rootdispersion=0.000,
refid=IRIG, reach=037, unreach=0, hmode=3, pmode=4, hpoll=6, ppoll=6,
flash=00 ok, keyid=0, ttl=0, offset=-2.486, delay=0.000,
dispersion=439.236, jitter=0.578,
reftime=c353e74e.69ba5e0e  Wed, Nov  5 2003 21:17:02.413,
org=c353e74e.69ba5e0e  Wed, Nov  5 2003 21:17:02.413,
rec=c353e78e.153d8ead  Wed, Nov  5 2003 21:18:06.082,
xmt=c353e78e.153a5898  Wed, Nov  5 2003 21:18:06.082,
filtdelay=     0.00    0.00    0.00    0.00    0.00    0.00    0.00   
0.00,
filtoffset=   -2.49   -2.76   -2.92   -1.80   -1.71    0.00    0.00   
0.00,
filtdisp=      0.98    1.94    2.90    3.89    4.84 16000.0 16000.0
16000.0

ntpq> pe
     remote           refid      st t when poll reach   delay   offset
 jitter
==============================================================================
*SHM(2)          .IRIG.           0 l   42   64   37    0.000   -2.486
  0.578

ntpq> rv 15332
status=9624 reach, conf, sel_sys.peer, 2 events, event_reach,
srcadr=SHM(2), srcport=123, dstadr=127.0.0.1, dstport=123, leap=00,
stratum=0, precision=-10, rootdelay=0.000, rootdispersion=0.000,
refid=IRIG, reach=377, unreach=0, hmode=3, pmode=4, hpoll=6, ppoll=6,
flash=00 ok, keyid=0, ttl=0, offset=-3.435, delay=0.000,
dispersion=1.909, jitter=1.023,
reftime=c353e811.b74bc663  Wed, Nov  5 2003 21:20:17.716,
org=c353e811.b74bc663  Wed, Nov  5 2003 21:20:17.716,
rec=c353e850.5a946102  Wed, Nov  5 2003 21:21:20.353,
xmt=c353e850.5a915d41  Wed, Nov  5 2003 21:21:20.353,
filtdelay=     0.00    0.00    0.00    0.00    0.00    0.00    0.00   
0.00,
filtoffset=   -3.43   -3.63   -3.27   -2.49   -2.76   -2.92   -1.80  
-1.71,
filtdisp=      0.98    1.93    2.92    3.89    4.85    5.81    6.80   
7.75

ntpq> pe
     remote           refid      st t when poll reach   delay   offset
 jitter
==============================================================================
*SHM(2)          .IRIG.           0 l    1   64  377    0.000   -3.446
  0.795



More information about the questions mailing list