ntpdsim.html revision 182007
1132451Sroberto<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2132451Sroberto 3132451Sroberto<html> 4132451Sroberto 5182007Sroberto <head> 6182007Sroberto <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> 7182007Sroberto <meta name="generator" content="HTML Tidy, see www.w3.org"> 8182007Sroberto <title>ntpdsim - Network Time Protocol (NTP) simulator</title> 9182007Sroberto <link href="scripts/style.css" type="text/css" rel="stylesheet"> 10182007Sroberto </head> 11132451Sroberto 12182007Sroberto <body> 13182007Sroberto <h3><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</h3> 14182007Sroberto <img src="pic/alice47.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a> 15182007Sroberto <p>The mushroom knows all the command line options.</p> 16182007Sroberto <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">20:07</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="223">Friday, June 16, 2006</csobj></p> 17182007Sroberto <br clear="left"> 18182007Sroberto <h4>Related Links</h4> 19182007Sroberto <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script> 20182007Sroberto <h4>Table of Contents</h4> 21182007Sroberto <ul> 22182007Sroberto <li class="inline"><a href="#synop">Synopsis</a><br> 23182007Sroberto <li class="inline"><a href="#descr">Description</a><br> 24182007Sroberto <li class="inline"><a href="#cmd">Command Line Oprionts</a> 25182007Sroberto <li class="inline"><a href="#files">Files</a> 26182007Sroberto </ul> 27182007Sroberto <hr> 28182007Sroberto <h4 id="synop">Synopsis</h4> 29182007Sroberto <tt>ntpdsim [ -B <i>bdly</i> ] [ -C <i>snse</i> ] [ -O <i>clk_time</i> ] [ -S <i>sim_time</i> ] [ -T <i>ferr</i> ] [ -W <i>fsne</i> ] [ -Y </tt><i><tt>ndly</tt></i><tt> ] [ -X </tt><i><tt>pdly</tt></i><tt> ]</tt> 30182007Sroberto <h4 id="descr">Description</h4> 31182007Sroberto <p>The <tt>ntpdsim</tt> program is an adaptation of the <tt>ntpd</tt> operating system daemon. The program operates as a discrete time simulator using specified systematic and random driving sources. It includes all the mitigation and discipline algorithms of the actual daemon, but with the packet I/O and system clock algorithms driven by simulation. Most functions of the real <tt>ntpd</tt> remain intact, including the monitoring, statistics recording, trace and host name resolution features. Further information on the simulator is on the <a href="http://www.eecis.udel.edu/%7emills/ntpsim.html">NTP Discrete Event Simulator</a> page.</p> 32182007Sroberto <p>The simulator is most useful to study NTP behavior in response to time and/or frequency transients under specific conditions of network jitter and oscillator wander. For this purpose the daemon can be driven by pseudorandom jitter and wander sample sequences characteristic of real networks and oscillators. The jitter generator produces samples from a Poisson distribution, while the wander generator produces samples from a Guassian distribution.</p> 33182007Sroberto <p>The easiest way to use this program is to create a <tt>ntpstats</tt> directory, configuration file <tt>ntp.conf</tt> and frequency file <tt>ntp.drift</tt> and test shell <tt>test.sh</tt> in the base directory. The <tt>ntp.drift</tt> file and <tt>ntpstats</tt> directory can be empty to start. The <tt>test.sh</tt> script can contain something like</p> 34182007Sroberto <pre>rm ./ntpstats/* 35132451Srobertontpdsim -O 0.1 -C .001 -T 400 -W 1 -c ./ntp.conf, 36132451Sroberto</pre> 37182007Sroberto <p>which starts the simulator with a time offset 100 ms, network jitter 1 ms, frequency offset 400 PPM and oscillator wander 1 PPM/s. These parameters represent typical conditions with modern workstations on a Ethernet LAN. The ntp.conf file should contain something like</p> 38182007Sroberto <pre>disable kernel 39132451Srobertoserver pogo 40132451Srobertodriftfile ./ntp.drift 41132451Srobertostatsdir ./ntpstats/ 42132451Srobertofilegen loopstats type day enable 43132451Srobertofilegen peerstats type day enable 44132451Sroberto</pre> 45182007Sroberto <h4 id="cmd">Command Line Options</h4> 46182007Sroberto <dl> 47182007Sroberto <dt>Note: The NTP development team is moving to the use of a syntax-directed configuration file design. When complete these options will be replaced by a <a href="ntpdsim_new.html">new one</a>. Most of the <tt>ntpd</tt> command line options apply also to <tt>ntpdsim</tt>. In addition, the following command line options apply to <tt>ntpdsim.</tt> 48182007Sroberto <dt><tt>-B <i>bdly</i></tt> 49182007Sroberto <dd>Specify beep delay (3600) s. 50182007Sroberto <dt><tt>-C <i>snse</i></tt> 51182007Sroberto <dd>Specify network jitter parameter (0) s. 52182007Sroberto <dt><tt>-O <i>clk_time</i></tt> 53182007Sroberto <dd>Specify initial time offset (0) s. 54182007Sroberto <dt><tt>-S <i>sim_time</i></tt> 55182007Sroberto <dd>Specify simulation duration (86400) s. 56182007Sroberto <dt><tt>-T <i>ferr</i></tt> 57182007Sroberto <dd>Specify initial frequency offset (0) PPM. 58182007Sroberto <dt><tt>-W <i>fnse</i></tt> 59182007Sroberto <dd>Specify oscillator wander parameter (0) PPM/s. 60182007Sroberto <dt><tt>-Y <i>ndly</i></tt> 61182007Sroberto <dd>Specify network propagation delay (.001) s. 62182007Sroberto <dt><tt>-Z <i>pdly</i></tt> 63182007Sroberto <dd>Specify server processing delay (.001) s. 64182007Sroberto </dl> 65182007Sroberto <h4 id="files">Files</h4> 66182007Sroberto <tt>/etc/ntp.conf</tt> - the default name of the configuration file<br> 67182007Sroberto <tt>/etc/ntp.drift</tt> - the default name of the drift file<br> 68182007Sroberto <tt>/etc/ntp.keys</tt> - the default name of the key file 69182007Sroberto <hr> 70182007Sroberto <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script> 71182007Sroberto </body> 72132451Sroberto 73132451Sroberto</html>