On NTP server, how to check offset between client and NTP server?

On NTP server, how to check offset between client and NTP server?

Post by chowalit.l » Sat, 11 Oct 2008 02:31:10


Dear All
I have stratum 2 NTP server. My client request time from my NTP
server. On my NTP server, how to know offset of between my client and
my server ? I found ntp_script software suite from
http://www.yqcomputer.com/ 's not solve my problem
directly.

Thanks
Chong
 
 
 

On NTP server, how to check offset between client and NTP server?

Post by Unru » Sat, 11 Oct 2008 04:01:16


XXXX@XXXXX.COM (chowalit.lab Chowalit Lab Linux) writes:


No idea what you are asking. Your ntp machine is working hard to make sure
its time is the same as the server's time. What offset?

I think you need to rethink your question.

 
 
 

On NTP server, how to check offset between client and NTP server?

Post by David Wool » Sat, 11 Oct 2008 07:16:36


When NTP is working properly, the difference between the time on the
client is zero within statistical error. The "offset" will, more often
than not, exceed the statistical error in the actual time difference.

There are situations, in which this doesn't hold true for NTP,
particularly within a few hours of system startup (and also after sudden
temperature changes), and these are discussed in the thread entitled
"Slow convergence of NTP with GPS/PPS", although the situation will be
more extreme there, as one can read a reference clock with less
statistical error than an ethernet connected server. You can get more
on this theme from most of the recent long running threads.

Once you've read and understand these, if you still find you want to
measure the figure that ntpd calls "offset", you treat the client as a
server and run ntpq on the real server, and use the peers command.

If you want to measure the actual offset between the clocks, you will
need to add special instrumentation to the kernel, and special hardware.
You will then want to ask yourself why you don't use the error
measured by that instrumentation to apply corrections to reduce that
error to the statistical noise level!

But, again, remember that any time synchronisation protocol optimised
for minimum phase error will never be able to measure the actual error,
as any error it can measure it will have corrected.
 
 
 

On NTP server, how to check offset between client and NTP server?

Post by chowalit.l » Sat, 11 Oct 2008 15:41:46

Dear Unruh and All
Sorry for my english, It make you confuse. So I will explain
about my system.

- I have NTP server.
- NTP server install on CentOS.
- This NTP server serve client to sync time.
- My clients are windows XP, Windows 2003, Linux.

My question:
- How to check the different time between NTP server and client on
NTP server side.

Thanks you
Chong
 
 
 

On NTP server, how to check offset between client and NTP server?

Post by David Wool » Sat, 11 Oct 2008 16:52:29


That will be very difficult for the Windows ones. For the Linux ones,
add code to the clock interrupt routine that pulses a printer port line
or modem control signal (do not use USB ports), and simultaneously
writes the offset between the software clock time and the nominal, round
number of milliseconds, tick time, to a buffer. At user level copy that
buffer to a file.

Do this on both client and server.

Set up some suitable instrumentation to measure and log the time delay
between the pulses on client and server, then process the results in
conjunction with the client and server's idea of the time at the time of
the pulse.

This assumes that the machines are electrically close.

Don't worry too much on Windows, as the time is likely to be more
accurate than the resolution with which ordinary application programs
can read it. If you are using w32time on XP, don't worry, because
w32time is not intended for precision time keeping on that platform, and
doesn't default for it on 2003.

If you want to measure the value during the startup and other transients
that Dave Mills considers unimportant, use ntpq on the server. This
will not work for any machines using w32time. You might also configure
the client as an ignored server for the server, or maybe peering them,
to allow ntpq peers run on the server, against the server, to give a
reverse "offset" value. Note these methods only give you historical
information. For a near instantaneous snapshot, use ntpdate -d.

The reason you are getting such complex answers is that you are asking
to measure something that, in an ideal system, is theoretically
unmeasurable.
 
 
 

On NTP server, how to check offset between client and NTP server?

Post by Unru » Sun, 12 Oct 2008 01:46:21


XXXX@XXXXX.COM (chowalit.lab Chowalit Lab Linux) writes:




Are the clients running ntp? If they are
ntpq -p name.of.client
will tell you what the offset was on the last query they made to the
server.

If they are not, then I do not know.
Now if they are running ntp they are trying their best ( as defined by the
ntp algorithm) to keep their time equal to the server's. Why do you want to
know?