syncing two machines, microsecond precision?



Hi, I'm trying to sync two machines, one as the server the other as the

client, both sitting on a private switched network. After ntp settles

in, the client has a 10-30 ms offset that continues to increase in

offset, but what I'm doing requires the two machines to be off by no

more than 500 us. I've gone through the NTP debug routine and my PPM

error is pretty small (see below)

also, what's the huffpuff filter, I didn't try playing with that yet,

and can't find much info on the web about it.

Below is some info to help assess my situation, please let me know if

there's more info I can provide.

thanks,
dan

-----
server = larry
client = moe

server (larry) conf:
<ntp.conf>
driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 127.127.1.1
fudge 127.127.1.1 stratum 10
restrict 127.0.0.1
restrict ::1
</ntp.conf>

client (moe) conf:
<ntp.conf>
driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server larry
restrict 127.0.0.1
restrict ::1
</ntp.conf>

------------
debugging info on larry:

~ # ntptime
ntp_gettime() returns code 0 (OK)
time cb004960.061de000 Tue, Dec 4 2007 16:47:12.023, (.023893),
maximum error 24726 us, estimated error 0 us
ntp_adjtime() returns code 0 (OK)
modes 0x0 (),
offset 0.000 us, frequency 1.004 ppm, interval 1 s,
maximum error 24726 us, estimated error 0 us,
status 0x1 (PLL),
time constant 10, precision 1.000 us, tolerance 512 ppm,

~ # ntpq
ntpq> rv
assID=0 status44 leap_none, sync_local_proto, 4 events,

event_peer/strat_chg,
version="ntpd 4.2.4p4@xxxxxxxx Tue Oct 23 17:25:12 UTC 2007 (1)",
processor="i686", system="Linux/2.6.21", leap, stratum,
precision=-20, rootdelay=0.000, rootdispersion.367, peer9206,
refid=LOCAL(1),
reftimeË004947.144f23a0 Tue, Dec 4 2007 16:46:47.079, poll,
clockË004963.b7a2147e Tue, Dec 4 2007 16:47:15.717, state=4,
offset=0.000, frequency=1.004, jitter=0.001, noise=0.001,
stability=0.000, tai=0

ntpq> pe
remote refid st t when poll reach delay offset

jitter
==========================================================================*LOCAL(1) .LOCL. 10 l 29 64 377 0.000 0.000

0.001
ntpq> as

ind assID status conf reach auth condition last_event cnt
======================================================== 1 39206 9614 yes yes none sys.peer reachable 1

------------
debugging info on moe:

~ # ntptime
ntp_gettime() returns code 0 (OK)
time cb004b5c.e72ed000 Tue, Dec 4 2007 16:55:40.903, (.903058),
maximum error 385388 us, estimated error 0 us
ntp_adjtime() returns code 0 (OK)
modes 0x0 (),
offset 0.000 us, frequency 17.752 ppm, interval 1 s,
maximum error 385388 us, estimated error 0 us,
status 0x1 (PLL),
time constant 4, precision 1.000 us, tolerance 512 ppm,

ntpq> pe
remote refid st t when poll reach delay offset

jitter
==========================================================================*larry LOCAL(1) 11 u 6 64 377 0.175

-15.448 5.771

ntpq> as

ind assID status conf reach auth condition last_event cnt
======================================================== 1 46763 9624 yes yes none sys.peer reachable 2

ntpq> rv
assID=0 statusÆ44 sync_alarm, sync_ntp, 4 events, event_peer/strat_ch
g,
version="ntpd 4.2.4p0@xxxxxxxx Thu Oct 4 22:22:31 UTC 2007 (1)",
processor="x86_64", system="Linux/2.6.22-10-generic", leap,
stratum, precision=-20, rootdelay=0.000, rootdispersion.880,
peerF763, refid=�;�,
reftime000000.00000000 Thu, Feb 7 2036 1:28:16.000, poll=6,
clockË004b8a.3864b86c Tue, Dec 4 2007 16:56:26.220, state=2,
offset=0.000, frequency.752, jitter=5.771, noise=0.001,
stability=0.000, tai=0

ntpq> rv 46763
assIDF763 status?24 reach, conf, sel_sys.peer, 2 events, event_reac
h,
srcadr=larry, srcport3, dstadr8.59.23.25,
dstport3, leap, stratum, precision=-20, rootdelay=0.000,
rootdispersion.658, refid=LOCAL(1), reach77, unreach=0, hmode
=3,
pmode=4, hpoll=6, ppoll=6, flash ok, keyid=0, ttl=0, offset
=-15.448,
delay=0.175, dispersion=0.943, jitter=5.771,
reftimeË004b4a.14380139 Tue, Dec 4 2007 16:55:22.078,
orgË004b7b.9cbb8dfb Tue, Dec 4 2007 16:56:11.612,
recË004b7b.a0b5b9bf Tue, Dec 4 2007 16:56:11.627,
xmtË004b7b.a0a813d8 Tue, Dec 4 2007 16:56:11.627,
filtdelay= 0.18 0.19 0.15 0.18 0.16 0.17 0.18 0.
17,
filtoffset= -15.45 -14.14 -12.85 -11.58 -10.29 -8.99 -7.69 -6.
44,
filtdisp= 0.00 0.98 1.97 2.91 3.90 4.88 5.85 6.
80

ntpdc> loopinfo
offset: 0.000000 s
frequency: 17.752 ppm
poll adjust: 4
watchdog timer: 880 s

ntpdc> sysinfo
system peer: larry
system peer mode: client
leap indicator: 11
stratum: 16
precision: -20
root distance: 0.00000 s
root dispersion: 0.01321 s
reference ID: [<server ip>]
reference time: 00000000.00000000 Thu, Feb 7 2036 1:28:16.000
system flags: bclient monitor ntp kernel stats
jitter: 0.005783 s
stability: 0.000 ppm
broadcastdelay: 0.003998 s
authdelay: 0.000000 s
.



Relevant Pages

  • Re: ntp clients out of sync with server
    ... I asked you to do ntpq -c"rv nnnnn" ... for the relevant server. ... That is really help, at the time sync is successful, ... If I start the ntpd client with -d option, ...
    (comp.protocols.time.ntp)
  • Re: NTS multicast response on IPv6
    ... > Please understand that is not how multicast works. ... > passive and only receive multicast packets from the server (modulo the ... Once the authentication is set up the client start listening on ... >> like ntpq to do my tests? ...
    (comp.protocols.time.ntp)
  • Re: syncing two machines, microsecond precision?
    ... on moe I added the 'iburst dynamic' flags to the server ... client where I take the timestamp at the server, ... ntpq> rv ...
    (comp.protocols.time.ntp)
  • Re: On NTP server, how to check offset between client and NTP server?
    ... On my NTP server, how to know offset of between my ... If your "client" is also running ntpd you can use ntpq to see the ...
    (comp.protocols.time.ntp)
  • Re: What doesnt lend itself to OO?
    ... >> proxy and instructs the server to constuct the real object. ... rather than client code. ... If 'clock' is instantiated in the server, ... > for the server interface at the OOA level. ...
    (comp.object)