ntptrace.html revision 338531
1104615Stjr<html lang="en"> 2104615Stjr<head> 3104615Stjr<title>Ntptrace User's Manual</title> 4104615Stjr<meta http-equiv="Content-Type" content="text/html"> 5104615Stjr<meta name="description" content="Ntptrace User's Manual"> 6104615Stjr<meta name="generator" content="makeinfo 4.7"> 7104615Stjr<link title="Top" rel="top" href="#Top"> 8104615Stjr<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 9104615Stjr<meta http-equiv="Content-Style-Type" content="text/css"> 10104615Stjr<style type="text/css"><!-- 11104615Stjr pre.display { font-family:inherit } 12104615Stjr pre.format { font-family:inherit } 13104615Stjr pre.smalldisplay { font-family:inherit; font-size:smaller } 14104615Stjr pre.smallformat { font-family:inherit; font-size:smaller } 15104615Stjr pre.smallexample { font-size:smaller } 16104615Stjr pre.smalllisp { font-size:smaller } 17104615Stjr span.sc { font-variant:small-caps } 18104615Stjr span.roman { font-family: serif; font-weight: normal; } 19104615Stjr--></style> 20104615Stjr</head> 21104615Stjr<body> 22104615Stjr<h1 class="settitle">Ntptrace User's Manual</h1> 23104615Stjr<div class="node"> 24104615Stjr<p><hr> 25104615Stjr<a name="Top"></a>Next: <a rel="next" accesskey="n" href="#ntptrace-Description">ntptrace Description</a>, 26104615StjrPrevious: <a rel="previous" accesskey="p" href="#dir">(dir)</a>, 27104615StjrUp: <a rel="up" accesskey="u" href="#dir">(dir)</a> 28104615Stjr<br> 29104615Stjr</div> 30104615Stjr 31104647Stjr<h2 class="unnumbered">Simple Network Time Protocol User Manual</h2> 32104647Stjr 33104615Stjr<p>This document describes the use of the NTP Project's <code>ntptrace</code> program. 34104615StjrThis document applies to version 4.2.8p12 of <code>ntptrace</code>. 35104615Stjr 36104615Stjr <div class="shortcontents"> 37104615Stjr<h2>Short Contents</h2> 38104615Stjr<ul> 39104615Stjr<a href="#Top">Simple Network Time Protocol User Manual</a> 40104615Stjr</ul> 41104615Stjr</div> 42104615Stjr 43104615Stjr<ul class="menu"> 44104615Stjr<li><a accesskey="1" href="#ntptrace-Description">ntptrace Description</a>: Description 45104615Stjr<li><a accesskey="2" href="#ntptrace-Invocation">ntptrace Invocation</a>: Invoking ntptrace 46227153Sed</ul> 47227153Sed 48104615Stjr<div class="node"> 49227153Sed<p><hr> 50227153Sed<a name="ntptrace-Invocation"></a>Previous: <a rel="previous" accesskey="p" href="#ntptrace-Description">ntptrace Description</a>, 51227153SedUp: <a rel="up" accesskey="u" href="#Top">Top</a> 52104615Stjr<br> 53104615Stjr</div> 54104615Stjr 55104615Stjr<h3 class="section">Invoking ntptrace</h3> 56104647Stjr 57104615Stjr<p><a name="index-ntptrace-1"></a><a name="index-Trace-peers-of-an-NTP-server-2"></a> 58104615Stjr<code>ntptrace</code> is a perl script that uses the ntpq utility program to follow 59104615Stjrthe chain of NTP servers from a given host back to the primary time source. For 60104615Stjrntptrace to work properly, each of these servers must implement the NTP Control 61104647Stjrand Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets. 62104647Stjr 63104647Stjr <p>If given no arguments, ntptrace starts with localhost. Here is an example of 64104647Stjrthe output from ntptrace: 65104647Stjr 66104647Stjr<pre class="example"> % ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135 67104647Stjr server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu: 68104647Stjr stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB' 69104647Stjr</pre> 70104647Stjr <p>On each line, the fields are (left to right): the host name, the host stratum, 71104647Stjrthe time offset between that host and the local host (as measured by 72104647Stjr<code>ntptrace</code>; this is why it is not always zero for "localhost"), the host 73247953Sdimsynchronization distance, and (only for stratum-1 servers) the reference clock 74104615StjrID. All times are given in seconds. Note that the stratum is the server hop 75104615Stjrcount to the primary source, while the synchronization distance is the 76104647Stjrestimated error relative to the primary source. These terms are precisely 77104615Stjrdefined in RFC-1305. 78104647Stjr 79104647Stjr <p>This section was generated by <strong>AutoGen</strong>, 80104647Stjrusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntptrace</code> program. 81104647Stjr 82104647Stjr<ul class="menu"> 83104647Stjr<li><a accesskey="1" href="#ntptrace-usage">ntptrace usage</a>: ntptrace help/usage (<span class="option">--help</span>) 84104647Stjr<li><a accesskey="2" href="#ntptrace-numeric">ntptrace numeric</a>: numeric option (-n) 85104647Stjr<li><a accesskey="3" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>: max-hosts option (-m) 86104647Stjr<li><a accesskey="4" href="#ntptrace-host">ntptrace host</a>: host option (-r) 87104647Stjr<li><a accesskey="5" href="#ntptrace-exit-status">ntptrace exit status</a>: exit status 88104647Stjr</ul> 89104647Stjr 90104615Stjr<div class="node"> 91104615Stjr<p><hr> 92104615Stjr<a name="ntptrace-usage"></a>Next: <a rel="next" accesskey="n" href="#ntptrace-numeric">ntptrace numeric</a>, 93104615StjrUp: <a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a> 94227153Sed<br> 95104615Stjr</div> 96104615Stjr 97140226Sstefanf<h4 class="subsection">ntptrace help/usage (<span class="option">--help</span>)</h4> 98104615Stjr 99104615Stjr<p><a name="index-ntptrace-help-3"></a> 100104615StjrThis is the automatically generated usage text for ntptrace. 101104615Stjr 102104615Stjr <p>The text printed is the same whether selected with the <code>help</code> option 103104615Stjr(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print 104104615Stjrthe usage text by passing it through a pager program. 105104615Stjr<code>more-help</code> is disabled on platforms without a working 106104615Stjr<code>fork(2)</code> function. The <code>PAGER</code> environment variable is 107227153Sedused to select the program, defaulting to <span class="file">more</span>. Both will exit 108104647Stjrwith a status code of 0. 109104647Stjr 110104647Stjr<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p12 111104647StjrUSAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host] 112104647Stjr 113104647Stjr -n, --numeric Print IP addresses instead of hostnames 114104647Stjr -m, --max-hosts=num Maximum number of peers to trace 115104647Stjr -r, --host=str Single remote host 116104647Stjr -?, --help Display usage information and exit 117104647Stjr --more-help Pass the extended usage text through a pager 118104647Stjr 119104647StjrOptions are specified by doubled hyphens and their name or by a single 120104647Stjrhyphen and the flag character. 121104647Stjr</pre> 122104647Stjr <div class="node"> 123104647Stjr<p><hr> 124104647Stjr<a name="ntptrace-numeric"></a>Next: <a rel="next" accesskey="n" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>, 125104647StjrPrevious: <a rel="previous" accesskey="p" href="#ntptrace-usage">ntptrace usage</a>, 126227153SedUp: <a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a> 127104615Stjr<br> 128104615Stjr</div> 129146466Sru 130146466Sru<h4 class="subsection">numeric option (-n)</h4> 131146466Sru 132104615Stjr<p><a name="index-ntptrace_002dnumeric-4"></a> 133104615StjrThis is the “print ip addresses instead of hostnames” 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: <a rel="next" accesskey="n" href="#ntptrace-host">ntptrace host</a>, 139Previous: <a rel="previous" accesskey="p" href="#ntptrace-numeric">ntptrace numeric</a>, 140Up: <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 “maximum number of peers to trace” 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: <a rel="next" accesskey="n" href="#ntptrace-exit-status">ntptrace exit status</a>, 153Previous: <a rel="previous" accesskey="p" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>, 154Up: <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 “single remote host” 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: <a rel="previous" accesskey="p" href="#ntptrace-host">ntptrace host</a>, 167Up: <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