]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/scripts/ntptrace/ntptrace-opts.def
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / ntp / scripts / ntptrace / ntptrace-opts.def
1 /* -*- Mode: Text -*- */
2 AutoGen Definitions perlopt;
3
4 //#include copyright.def
5 #include autogen-version.def
6
7 prog-name       = 'ntptrace';
8 prog-title      = 'Trace peers of an NTP server';
9 package         = ntp;
10 #include        version.def
11 argument        = '[host]';
12
13 long-opts;
14 gnu-usage;
15
16 flag = {
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
26 flag = {
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
34 flag = {
35     name        = host;
36     value       = r;
37     arg-type    = string;
38     arg-default = '127.0.0.1';
39     descrip     = 'Single remote host';
40 };
41
42 doc-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
47 the chain of NTP servers from a given host back to the primary time source. For
48 ntptrace to work properly, each of these servers must implement the NTP Control
49 and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
50
51 If given no arguments, ntptrace starts with localhost. Here is an example of
52 the output from ntptrace:
53
54 @example
55 % ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135
56 server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu:
57 stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
58 @end example
59
60 On each line, the fields are (left to right): the host name, the host stratum,
61 the 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
63 synchronization distance, and (only for stratum-1 servers) the reference clock
64 ID. All times are given in seconds. Note that the stratum is the server hop
65 count to the primary source, while the synchronization distance is the
66 estimated error relative to the primary source. These terms are precisely
67 defined in RFC-1305.
68         _END_PROG_MDOC_DESCRIP;
69 };