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