Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - NTPD fails to sync drifting clock.: (2 Items)
   
NTPD fails to sync drifting clock.  
Hello,
I got something really strange with QNX 6.4.1 ntpd. The clocck itself have a big drift of approx 3 ms per second. So, 
after launching ntpd and waiting a bit, instead of synching to server, it syncs with localhost and the clock continues 
to drift. Server is reliable, all other clients (win, linux) are sync-ed to it with no problems.

ntp.conf:
server 10.9.2.80 iburst prefer 
server 127.127.1.0 
fudge 127.127.1.0 stratum 6

launching ntpd cmdline:
ntpd -d -l /tmp/ntp.log >/tmp/debugntp.log&

after couple seconds the clock jumps to 0 offset, and then steadily drifts. Here is output of windows w32tm stripchart 
(first line error because daemon was not started yet):
17:18:54 error: 0x80072746
17:18:56 d:+00.0017367s o:-00.7920553s  [                         * |                           ]
17:18:58 d:+00.0039651s o:-00.7985764s  [                         * |                           ]
17:19:00 d:+00.0040767s o:-00.8047629s  [                         * |                           ]
17:19:02 d:+00.0070356s o:-00.8139787s  [                         * |                           ]
17:19:04 d:+00.0060316s o:-00.0005456s  [                           *                           ]
17:19:06 d:+00.0015506s o:-00.0087431s  [                           *                           ]
17:19:08 d:+00.0026439s o:-00.0146072s  [                           *                           ]
17:19:10 d:+00.0037182s o:-00.0216746s  [                           *                           ]
17:19:12 d:+00.0019183s o:-00.0291349s  [                           *                           ]
17:19:14 d:+00.0028667s o:-00.0359352s  [                           *                           ]
17:19:16 d:+00.0020591s o:-00.0419477s  [                           *                           ]

ntpq -p output (after a while, 5-10 min):
/ # ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==========================================
 10.9.2.80       10.10.2.100      4 u    5   64  377    1.828  1948.17 977.776
*LOCAL(0)        .LOCL.           6 l    8   64  377    0.000    0.000   0.977

Can you please advise what is wrong or how to make this configuration behave?
Attached are logfiles as defined in commandline above.
Attachment: Compressed file ntp_logs.zip 3.83 KB
Re: NTPD fails to sync drifting clock.  
Update:
The problem appears to be in the inaccurate system clock - 3ms/s is really HUGE drift to be corrected by NTP.
I found solution for Linux - adjtimex package. It calibrates the system clock over RTC and adjusts the system clock 
parameters. Does it exist on QNX? If not, how I can recalibrate the clock? On all the devices drift is 1:1 same, so even
 hardcoding the correction will do the job. 
Thanks!
Igor.