1275970Scy<html lang="en"> 2275970Scy<head> 3275970Scy<title>Ntptrace User's Manual</title> 4275970Scy<meta http-equiv="Content-Type" content="text/html"> 5275970Scy<meta name="description" content="Ntptrace User's Manual"> 6275970Scy<meta name="generator" content="makeinfo 4.7"> 7275970Scy<link title="Top" rel="top" href="#Top"> 8275970Scy<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 9275970Scy<meta http-equiv="Content-Style-Type" content="text/css"> 10275970Scy<style type="text/css"><!-- 11275970Scy pre.display { font-family:inherit } 12275970Scy pre.format { font-family:inherit } 13338531Sdelphij pre.smalldisplay { font-family:inherit; font-size:smaller } 14275970Scy pre.smallformat { font-family:inherit; font-size:smaller } 15338531Sdelphij pre.smallexample { font-size:smaller } 16275970Scy pre.smalllisp { font-size:smaller } 17338531Sdelphij span.sc { font-variant:small-caps } 18275970Scy span.roman { font-family: serif; font-weight: normal; } 19275970Scy--></style> 20275970Scy</head> 21275970Scy<body> 22275970Scy<h1 class="settitle">Ntptrace User's Manual</h1> 23275970Scy<div class="node"> 24275970Scy<p><hr> 25275970Scy<a name="Top"></a>Next: <a rel="next" accesskey="n" href="#ntptrace-Description">ntptrace Description</a>, 26275970ScyPrevious: <a rel="previous" accesskey="p" href="#dir">(dir)</a>, 27275970ScyUp: <a rel="up" accesskey="u" href="#dir">(dir)</a> 28275970Scy<br> 29275970Scy</div> 30275970Scy 31275970Scy<h2 class="unnumbered">Simple Network Time Protocol User Manual</h2> 32275970Scy 33275970Scy<p>This document describes the use of the NTP Project's <code>ntptrace</code> program. 34275970ScyThis document applies to version 4.2.8p12 of <code>ntptrace</code>. 35275970Scy 36275970Scy <div class="shortcontents"> 37275970Scy<h2>Short Contents</h2> 38275970Scy<ul> 39275970Scy<a href="#Top">Simple Network Time Protocol User Manual</a> 40275970Scy</ul> 41275970Scy</div> 42275970Scy 43275970Scy<ul class="menu"> 44275970Scy<li><a accesskey="1" href="#ntptrace-Description">ntptrace Description</a>: Description 45275970Scy<li><a accesskey="2" href="#ntptrace-Invocation">ntptrace Invocation</a>: Invoking ntptrace 46275970Scy</ul> 47275970Scy 48275970Scy<div class="node"> 49275970Scy<p><hr> 50275970Scy<a name="ntptrace-Invocation"></a>Previous: <a rel="previous" accesskey="p" href="#ntptrace-Description">ntptrace Description</a>, 51275970ScyUp: <a rel="up" accesskey="u" href="#Top">Top</a> 52275970Scy<br> 53275970Scy</div> 54275970Scy 55275970Scy<h3 class="section">Invoking ntptrace</h3> 56275970Scy 57275970Scy<p><a name="index-ntptrace-1"></a><a name="index-Trace-peers-of-an-NTP-server-2"></a> 58275970Scy<code>ntptrace</code> is a perl script that uses the ntpq utility program to follow 59275970Scythe chain of NTP servers from a given host back to the primary time source. For 60275970Scyntptrace to work properly, each of these servers must implement the NTP Control 61275970Scyand Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets. 62275970Scy 63275970Scy <p>If given no arguments, ntptrace starts with localhost. Here is an example of 64275970Scythe output from ntptrace: 65275970Scy 66275970Scy<pre class="example"> % ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135 67275970Scy server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu: 68275970Scy stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB' 69275970Scy</pre> 70275970Scy <p>On each line, the fields are (left to right): the host name, the host stratum, 71275970Scythe time offset between that host and the local host (as measured by 72275970Scy<code>ntptrace</code>; this is why it is not always zero for "localhost"), the host 73275970Scysynchronization distance, and (only for stratum-1 servers) the reference clock 74275970ScyID. All times are given in seconds. Note that the stratum is the server hop 75275970Scycount to the primary source, while the synchronization distance is the 76275970Scyestimated error relative to the primary source. These terms are precisely 77275970Scydefined in RFC-1305. 78275970Scy 79275970Scy <p>This section was generated by <strong>AutoGen</strong>, 80275970Scyusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntptrace</code> program. 81275970Scy 82275970Scy<ul class="menu"> 83275970Scy<li><a accesskey="1" href="#ntptrace-usage">ntptrace usage</a>: ntptrace help/usage (<span class="option">--help</span>) 84275970Scy<li><a accesskey="2" href="#ntptrace-numeric">ntptrace numeric</a>: numeric option (-n) 85275970Scy<li><a accesskey="3" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>: max-hosts option (-m) 86275970Scy<li><a accesskey="4" href="#ntptrace-host">ntptrace host</a>: host option (-r) 87275970Scy<li><a accesskey="5" href="#ntptrace-exit-status">ntptrace exit status</a>: exit status 88275970Scy</ul> 89275970Scy 90275970Scy<div class="node"> 91275970Scy<p><hr> 92275970Scy<a name="ntptrace-usage"></a>Next: <a rel="next" accesskey="n" href="#ntptrace-numeric">ntptrace numeric</a>, 93275970ScyUp: <a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a> 94275970Scy<br> 95275970Scy</div> 96275970Scy 97275970Scy<h4 class="subsection">ntptrace help/usage (<span class="option">--help</span>)</h4> 98275970Scy 99275970Scy<p><a name="index-ntptrace-help-3"></a> 100275970ScyThis is the automatically generated usage text for ntptrace. 101275970Scy 102275970Scy <p>The text printed is the same whether selected with the <code>help</code> option 103275970Scy(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print 104275970Scythe usage text by passing it through a pager program. 105275970Scy<code>more-help</code> is disabled on platforms without a working 106275970Scy<code>fork(2)</code> function. The <code>PAGER</code> environment variable is 107275970Scyused to select the program, defaulting to <span class="file">more</span>. Both will exit 108275970Scywith a status code of 0. 109275970Scy 110275970Scy<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p12 111275970ScyUSAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host] 112275970Scy 113275970Scy -n, --numeric Print IP addresses instead of hostnames 114275970Scy -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: <a rel="next" accesskey="n" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>, 125Previous: <a rel="previous" accesskey="p" href="#ntptrace-usage">ntptrace usage</a>, 126Up: <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 “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