xref: /freebsd/contrib/ntp/html/ntptrace.html (revision 2008043f386721d58158e37e0d7e50df8095942d)
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
5<meta name="generator" content="HTML Tidy, see www.w3.org">
6<title>ntptrace - trace a chain of NTP servers back to the primary source</title>
7<link href="scripts/style.css" type="text/css" rel="stylesheet">
8</head>
9<body>
10<h3><tt>ntptrace</tt> - trace a chain of NTP servers back to the primary source</h3>
11<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>
12<p>The rabbit knows the way back.</p>
13<p>Last update:
14  <!-- #BeginDate format:En2m -->31-Jan-2014  06:54<!-- #EndDate -->
15    UTC</p>
16<br clear="left">
17<hr>
18<h4>Synopsis</h4>
19<tt>ntptrace [ -n ] [ -m <i>maxhosts</i> ] [ <i>server</i> ]</tt>
20<h4>Description</h4>
21<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<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>
23<pre>
24% ntptrace
25localhost: stratum 4, offset 0.0019529, synch distance 0.144135
26server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784
27usndh.edu: stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
28</pre>
29<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>
30<h4>Options</h4>
31<dl>
32  <dt><tt>-m <i>max_hosts</i></tt></dt>
33  <dd>Sets the upper limit of the number of hosts to check (default: unlimited).</dd>
34  <dt><tt>-n</tt></dt>
35  <dd>Turns off the printing of host names; instead, host IP addresses are given. This may be useful if a nameserver is down.</dd>
36</dl>
37<h4>Bugs</h4>
38<p>This program makes no attempt to improve accuracy by doing multiple samples.</p>
39<hr>
40<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
41</body>
42</html>
43