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