invoke-ntptrace.texi revision 302408
1215125Sed@node ntptrace Invocation 2215125Sed@section Invoking ntptrace 3215125Sed@pindex ntptrace 4215125Sed@cindex Trace peers of an NTP server 5215125Sed@ignore 6215125Sed# 7215125Sed# EDIT THIS FILE WITH CAUTION (invoke-ntptrace.texi) 8215125Sed# 9215129Sed# It has been AutoGen-ed June 2, 2016 at 07:25:03 AM by AutoGen 5.18.5 10215125Sed# From the definitions ntptrace-opts.def 11215125Sed# and the template file agtexi-cmd.tpl 12215125Sed@end ignore 13215125Sed 14215125Sed@code{ntptrace} is a perl script that uses the ntpq utility program to follow 15215125Sedthe chain of NTP servers from a given host back to the primary time source. For 16215125Sedntptrace to work properly, each of these servers must implement the NTP Control 17215125Sedand Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets. 18215125Sed 19215125SedIf given no arguments, ntptrace starts with localhost. Here is an example of 20215125Sedthe output from ntptrace: 21215125Sed 22215125Sed@example 23215125Sed% ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135 24215125Sedserver2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu: 25215125Sedstratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB' 26215125Sed@end example 27215125Sed 28215125SedOn each line, the fields are (left to right): the host name, the host stratum, 29215125Sedthe time offset between that host and the local host (as measured by 30215125Sed@code{ntptrace}; this is why it is not always zero for "localhost"), the host 31215125Sedsynchronization distance, and (only for stratum-1 servers) the reference clock 32215125SedID. All times are given in seconds. Note that the stratum is the server hop 33215125Sedcount to the primary source, while the synchronization distance is the 34215125Sedestimated error relative to the primary source. These terms are precisely 35215125Seddefined in RFC-1305. 36215125Sed 37215125Sed 38215125SedThis section was generated by @strong{AutoGen}, 39215125Sedusing the @code{agtexi-cmd} template and the option descriptions for the @code{ntptrace} program. 40215125Sed 41215125Sed@menu 42215125Sed* ntptrace usage:: ntptrace help/usage (@option{--help}) 43222656Sed* ntptrace numeric:: numeric option (-n) 44222656Sed* ntptrace max-hosts:: max-hosts option (-m) 45215125Sed* ntptrace host:: host option (-r) 46215125Sed* ntptrace exit status:: exit status 47215125Sed@end menu 48215125Sed 49215125Sed@node ntptrace usage 50215125Sed@subsection ntptrace help/usage (@option{--help}) 51215125Sed@cindex ntptrace help 52215125Sed 53215125SedThis is the automatically generated usage text for ntptrace. 54215125Sed 55215125SedThe text printed is the same whether selected with the @code{help} option 56215125Sed(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print 57215125Sedthe usage text by passing it through a pager program. 58215125Sed@code{more-help} is disabled on platforms without a working 59215125Sed@code{fork(2)} function. The @code{PAGER} environment variable is 60215125Sedused to select the program, defaulting to @file{more}. Both will exit 61215125Sedwith a status code of 0. 62215125Sed 63215125Sed@exampleindent 0 64215125Sed@example 65215125Sedntptrace - Trace peers of an NTP server - Ver. 4.2.8p8 66215125SedUSAGE: ntptrace [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [host] 67215125Sed 68215125Sed -n, --numeric Print IP addresses instead of hostnames 69215125Sed -m, --max-hosts=num Maximum number of peers to trace 70215125Sed -r, --host=str Single remote host 71215125Sed -?, --help Display usage information and exit 72215125Sed --more-help Pass the extended usage text through a pager 73215125Sed 74215125SedOptions are specified by doubled hyphens and their name or by a single 75215125Sedhyphen and the flag character. 76215125Sed@end example 77215125Sed@exampleindent 4 78215125Sed 79215125Sed@node ntptrace numeric 80215125Sed@subsection numeric option (-n) 81229135Sed@cindex ntptrace-numeric 82215125Sed 83215125SedThis is the ``print ip addresses instead of hostnames'' option. 84215125SedOutput hosts as dotted-quad numeric format rather than converting to 85215125Sedthe canonical host names. 86215125Sed@node ntptrace max-hosts 87215125Sed@subsection max-hosts option (-m) 88229135Sed@cindex ntptrace-max-hosts 89229135Sed 90229135SedThis is the ``maximum number of peers to trace'' option. 91215125SedThis option takes a number argument. 92215125SedThis option has no @samp{doc} documentation. 93215125Sed@node ntptrace host 94215125Sed@subsection host option (-r) 95215125Sed@cindex ntptrace-host 96215125Sed 97215125SedThis is the ``single remote host'' option. 98215125SedThis option takes a string argument. 99215125SedThis option has no @samp{doc} documentation. 100215125Sed@node ntptrace exit status 101215125Sed@subsection ntptrace exit status 102215125Sed 103215125SedOne of the following exit values will be returned: 104215125Sed@table @samp 105215125Sed@item 0 (EXIT_SUCCESS) 106215125SedSuccessful program execution. 107215125Sed@item 1 (EXIT_FAILURE) 108215125SedThe operation failed or the command syntax was not valid. 109215125Sed@end table 110215125Sed