• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..02-May-201732

envelopeH A D17-Jan-20112.3 KiB

MakefileH A D17-Jan-20111.3 KiB

ntpclient.cH A D17-Jan-201114.2 KiB

phaselock.cH A D17-Jan-201110.3 KiB

READMEH A D17-Jan-20112.6 KiB

test.datH A D17-Jan-201112.5 KiB

README

1ntpclient is an NTP (RFC-1305) client for unix-alike computers.
2Its functionality is a small subset of xntpd, but IMHO performs
3better (or at least has the potential to function better) within
4that limited scope.  Since it is much smaller than xntpd, it is
5also more relevant for embedded computers.
6
7ntpclient is Copyright 1997, 1999, 2000 Larry Doolittle, and may
8be freely used and copied according to the terms of the GNU
9General Public License, version 2.
10
11ntpclient home page: http://doolittle.faludi.com/ntpclient/
12
13To build on Linux, type "make".  Solaris and other Unix users will
14probably need to adjust the Makefile slightly.  It's not complicated.
15
16Usage: ntpclient [options]
17options:
18 -c count     stop after count time measurements (default 0 means go forever)
19 -d           print diagnostics (feature can be disabled at compile time)
20 -h hostname  (mandatory) NTP server host, against which to measure system time
21 -i interval  check time every interval seconds (default 600)
22 -l           attempt to lock local clock to server using adjtimex(2)
23 -p port      local NTP client UDP port (default 0 means "any available")
24 -r           replay analysis code based on stdin
25 -s           simple clock set (implies -c 1)
26
27Mortal users can use this program for monitoring, but not clock setting
28(with the -s or -l switches).  The -l switch has not been well tested.
29Simulation (with -r) actually looks halfway decent, so locking should be
30OK too, but it needs some tuning.
31
32The test.dat file has 200 lines of sample output.  Its first few lines,
33with the output column headers that are shown when the -d option is
34chosen, are:
35 day   second     elapsed    stall     skew  dispersion  freq
3651785 180.386    1398.0     40.3  953773.9    793.5  -1240000
3751785 780.382    1358.0     41.3  954329.0    915.5  -1240000
3851785 1380.381    1439.0     56.0  954871.3    915.5  -1240000
39
40day, second: time of measurement
41elapsed:     total time from query to response (microseconds)
42stall:       time the server reports that it sat on the request (microseconds)
43skew:        difference between local time and server time (microseconds)
44dispersion:  reported by server, see RFC-1305 (microseconds)
45freq:        local clock frequency adjustment (Linux only, ppm*65536)
46
47test.dat is suitable for piping into ntpclient -r.  I have over 53000
48samples (lines) archived for study, that I don't include here.
49They are spaced 10 minutes apart, representing over a year of data
50logging (not continuous, unfortunately).
51
52envelope is a perl script that I have used for my lock studies.
53It's kind of a hack and not worth documenting here.
54
55       - Larry Doolittle  <larry@doolittle.boa.org>
56