1/* -*- Mode: Text -*- */ 2autogen definitions perlopt; 3 4//#include copyright.def 5#include autogen-version.def 6 7prog-name = 'ntptrace'; 8prog-title = 'Trace peers of an NTP server'; 9argument = '[host]'; 10long-opts; 11gnu-usage; 12 13flag = { 14 name = numeric; 15 value = n; 16 descrip = 'Print IP addresses instead of hostnames'; 17 doc = <<- _EndOfDoc_ 18 Output hosts as dotted-quad numeric format rather than converting to 19 the canonical host names. 20 _EndOfDoc_; 21}; 22 23flag = { 24 name = max-hosts; 25 value = m; 26 arg-type = number; 27 arg-default = 99; 28 descrip = 'Maximum number of peers to trace'; 29}; 30 31flag = { 32 name = host; 33 value = r; 34 arg-type = string; 35 arg-default = '127.0.0.1'; 36 descrip = 'Single remote host'; 37}; 38 39doc-section = { 40 ds-type = 'DESCRIPTION'; 41 ds-format = 'texi'; 42 ds-text = <<- _END_PROG_MDOC_DESCRIP 43@code{ntptrace} is a perl script that uses the ntpq utility program to follow 44the chain of NTP servers from a given host back to the primary time source. For 45ntptrace to work properly, each of these servers must implement the NTP Control 46and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets. 47 48If given no arguments, ntptrace starts with localhost. Here is an example of 49the output from ntptrace: 50 51@example 52% ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135 53server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu: 54stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB' 55@end example 56 57On each line, the fields are (left to right): the host name, the host stratum, 58the time offset between that host and the local host (as measured by 59@code{ntptrace}; this is why it is not always zero for "localhost"), the host 60synchronization distance, and (only for stratum-1 servers) the reference clock 61ID. All times are given in seconds. Note that the stratum is the server hop 62count to the primary source, while the synchronization distance is the 63estimated error relative to the primary source. These terms are precisely 64defined in RFC-1305. 65 _END_PROG_MDOC_DESCRIP; 66}; 67