1NTPTRACE(1) NTPsec NTPTRACE(1)
2
3
4
6 ntptrace - trace peers of an NTP server
7
9 ntptrace [-V | --version] [-n |--numeric]
10 [-m number | --max-hosts=number]
11 [-r host | --host=remote]
12 hostname
13
15 ntptrace is a python script that uses the ntpq utility program to
16 follow the chain of NTP servers from a given host back to the primary
17 time source.
18
19 For ntptrace to work properly, each of these servers must implement the
20 NTP Control and Monitoring Protocol specified in RFC 1305 and enable
21 NTP Mode 6 control packets. Nowadays it is usual for public timeservers
22 to disable Mode 6 queries, so this script is unlikely to be very useful
23 unless you have a collection of specially-configured timeservers on
24 your LAN.
25
26 If given no arguments, ntptrace starts with localhost. Here is an
27 example of the output from ntptrace:
28
29 % ntptrace
30 localhost: stratum 4, offset 0.0019529, synch distance 0.144135
31 server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784
32 usndh.edu: stratum 1, offset 0.0019298, synch distance 0.011993, refid 'GPS'
33
34 On each line, the fields are (left to right): the host name, the host
35 stratum, the time offset between that host and the local host (as
36 measured by ntptrace; this is why it is not always zero for
37 "localhost"), the host synchronization distance, and (only for
38 stratum-1 servers) the reference clock ID. All times are given in
39 seconds. Note that the stratum is the server hop count to the primary
40 source, while the synchronization distance is the estimated error
41 relative to the primary source. These terms are precisely defined in
42 RFC 1305.
43
45 -n, --numeric
46 Print IP addresses instead of hostnames.
47
48 Output hosts as dotted-quad numeric format rather than converting
49 to the canonical host names.
50
51 -m number, --max-hosts=number
52 Maximum number of peers to trace. This option takes an integer
53 number as its argument. The default number for this option is 99.
54
55 -r string, --host=string
56 Trace a single remote host.
57
58 -V, --version
59 Print the version string and exit.
60
62 One of the following exit values will be returned:
63
64 0 (EXIT_SUCCESS)
65 Successful program execution.
66
67 1 (EXIT_FAILURE)
68 The operation failed or the invocation was not valid.
69
70
71
72NTPsec 2023-08-03 NTPTRACE(1)