xref: /freebsd/contrib/ntp/scripts/ntptrace/ntptrace.html (revision 1f4bcc459a76b7aa664f3fd557684cd0ba6da352)
1<html lang="en">
2<head>
3<title>Ntptrace User's Manual</title>
4<meta http-equiv="Content-Type" content="text/html">
5<meta name="description" content="Ntptrace User's Manual">
6<meta name="generator" content="makeinfo 4.7">
7<link title="Top" rel="top" href="#Top">
8<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9<meta http-equiv="Content-Style-Type" content="text/css">
10<style type="text/css"><!--
11  pre.display { font-family:inherit }
12  pre.format  { font-family:inherit }
13  pre.smalldisplay { font-family:inherit; font-size:smaller }
14  pre.smallformat  { font-family:inherit; font-size:smaller }
15  pre.smallexample { font-size:smaller }
16  pre.smalllisp    { font-size:smaller }
17  span.sc { font-variant:small-caps }
18  span.roman { font-family: serif; font-weight: normal; }
19--></style>
20</head>
21<body>
22<h1 class="settitle">Ntptrace User's Manual</h1>
23<div class="node">
24<p><hr>
25<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-Description">ntptrace Description</a>,
26Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
28<br>
29</div>
30
31<h2 class="unnumbered">Simple Network Time Protocol User Manual</h2>
32
33<p>This document describes the use of the NTP Project's <code>ntptrace</code> program.
34This document applies to version 4.2.8p6 of <code>ntptrace</code>.
35
36  <div class="shortcontents">
37<h2>Short Contents</h2>
38<ul>
39<a href="#Top">Simple Network Time Protocol User Manual</a>
40</ul>
41</div>
42
43<ul class="menu">
44<li><a accesskey="1" href="#ntptrace-Description">ntptrace Description</a>:             Description
45<li><a accesskey="2" href="#ntptrace-Invocation">ntptrace Invocation</a>: 		    Invoking ntptrace
46</ul>
47
48<div class="node">
49<p><hr>
50<a name="ntptrace-Invocation"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-Description">ntptrace Description</a>,
51Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
52<br>
53</div>
54
55<h3 class="section">Invoking ntptrace</h3>
56
57<p><a name="index-ntptrace-1"></a><a name="index-Trace-peers-of-an-NTP-server-2"></a>
58<code>ntptrace</code> is a perl script that uses the ntpq utility program to follow
59the chain of NTP servers from a given host back to the primary time source. For
60ntptrace to work properly, each of these servers must implement the NTP Control
61and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
62
63  <p>If given no arguments, ntptrace starts with localhost. Here is an example of
64the output from ntptrace:
65
66<pre class="example">     % ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135
67     server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu:
68     stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
69</pre>
70  <p>On each line, the fields are (left to right): the host name, the host stratum,
71the time offset between that host and the local host (as measured by
72<code>ntptrace</code>; this is why it is not always zero for "localhost"), the host
73synchronization distance, and (only for stratum-1 servers) the reference clock
74ID. All times are given in seconds. Note that the stratum is the server hop
75count to the primary source, while the synchronization distance is the
76estimated error relative to the primary source. These terms are precisely
77defined in RFC-1305.
78
79  <p>This section was generated by <strong>AutoGen</strong>,
80using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntptrace</code> program.
81
82<ul class="menu">
83<li><a accesskey="1" href="#ntptrace-usage">ntptrace usage</a>:                   ntptrace help/usage (<span class="option">--help</span>)
84<li><a accesskey="2" href="#ntptrace-numeric">ntptrace numeric</a>:                 numeric option (-n)
85<li><a accesskey="3" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>:               max-hosts option (-m)
86<li><a accesskey="4" href="#ntptrace-host">ntptrace host</a>:                    host option (-r)
87<li><a accesskey="5" href="#ntptrace-exit-status">ntptrace exit status</a>:             exit status
88</ul>
89
90<div class="node">
91<p><hr>
92<a name="ntptrace-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-numeric">ntptrace numeric</a>,
93Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
94<br>
95</div>
96
97<h4 class="subsection">ntptrace help/usage (<span class="option">--help</span>)</h4>
98
99<p><a name="index-ntptrace-help-3"></a>
100This is the automatically generated usage text for ntptrace.
101
102  <p>The text printed is the same whether selected with the <code>help</code> option
103(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>).  <code>more-help</code> will print
104the usage text by passing it through a pager program.
105<code>more-help</code> is disabled on platforms without a working
106<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
107used to select the program, defaulting to <span class="file">more</span>.  Both will exit
108with a status code of 0.
109
110<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p6
111USAGE: ntptrace [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [host]
112
113    -n, --numeric                Print IP addresses instead of hostnames
114    -m, --max-hosts=num          Maximum number of peers to trace
115    -r, --host=str               Single remote host
116    -?, --help                   Display usage information and exit
117        --more-help              Pass the extended usage text through a pager
118
119Options are specified by doubled hyphens and their name or by a single
120hyphen and the flag character.
121</pre>
122  <div class="node">
123<p><hr>
124<a name="ntptrace-numeric"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>,
125Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-usage">ntptrace usage</a>,
126Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
127<br>
128</div>
129
130<h4 class="subsection">numeric option (-n)</h4>
131
132<p><a name="index-ntptrace_002dnumeric-4"></a>
133This is the &ldquo;print ip addresses instead of hostnames&rdquo; option.
134Output hosts as dotted-quad numeric format rather than converting to
135the canonical host names.
136<div class="node">
137<p><hr>
138<a name="ntptrace-max_002dhosts"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-host">ntptrace host</a>,
139Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-numeric">ntptrace numeric</a>,
140Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
141<br>
142</div>
143
144<h4 class="subsection">max-hosts option (-m)</h4>
145
146<p><a name="index-ntptrace_002dmax_002dhosts-5"></a>
147This is the &ldquo;maximum number of peers to trace&rdquo; option.
148This option takes a number argument.
149This option has no <span class="samp">doc</span> documentation.
150<div class="node">
151<p><hr>
152<a name="ntptrace-host"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-exit-status">ntptrace exit status</a>,
153Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>,
154Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
155<br>
156</div>
157
158<h4 class="subsection">host option (-r)</h4>
159
160<p><a name="index-ntptrace_002dhost-6"></a>
161This is the &ldquo;single remote host&rdquo; option.
162This option takes a string argument.
163This option has no <span class="samp">doc</span> documentation.
164<div class="node">
165<p><hr>
166<a name="ntptrace-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-host">ntptrace host</a>,
167Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
168<br>
169</div>
170
171<h4 class="subsection">ntptrace exit status</h4>
172
173<p>One of the following exit values will be returned:
174     <dl>
175<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
176<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
177</dl>
178
179</body></html>
180
181