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>calc_tickadj User’s Manual</title> 7 8<meta name="description" content="calc_tickadj User’s Manual"> 9<meta name="keywords" content="calc_tickadj 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">calc_tickadj User’s Manual</h1> 48 49 50 51 52<a name="Top"></a> 53<div class="header"> 54<p> 55Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> </p> 56</div> 57<a name="calc_005ftickadj-User_0027s-Manual"></a> 58<h1 class="top">calc_tickadj User’s Manual</h1> 59 60<p>This document describes the use of the NTP Project’s <code>calc_tickadj</code> program. 61This document applies to version 4.2.8p15 of <code>calc_tickadj</code>. 62</p> 63<a name="SEC_Overview"></a> 64<h2 class="shortcontents-heading">Short Table of Contents</h2> 65 66<div class="shortcontents"> 67<ul class="no-bullet"> 68<li><a name="stoc-Invoking-calc_005ftickadj" href="#toc-Invoking-calc_005ftickadj">1 Invoking calc_tickadj</a></li> 69</ul> 70</div> 71 72 73<table class="menu" border="0" cellspacing="0"> 74<tr><td align="left" valign="top">• calc_tickadj Description:</td><td> </td><td align="left" valign="top">Description 75</td></tr> 76<tr><td align="left" valign="top">• <a href="#calc_005ftickadj-Invocation" accesskey="2">calc_tickadj Invocation</a>:</td><td> </td><td align="left" valign="top">Invoking calc_tickadj 77</td></tr> 78</table> 79 80<hr> 81<a name="calc_005ftickadj-Invocation"></a> 82<div class="header"> 83<p> 84Up: <a href="#Top" accesskey="u" rel="up">Top</a> </p> 85</div> 86<a name="Invoking-calc_005ftickadj"></a> 87<h2 class="chapter">1 Invoking calc_tickadj</h2> 88<a name="index-calc_005ftickadj"></a> 89<a name="index-Calculates-_0022optimal_0022-value-for-tick-given-ntp-drift-file_002e"></a> 90 91<p>The <code>calc_tickadj</code> script uses provided ntp drift file to generate optimal 92tick value. Generally, ntpd can do better job if the drift value is the 93smallest possible number. 94</p> 95<p>The example output of 96</p><div class="example"> 97<pre class="example">$ ./calc_tickadj 9881.699 (drift) 999999 usec; 9999779 nsec 100$ cat /etc/ntp/drift 101-23.159 102</pre></div> 103 104<p>means the following. If tick on that box is 10,000, by making the value 9999 105we’ll shift the box from its current drift of -23.159 to a drift of 81.699, and 106in doing so we’ll speed the clock up a little every second instead of slowing 107the clock down a little. 108</p> 109<p>If ’tick’ on that box is 10,000,000 then by setting it to 9999779 the drift 110value will be somewhere around 0.0. 111</p> 112<p><code>calc_tickadj</code> tries to determine the the tick value by using 113<code>tickadj</code> program from ntp package. If this doesn’t work you can specify 114current tick manually on command line. 115</p> 116 117<p>This section was generated by <strong>AutoGen</strong>, 118using the <code>agtexi-cmd</code> template and the option descriptions for the <code>calc_tickadj</code> program. 119</p> 120<table class="menu" border="0" cellspacing="0"> 121<tr><td align="left" valign="top">• <a href="#calc_005ftickadj-usage" accesskey="1">calc_tickadj usage</a>:</td><td> </td><td align="left" valign="top">calc_tickadj help/usage (<samp>--help</samp>) 122</td></tr> 123<tr><td align="left" valign="top">• <a href="#calc_005ftickadj-drift_002dfile" accesskey="2">calc_tickadj drift-file</a>:</td><td> </td><td align="left" valign="top">drift-file option (-d) 124</td></tr> 125<tr><td align="left" valign="top">• <a href="#calc_005ftickadj-tick" accesskey="3">calc_tickadj tick</a>:</td><td> </td><td align="left" valign="top">tick option (-t) 126</td></tr> 127<tr><td align="left" valign="top">• <a href="#calc_005ftickadj-exit-status" accesskey="4">calc_tickadj exit status</a>:</td><td> </td><td align="left" valign="top">exit status 128</td></tr> 129</table> 130 131<hr> 132<a name="calc_005ftickadj-usage"></a> 133<div class="header"> 134<p> 135Next: <a href="#calc_005ftickadj-drift_002dfile" accesskey="n" rel="next">calc_tickadj drift-file</a>, Up: <a href="#calc_005ftickadj-Invocation" accesskey="u" rel="up">calc_tickadj Invocation</a> </p> 136</div> 137<a name="calc_005ftickadj-help_002fusage-_0028_002d_002dhelp_0029"></a> 138<h3 class="section">1.1 calc_tickadj help/usage (<samp>--help</samp>)</h3> 139<a name="index-calc_005ftickadj-help"></a> 140 141<p>This is the automatically generated usage text for calc_tickadj. 142</p> 143<p>The text printed is the same whether selected with the <code>help</code> option 144(<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>). <code>more-help</code> will print 145the usage text by passing it through a pager program. 146<code>more-help</code> is disabled on platforms without a working 147<code>fork(2)</code> function. The <code>PAGER</code> environment variable is 148used to select the program, defaulting to <samp>more</samp>. Both will exit 149with a status code of 0. 150</p> 151<div class="example"> 152<pre class="example">calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.8p13 153USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 154 155 -d, --drift-file=str Ntp drift file to use 156 -t, --tick=num Tick value of this host 157 -?, --help Display usage information and exit 158 --more-help Pass the extended usage text through a pager 159 160Options are specified by doubled hyphens and their name or by a single 161hyphen and the flag character. 162</pre></div> 163 164<table class="menu" border="0" cellspacing="0"> 165<tr><td align="left" valign="top">• <a href="#calc_005ftickadj-drift_002dfile" accesskey="1">calc_tickadj drift-file</a>:</td><td> </td><td align="left" valign="top"> 166</td></tr> 167<tr><td align="left" valign="top">• <a href="#calc_005ftickadj-tick" accesskey="2">calc_tickadj tick</a>:</td><td> </td><td align="left" valign="top"> 168</td></tr> 169<tr><td align="left" valign="top">• <a href="#calc_005ftickadj-exit-status" accesskey="3">calc_tickadj exit status</a>:</td><td> </td><td align="left" valign="top"> 170</td></tr> 171</table> 172 173<hr> 174<a name="calc_005ftickadj-drift_002dfile"></a> 175<div class="header"> 176<p> 177Next: <a href="#calc_005ftickadj-tick" accesskey="n" rel="next">calc_tickadj tick</a>, Previous: <a href="#calc_005ftickadj-usage" accesskey="p" rel="prev">calc_tickadj usage</a>, Up: <a href="#calc_005ftickadj-usage" accesskey="u" rel="up">calc_tickadj usage</a> </p> 178</div> 179<a name="drift_002dfile-option-_0028_002dd_0029"></a> 180<h4 class="subsection">1.1.1 drift-file option (-d)</h4> 181<a name="index-calc_005ftickadj_002ddrift_002dfile"></a> 182 183<p>This is the “ntp drift file to use” option. 184This option takes a string argument. 185Use the specified drift file for calculations 186</p><hr> 187<a name="calc_005ftickadj-tick"></a> 188<div class="header"> 189<p> 190Next: <a href="#calc_005ftickadj-exit-status" accesskey="n" rel="next">calc_tickadj exit status</a>, Previous: <a href="#calc_005ftickadj-drift_002dfile" accesskey="p" rel="prev">calc_tickadj drift-file</a>, Up: <a href="#calc_005ftickadj-usage" accesskey="u" rel="up">calc_tickadj usage</a> </p> 191</div> 192<a name="tick-option-_0028_002dt_0029"></a> 193<h4 class="subsection">1.1.2 tick option (-t)</h4> 194<a name="index-calc_005ftickadj_002dtick"></a> 195 196<p>This is the “tick value of this host” option. 197This option takes a number argument. 198The current tick which to adjustment will be calculated 199</p><hr> 200<a name="calc_005ftickadj-exit-status"></a> 201<div class="header"> 202<p> 203Previous: <a href="#calc_005ftickadj-tick" accesskey="p" rel="prev">calc_tickadj tick</a>, Up: <a href="#calc_005ftickadj-usage" accesskey="u" rel="up">calc_tickadj usage</a> </p> 204</div> 205<a name="calc_005ftickadj-exit-status-1"></a> 206<h4 class="subsection">1.1.3 calc_tickadj exit status</h4> 207 208<p>One of the following exit values will be returned: 209</p><dl compact="compact"> 210<dt>‘<samp>0 (EXIT_SUCCESS)</samp>’</dt> 211<dd><p>Successful program execution. 212</p></dd> 213<dt>‘<samp>1 (EXIT_FAILURE)</samp>’</dt> 214<dd><p>The operation failed or the command syntax was not valid. 215</p></dd> 216</dl> 217<hr> 218 219 220 221</body> 222</html> 223