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