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