xref: /freebsd/contrib/ntp/html/ntptrace.html (revision 416ba5c74546f32a993436a99516d35008e9f384)
19c2daa00SOllivier Robert<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
29c2daa00SOllivier Robert<html>
39c2daa00SOllivier Robert<head>
4ea906c41SOllivier Robert<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
59c2daa00SOllivier Robert<meta name="generator" content="HTML Tidy, see www.w3.org">
69c2daa00SOllivier Robert<title>ntptrace - trace a chain of NTP servers back to the primary source</title>
79c2daa00SOllivier Robert<link href="scripts/style.css" type="text/css" rel="stylesheet">
89c2daa00SOllivier Robert</head>
99c2daa00SOllivier Robert<body>
109c2daa00SOllivier Robert<h3><tt>ntptrace</tt> - trace a chain of NTP servers back to the primary source</h3>
119c2daa00SOllivier Robert<img src="pic/alice13.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
129c2daa00SOllivier Robert<p>The rabbit knows the way back.</p>
13*2b15cb3dSCy Schubert<p>Last update:
14*2b15cb3dSCy Schubert  <!-- #BeginDate format:En2m -->31-Jan-2014  06:54<!-- #EndDate -->
15*2b15cb3dSCy Schubert    UTC</p>
169c2daa00SOllivier Robert<br clear="left">
179c2daa00SOllivier Robert<hr>
189c2daa00SOllivier Robert<h4>Synopsis</h4>
19*2b15cb3dSCy Schubert<tt>ntptrace [ -n ] [ -m <i>maxhosts</i> ] [ <i>server</i> ]</tt>
209c2daa00SOllivier Robert<h4>Description</h4>
21*2b15cb3dSCy Schubert<p><tt>ntptrace</tt> is a <tt>perl</tt> script that uses the <tt>ntpq</tt> utility program to follow the chain of NTP&nbsp;servers from a given host back to the primary time source. For <tt>ntptrace</tt> to work properly, each of these servers must implement the NTP&nbsp;Control and Monitoring Protocol specified in RFC 1305 and enable NTP&nbsp;Mode 6 packets.</p>
22*2b15cb3dSCy Schubert<p>If given no arguments, <tt>ntptrace</tt> starts with <tt>localhost</tt>. Here is an example of the output from <tt>ntptrace</tt>:</p>
239c2daa00SOllivier Robert<pre>
249c2daa00SOllivier Robert% ntptrace
259c2daa00SOllivier Robertlocalhost: stratum 4, offset 0.0019529, synch distance 0.144135
269c2daa00SOllivier Robertserver2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784
279c2daa00SOllivier Robertusndh.edu: stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
289c2daa00SOllivier Robert</pre>
299c2daa00SOllivier Robert<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 <tt>ntptrace</tt>; this is why it is not always zero for &quot;<tt>localhost</tt>&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>
309c2daa00SOllivier Robert<h4>Options</h4>
319c2daa00SOllivier Robert<dl>
32*2b15cb3dSCy Schubert  <dt><tt>-m <i>max_hosts</i></tt></dt>
33*2b15cb3dSCy Schubert  <dd>Sets the upper limit of the number of hosts to check (default: unlimited).</dd>
34*2b15cb3dSCy Schubert  <dt><tt>-n</tt></dt>
35*2b15cb3dSCy Schubert  <dd>Turns off the printing of host names; instead, host IP addresses are given. This may be useful if a nameserver is down.</dd>
369c2daa00SOllivier Robert</dl>
379c2daa00SOllivier Robert<h4>Bugs</h4>
389c2daa00SOllivier Robert<p>This program makes no attempt to improve accuracy by doing multiple samples.</p>
399c2daa00SOllivier Robert<hr>
409c2daa00SOllivier Robert<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
419c2daa00SOllivier Robert</body>
429c2daa00SOllivier Robert</html>
43