1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6<title>Ntptrace User&rsquo;s Manual</title>
7
8<meta name="description" content="Ntptrace User&rsquo;s Manual">
9<meta name="keywords" content="Ntptrace User&rsquo;s Manual">
10<meta name="resource-type" content="document">
11<meta name="distribution" content="global">
12<meta name="Generator" content="makeinfo">
13<link href="#Top" rel="start" title="Top">
14<link href="dir.html#Top" rel="up" title="(dir)">
15<style type="text/css">
16<!--
17a.summary-letter {text-decoration: none}
18blockquote.indentedblock {margin-right: 0em}
19div.display {margin-left: 3.2em}
20div.example {margin-left: 3.2em}
21div.lisp {margin-left: 3.2em}
22kbd {font-style: oblique}
23pre.display {font-family: inherit}
24pre.format {font-family: inherit}
25pre.menu-comment {font-family: serif}
26pre.menu-preformatted {font-family: serif}
27span.nolinebreak {white-space: nowrap}
28span.roman {font-family: initial; font-weight: normal}
29span.sansserif {font-family: sans-serif; font-weight: normal}
30ul.no-bullet {list-style: none}
31-->
32</style>
33
34
35</head>
36
37<body lang="en">
38<h1 class="settitle" align="center">Ntptrace User&rsquo;s Manual</h1>
39
40
41
42
43
44<span id="Top"></span><div class="header">
45<p>
46Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
47</div>
48<span id="Simple-Network-Time-Protocol-User-Manual"></span><h1 class="top">Simple Network Time Protocol User Manual</h1>
49
50<p>This document describes the use of the NTP Project&rsquo;s <code>ntptrace</code> program.
51This document applies to version 4.2.8p17 of <code>ntptrace</code>.
52</p>
53<span id="SEC_Overview"></span>
54<h2 class="shortcontents-heading">Short Table of Contents</h2>
55
56<div class="shortcontents">
57<ul class="no-bullet">
58<li><a id="stoc-Invoking-ntptrace" href="#toc-Invoking-ntptrace">1 Invoking ntptrace</a></li>
59</ul>
60</div>
61
62
63<table class="menu" border="0" cellspacing="0">
64<tr><td align="left" valign="top">&bull; ntptrace Description</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
65</td></tr>
66<tr><td align="left" valign="top">&bull; <a href="#ntptrace-Invocation" accesskey="2">ntptrace Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntptrace
67</td></tr>
68</table>
69
70<hr>
71<span id="ntptrace-Invocation"></span><div class="header">
72<p>
73Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
74</div>
75<span id="Invoking-ntptrace"></span><h2 class="chapter">1 Invoking ntptrace</h2>
76<span id="index-ntptrace"></span>
77<span id="index-Trace-peers-of-an-NTP-server"></span>
78
79<p><code>ntptrace</code> is a perl script that uses the ntpq utility program to follow
80the chain of NTP servers from a given host back to the primary time source. For
81ntptrace to work properly, each of these servers must implement the NTP Control
82and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
83</p>
84<p>If given no arguments, ntptrace starts with localhost. Here is an example of
85the output from ntptrace:
86</p>
87<div class="example">
88<pre class="example">% ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135
89server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu:
90stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
91</pre></div>
92
93<p>On each line, the fields are (left to right): the host name, the host stratum,
94the time offset between that host and the local host (as measured by
95<code>ntptrace</code>; this is why it is not always zero for &quot;localhost&quot;), the host
96synchronization distance, and (only for stratum-1 servers) the reference clock
97ID. All times are given in seconds. Note that the stratum is the server hop
98count to the primary source, while the synchronization distance is the
99estimated error relative to the primary source. These terms are precisely
100defined in RFC-1305.
101</p>
102
103<p>This section was generated by <strong>AutoGen</strong>,
104using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntptrace</code> program.
105</p>
106<table class="menu" border="0" cellspacing="0">
107<tr><td align="left" valign="top">&bull; <a href="#ntptrace-usage" accesskey="1">ntptrace usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntptrace help/usage (<samp>--help</samp>)
108</td></tr>
109<tr><td align="left" valign="top">&bull; <a href="#ntptrace-numeric" accesskey="2">ntptrace numeric</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">numeric option (-n)
110</td></tr>
111<tr><td align="left" valign="top">&bull; <a href="#ntptrace-max_002dhosts" accesskey="3">ntptrace max-hosts</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">max-hosts option (-m)
112</td></tr>
113<tr><td align="left" valign="top">&bull; <a href="#ntptrace-host" accesskey="4">ntptrace host</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">host option (-r)
114</td></tr>
115<tr><td align="left" valign="top">&bull; <a href="#ntptrace-exit-status" accesskey="5">ntptrace exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
116</td></tr>
117</table>
118
119<hr>
120<span id="ntptrace-usage"></span><div class="header">
121<p>
122Next: <a href="#ntptrace-numeric" accesskey="n" rel="next">ntptrace numeric</a>, Up: <a href="#ntptrace-Invocation" accesskey="u" rel="up">ntptrace Invocation</a> &nbsp; </p>
123</div>
124<span id="ntptrace-help_002fusage-_0028_002d_002dhelp_0029"></span><h3 class="section">1.1 ntptrace help/usage (<samp>--help</samp>)</h3>
125<span id="index-ntptrace-help"></span>
126
127<p>This is the automatically generated usage text for ntptrace.
128</p>
129<p>The text printed is the same whether selected with the <code>help</code> option
130(<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>).  <code>more-help</code> will print
131the usage text by passing it through a pager program.
132<code>more-help</code> is disabled on platforms without a working
133<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
134used to select the program, defaulting to <samp>more</samp>.  Both will exit
135with a status code of 0.
136</p>
137<div class="example">
138<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p17
139USAGE: ntptrace [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [host]
140
141    -n, --numeric                Print IP addresses instead of hostnames
142    -m, --max-hosts=num          Maximum number of peers to trace
143    -r, --host=str               Single remote host
144    -?, --help                   Display usage information and exit
145        --more-help              Pass the extended usage text through a pager
146
147Options are specified by doubled hyphens and their name or by a single
148hyphen and the flag character.
149</pre></div>
150
151<table class="menu" border="0" cellspacing="0">
152<tr><td align="left" valign="top">&bull; <a href="#ntptrace-numeric" accesskey="1">numeric option (-n)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
153</td></tr>
154<tr><td align="left" valign="top">&bull; <a href="#ntptrace-max_002dhosts" accesskey="2">max-hosts option (-m)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
155</td></tr>
156<tr><td align="left" valign="top">&bull; <a href="#ntptrace-host" accesskey="3">host option (-r)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
157</td></tr>
158<tr><td align="left" valign="top">&bull; <a href="#ntptrace-exit-status" accesskey="4">ntptrace exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
159</td></tr>
160</table>
161
162<hr>
163<span id="ntptrace-numeric"></span><div class="header">
164<p>
165Next: <a href="#ntptrace-max_002dhosts" accesskey="n" rel="next">ntptrace max-hosts</a>, Previous: <a href="#ntptrace-usage" accesskey="p" rel="prev">ntptrace usage</a>, Up: <a href="#ntptrace-usage" accesskey="u" rel="up">ntptrace usage</a> &nbsp; </p>
166</div>
167<span id="numeric-option-_0028_002dn_0029"></span><h4 class="subsection">1.1.1 numeric option (-n)</h4>
168<span id="index-ntptrace_002dnumeric"></span>
169
170<p>This is the &ldquo;print ip addresses instead of hostnames&rdquo; option.
171Output hosts as dotted-quad numeric format rather than converting to
172the canonical host names.
173</p><hr>
174<span id="ntptrace-max_002dhosts"></span><div class="header">
175<p>
176Next: <a href="#ntptrace-host" accesskey="n" rel="next">ntptrace host</a>, Previous: <a href="#ntptrace-numeric" accesskey="p" rel="prev">ntptrace numeric</a>, Up: <a href="#ntptrace-usage" accesskey="u" rel="up">ntptrace usage</a> &nbsp; </p>
177</div>
178<span id="max_002dhosts-option-_0028_002dm_0029"></span><h4 class="subsection">1.1.2 max-hosts option (-m)</h4>
179<span id="index-ntptrace_002dmax_002dhosts"></span>
180
181<p>This is the &ldquo;maximum number of peers to trace&rdquo; option.
182This option takes a number argument.
183This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
184</p><hr>
185<span id="ntptrace-host"></span><div class="header">
186<p>
187Next: <a href="#ntptrace-exit-status" accesskey="n" rel="next">ntptrace exit status</a>, Previous: <a href="#ntptrace-max_002dhosts" accesskey="p" rel="prev">ntptrace max-hosts</a>, Up: <a href="#ntptrace-usage" accesskey="u" rel="up">ntptrace usage</a> &nbsp; </p>
188</div>
189<span id="host-option-_0028_002dr_0029"></span><h4 class="subsection">1.1.3 host option (-r)</h4>
190<span id="index-ntptrace_002dhost"></span>
191
192<p>This is the &ldquo;single remote host&rdquo; option.
193This option takes a string argument.
194This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
195</p><hr>
196<span id="ntptrace-exit-status"></span><div class="header">
197<p>
198Previous: <a href="#ntptrace-host" accesskey="p" rel="prev">ntptrace host</a>, Up: <a href="#ntptrace-usage" accesskey="u" rel="up">ntptrace usage</a> &nbsp; </p>
199</div>
200<span id="ntptrace-exit-status-1"></span><h4 class="subsection">1.1.4 ntptrace exit status</h4>
201
202<p>One of the following exit values will be returned:
203</p><dl compact="compact">
204<dt>&lsquo;<samp>0 (EXIT_SUCCESS)</samp>&rsquo;</dt>
205<dd><p>Successful program execution.
206</p></dd>
207<dt>&lsquo;<samp>1 (EXIT_FAILURE)</samp>&rsquo;</dt>
208<dd><p>The operation failed or the command syntax was not valid.
209</p></dd>
210</dl>
211<hr>
212
213
214
215</body>
216</html>
217