<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Ntptrace User&rsquo;s Manual</title>

<meta name="description" content="Ntptrace User&rsquo;s Manual">
<meta name="keywords" content="Ntptrace User&rsquo;s Manual">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="#Top" rel="start" title="Top">
<link href="dir.html#Top" rel="up" title="(dir)">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<h1 class="settitle" align="center">Ntptrace User&rsquo;s Manual</h1>





<span id="Top"></span><div class="header">
<p>
Previous: <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>
</div>
<span id="Simple-Network-Time-Protocol-User-Manual"></span><h1 class="top">Simple Network Time Protocol User Manual</h1>

<p>This document describes the use of the NTP Project&rsquo;s <code>ntptrace</code> program.
This document applies to version 4.2.8p18 of <code>ntptrace</code>.
</p>
<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>

<div class="shortcontents">
<ul class="no-bullet">
<li><a id="stoc-Invoking-ntptrace" href="#toc-Invoking-ntptrace">1 Invoking ntptrace</a></li>
</ul>
</div>


<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; ntptrace Description</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
<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
</td></tr>
</table>

<hr>
<span id="ntptrace-Invocation"></span><div class="header">
<p>
Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
<span id="Invoking-ntptrace"></span><h2 class="chapter">1 Invoking ntptrace</h2>
<span id="index-ntptrace"></span>
<span id="index-Trace-peers-of-an-NTP-server"></span>

<p><code>ntptrace</code> is a perl script that uses the ntpq utility program to follow
the chain of NTP servers from a given host back to the primary time source. For
ntptrace to work properly, each of these servers must implement the NTP Control
and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
</p>
<p>If given no arguments, ntptrace starts with localhost. Here is an example of
the output from ntptrace:
</p>
<div class="example">
<pre class="example">% ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135
server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu:
stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
</pre></div>

<p>On each line, the fields are (left to right): the host name, the host stratum,
the time offset between that host and the local host (as measured by
<code>ntptrace</code>; this is why it is not always zero for &quot;localhost&quot;), the host
synchronization distance, and (only for stratum-1 servers) the reference clock
ID. All times are given in seconds. Note that the stratum is the server hop
count to the primary source, while the synchronization distance is the
estimated error relative to the primary source. These terms are precisely
defined in RFC-1305.
</p>

<p>This section was generated by <strong>AutoGen</strong>,
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntptrace</code> program.
</p>
<table class="menu" border="0" cellspacing="0">
<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>)
</td></tr>
<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)
</td></tr>
<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)
</td></tr>
<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)
</td></tr>
<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
</td></tr>
</table>

<hr>
<span id="ntptrace-usage"></span><div class="header">
<p>
Next: <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>
</div>
<span id="ntptrace-help_002fusage-_0028_002d_002dhelp_0029"></span><h3 class="section">1.1 ntptrace help/usage (<samp>--help</samp>)</h3>
<span id="index-ntptrace-help"></span>

<p>This is the automatically generated usage text for ntptrace.
</p>
<p>The text printed is the same whether selected with the <code>help</code> option
(<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>).  <code>more-help</code> will print
the usage text by passing it through a pager program.
<code>more-help</code> is disabled on platforms without a working
<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
used to select the program, defaulting to <samp>more</samp>.  Both will exit
with a status code of 0.
</p>
<div class="example">
<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p18
USAGE: ntptrace [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [host]

    -n, --numeric                Print IP addresses instead of hostnames
    -m, --max-hosts=num          Maximum number of peers to trace
    -r, --host=str               Single remote host
    -?, --help                   Display usage information and exit
        --more-help              Pass the extended usage text through a pager

Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.
</pre></div>

<table class="menu" border="0" cellspacing="0">
<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">
</td></tr>
<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">
</td></tr>
<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">
</td></tr>
<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">
</td></tr>
</table>

<hr>
<span id="ntptrace-numeric"></span><div class="header">
<p>
Next: <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>
</div>
<span id="numeric-option-_0028_002dn_0029"></span><h4 class="subsection">1.1.1 numeric option (-n)</h4>
<span id="index-ntptrace_002dnumeric"></span>

<p>This is the &ldquo;print ip addresses instead of hostnames&rdquo; option.
Output hosts as dotted-quad numeric format rather than converting to
the canonical host names.
</p><hr>
<span id="ntptrace-max_002dhosts"></span><div class="header">
<p>
Next: <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>
</div>
<span id="max_002dhosts-option-_0028_002dm_0029"></span><h4 class="subsection">1.1.2 max-hosts option (-m)</h4>
<span id="index-ntptrace_002dmax_002dhosts"></span>

<p>This is the &ldquo;maximum number of peers to trace&rdquo; option.
This option takes a number argument.
This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
</p><hr>
<span id="ntptrace-host"></span><div class="header">
<p>
Next: <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>
</div>
<span id="host-option-_0028_002dr_0029"></span><h4 class="subsection">1.1.3 host option (-r)</h4>
<span id="index-ntptrace_002dhost"></span>

<p>This is the &ldquo;single remote host&rdquo; option.
This option takes a string argument.
This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
</p><hr>
<span id="ntptrace-exit-status"></span><div class="header">
<p>
Previous: <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>
</div>
<span id="ntptrace-exit-status-1"></span><h4 class="subsection">1.1.4 ntptrace exit status</h4>

<p>One of the following exit values will be returned:
</p><dl compact="compact">
<dt>&lsquo;<samp>0 (EXIT_SUCCESS)</samp>&rsquo;</dt>
<dd><p>Successful program execution.
</p></dd>
<dt>&lsquo;<samp>1 (EXIT_FAILURE)</samp>&rsquo;</dt>
<dd><p>The operation failed or the command syntax was not valid.
</p></dd>
</dl>
<hr>



</body>
</html>
