[ntp:questions] ntpdsim problems in ntp-4.2.2.p3

Albert J Sawyer ajsawyer at lucent.com
Tue Sep 5 19:45:58 UTC 2006

Can someone help me get ntpdsim running right?  The time will not
synchronize.  At the end of a run with
ntpdsim -A -C .001 -T 400 -W 1 -c ./ntp.conf
the last line output is:
                T                     T+ERR                  T+ERR+NTP
           86400.000000         34513621.245209            86400.000000

By adding -d -d -d to the argument list, and some extra debug output
messages I found that the clock_select() function always gets 0x400
failure return from peer_unfit(), which is a Test 11 failure, root
distance too large.

A typical line of rawstats has
15020 63118.000 63117.000000000
22742575.719312813 22742575.720312811 63117.019083045.

It seems that the client packet is sent with transmit time from
ntp_time, but srvr_rply() sets its time stamps from clk_time.  Because
the server is never accepted by clock_select, ntp_time is never adjusted.

I got this version in downloaded of ntp-4.2.2p3, ran configure.guess to
create a directory for sparc-sun-solaris2.8, ran configure to create the
makefile, compiled
with gnu tools,  and created a simple ntp.conf:

disable kernel
server time.nist.gov iburst
logfile /home/ajs/public_html/NTP/ntpdsim/ntplog
driftfile ./ntp.drift
statsdir ./ntpstats/
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
filegen rawstats file rawstats type day enable
filegen sysstats file sysstats type day enable

and ran with:

ntpdsim $* -A -C .001 -T 400 -W 1 -c ./ntp.conf

Only peerstats and rawstats are created.

Al Sawyer

More information about the questions mailing list