From: jhc@iscp.bellcore.com (Jonathan Clark)
Subject: Newbie xntp user seeks enlightenment
Organization: Bellcore
Date: Wed, 2 Sep 92 15:15:15 GMT

Greetings.

I have XNTP v3.1 (tar file dated Aug 24 from louie) up and running on an
IBM RS6000 workstation under AIX 3.2, and I have some naive questions
about what I'm seeing when I query the server and in the logfile. Rather
than hacking through the code, I thought I'd ask the net. Note that I
am by no means a guru in this topic, and my use of language is probably
woefully imprecise, but please bear with me.

For example, I have the following output:

rain$ /usr/lbin/xntpdc -p
     remote           local      st poll reach  delay   offset   disp
======================================================================
*flash.bellcore. 128.96.144.169   1   64    7  0.0144  0.009685 7.8921

I read this as meaning that I'm:

	- I'm currently synchronized to flash
	- which is running at stratum 1 (it has a WWVB clock),
	- I poll flash every 64 seconds,
	- the next poll is in 37 seconds,
	- the reachability was 7 (octal)
	- the filter delay was 0.0144s, 14.4ms,
	- the offset was -0.009685s, 9.68ms, and
	- the dispersion was 7.8921s, or 7892.1ms.

First set of questions. Am I correct in believing that:

	- the reachability is the number of queries which were
	  successfully processed, so in this case the last 3 packets
	  were good (and something nasty happened before that)?
	- the filter delay is measurement of how long it takes xntpd
	  to do its processing?
	- the offset is the amount the server differs from its clock?
	- the dispersion is the difference between the local time and
	  the time reported by the server?

From the 'sysinfo' command of xntpdc I have a sync distance of 0.0115
and a sync dispersion of 1.3065 (this was about 15 minutes later).

	- the sync distance is an estimate of the round-trip packet
	  time in seconds?
	- the sync dispersion means the same as above, but the time
	  difference between me and flash is now rather less.

Consecutively to the above I issued an 'ntpq -p' command, which gave me:

rain$ /usr/lbin/ntpq -p
     remote           refid      st when poll reach  delay  offset   disp
=========================================================================
#flash.bellcore. .WWVB.           1   37   64    7    14.4    9.68 7892.1

ie basically the same thing except with a factor of 1000 thrown in.
From this I conclude that one of the two man pages is in error, since
both claim that they print out their results in seconds. I presume that
xntpdc actually produces seconds and ntpq milliseconds, am I right?

Turning now to the log files, I think I have the various system and peer
status flags sorted out. However, I get messages like these occasionally:

	offset -0.006618 freq -0.76593 comp 0

This is part of the hourly statistics. The offset is as above (the
amount the kernel clock is off?), and am I correct in thinking that
the freq field is the amount the hardware clock needs adjusting to
keep perfect time? comp seems to be ``log2 of time constant'', but
what's that?

	adjust: STEP dropped (128.96.32.20 offset 0.556186199) 
	adjust: STEP 128.96.32.20 offset 0.555446148 

These two mean that the difference between kernel time and the server's
time was greater than could be corrected by slewing the clock, and that
the kernel time was stepped? In the first case the time wasn't actually
stepped because it was too soon since the last correction.

Now, if anyone is still reading, I have some questions about my target
configuration. This is for an isolated network without a radio clock,
and set up pretty much as a tree. Right now I have one workstation set
up as a master, using its local clock, with this config file:

	# local ref clock at stratum 1
	server 127.127.1.1
	fudge 127.127.1.1

When I use xntpdc -p this successfully tells me that I'm claiming to have
a stratum 1 clock. However, four of the five workstations I have which
are using me as a server, all with identical binaries and config files,
which consist of the single line:

	server 128.96.144.169

see me as being on stratum 16, while the other one sees me at startum 2,
which is what I expect! This one machine used to see me at stratum 16,
but apparently changed its mind overnight. Anyone care to share some
light about what's going on? Or can someone tell me how to set up my
various configuration files so that this works like I want?

All help and comments gratefully accepted. If there's interest and people
respond by mail, I'll summarize.

Jonathan Clark
jhc@iscp.bellcore.com

The Englishman never enjoys himself except for some noble purpose.
Newsgroups: comp.protocols.time.ntp