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>ntpdsim - Network Time Protocol (NTP) simulator</title> 79c2daa00SOllivier Robert<link href="scripts/style.css" type="text/css" rel="stylesheet"> 89c2daa00SOllivier Robert</head> 99c2daa00SOllivier Robert<body> 109c2daa00SOllivier Robert<h3><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</h3> 11*2b15cb3dSCy Schubert<img src="pic/oz2.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>The Wizard of Oz</i>, L. Frank Baum</a> 12*2b15cb3dSCy Schubert<p>All in a row.</p> 13*2b15cb3dSCy Schubert<p>Last update: 14*2b15cb3dSCy Schubert <!-- #BeginDate format:En2m -->11-Sep-2010 05:55<!-- #EndDate --> 15*2b15cb3dSCy Schubert UTC</p> 169c2daa00SOllivier Robert<br clear="left"> 179c2daa00SOllivier Robert<h4>Related Links</h4> 18*2b15cb3dSCy Schubert<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script> 199c2daa00SOllivier Robert<h4>Table of Contents</h4> 209c2daa00SOllivier Robert<ul> 21*2b15cb3dSCy Schubert <li class="inline"><a href="#synop">Synopsis</a></li> 22*2b15cb3dSCy Schubert <li class="inline"><a href="#descr">Description</a></li> 23*2b15cb3dSCy Schubert <li class="inline"><a href="#cmd">Command Line Oprionts</a></li> 24*2b15cb3dSCy Schubert <li class="inline"><a href="#files">Files</a></li> 259c2daa00SOllivier Robert</ul> 269c2daa00SOllivier Robert<hr> 279c2daa00SOllivier Robert<h4 id="synop">Synopsis</h4> 289c2daa00SOllivier Robert<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> 299c2daa00SOllivier Robert<h4 id="descr">Description</h4> 30ea906c41SOllivier Robert<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> 319c2daa00SOllivier Robert<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> 329c2daa00SOllivier Robert<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> 339c2daa00SOllivier Robert<pre>rm ./ntpstats/* 349c2daa00SOllivier Robertntpdsim -O 0.1 -C .001 -T 400 -W 1 -c ./ntp.conf, 359c2daa00SOllivier Robert</pre> 369c2daa00SOllivier Robert<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> 379c2daa00SOllivier Robert<pre>disable kernel 389c2daa00SOllivier Robertserver pogo 399c2daa00SOllivier Robertdriftfile ./ntp.drift 409c2daa00SOllivier Robertstatsdir ./ntpstats/ 419c2daa00SOllivier Robertfilegen loopstats type day enable 429c2daa00SOllivier Robertfilegen peerstats type day enable 439c2daa00SOllivier Robert</pre> 449c2daa00SOllivier Robert<h4 id="cmd">Command Line Options</h4> 459c2daa00SOllivier Robert<dl> 46*2b15cb3dSCy Schubert <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></dt> 47*2b15cb3dSCy Schubert <dt><tt>-B <i>bdly</i></tt></dt> 48*2b15cb3dSCy Schubert <dd>Specify beep delay (3600) s.</dd> 49*2b15cb3dSCy Schubert <dt><tt>-C <i>snse</i></tt></dt> 50*2b15cb3dSCy Schubert <dd>Specify network jitter parameter (0) s.</dd> 51*2b15cb3dSCy Schubert <dt><tt>-O <i>clk_time</i></tt></dt> 52*2b15cb3dSCy Schubert <dd>Specify initial time offset (0) s.</dd> 53*2b15cb3dSCy Schubert <dt><tt>-S <i>sim_time</i></tt></dt> 54*2b15cb3dSCy Schubert <dd>Specify simulation duration (86400) s.</dd> 55*2b15cb3dSCy Schubert <dt><tt>-T <i>ferr</i></tt></dt> 56*2b15cb3dSCy Schubert <dd>Specify initial frequency offset (0) PPM.</dd> 57*2b15cb3dSCy Schubert <dt><tt>-W <i>fnse</i></tt></dt> 58*2b15cb3dSCy Schubert <dd>Specify oscillator wander parameter (0) PPM/s.</dd> 59*2b15cb3dSCy Schubert <dt><tt>-Y <i>ndly</i></tt></dt> 60*2b15cb3dSCy Schubert <dd>Specify network propagation delay (.001) s.</dd> 61*2b15cb3dSCy Schubert <dt><tt>-Z <i>pdly</i></tt></dt> 62*2b15cb3dSCy Schubert <dd>Specify server processing delay (.001) s.</dd> 639c2daa00SOllivier Robert</dl> 649c2daa00SOllivier Robert<h4 id="files">Files</h4> 659c2daa00SOllivier Robert<tt>/etc/ntp.conf</tt> - the default name of the configuration file<br> 669c2daa00SOllivier Robert<tt>/etc/ntp.drift</tt> - the default name of the drift file<br> 679c2daa00SOllivier Robert<tt>/etc/ntp.keys</tt> - the default name of the key file 689c2daa00SOllivier Robert<hr> 699c2daa00SOllivier Robert<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script> 709c2daa00SOllivier Robert</body> 719c2daa00SOllivier Robert</html> 72