1<html lang="en"> 2<head> 3<title>calc_tickadj User's Manual</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="calc_tickadj User's Manual"> 6<meta name="generator" content="makeinfo 4.8"> 7<link title="Top" rel="top" href="#Top"> 8<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 9<meta http-equiv="Content-Style-Type" content="text/css"> 10<style type="text/css"><!-- 11 pre.display { font-family:inherit } 12 pre.format { font-family:inherit } 13 pre.smalldisplay { font-family:inherit; font-size:smaller } 14 pre.smallformat { font-family:inherit; font-size:smaller } 15 pre.smallexample { font-size:smaller } 16 pre.smalllisp { font-size:smaller } 17 span.sc { font-variant:small-caps } 18 span.roman { font-family:serif; font-weight:normal; } 19 span.sansserif { font-family:sans-serif; font-weight:normal; } 20--></style> 21</head> 22<body> 23<h1 class="settitle">calc_tickadj User's Manual</h1> 24<div class="node"> 25<p><hr> 26<a name="Top"></a> 27Next: <a rel="next" accesskey="n" href="#calc_005ftickadj-Description">calc_tickadj Description</a>, 28Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>, 29Up: <a rel="up" accesskey="u" href="#dir">(dir)</a> 30 31</div> 32 33<h2 class="unnumbered">calc_tickadj User's Manual</h2> 34 35<p>This document describes the use of the NTP Project's <code>calc_tickadj</code> program. 36This document applies to version 4.2.8p5 of <code>calc_tickadj</code>. 37 38 <div class="shortcontents"> 39<h2>Short Contents</h2> 40<ul> 41<a href="#Top">calc_tickadj User's Manual</a> 42</ul> 43</div> 44 45<ul class="menu"> 46<li><a accesskey="1" href="#calc_005ftickadj-Description">calc_tickadj Description</a>: Description 47<li><a accesskey="2" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>: Invoking calc_tickadj 48</ul> 49 50<div class="node"> 51<p><hr> 52<a name="calc_tickadj-Invocation"></a> 53<a name="calc_005ftickadj-Invocation"></a> 54Previous: <a rel="previous" accesskey="p" href="#calc_005ftickadj-Description">calc_tickadj Description</a>, 55Up: <a rel="up" accesskey="u" href="#Top">Top</a> 56 57</div> 58 59<h3 class="section">Invoking calc_tickadj</h3> 60 61<p><a name="index-calc_005ftickadj-1"></a><a name="index-Calculates-_0022optimal_0022-value-for-tick-given-ntp-drift-file_002e-2"></a> 62The <code>calc_tickadj</code> script uses provided ntp drift file to generate optimal 63tick value. Generally, ntpd can do better job if the drift value is the 64smallest possible number. 65 66 <p>The example output of 67<pre class="example"> $ ./calc_tickadj 68 81.699 (drift) 69 9999 usec; 9999779 nsec 70 $ cat /etc/ntp/drift 71 -23.159 72</pre> 73 <p>means the following. If tick on that box is 10,000, by making the value 9999 74we'll shift the box from its current drift of -23.159 to a drift of 81.699, and 75in doing so we'll speed the clock up a little every second instead of slowing 76the clock down a little. 77 78 <p>If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift 79value will be somewhere around 0.0. 80 81 <p><code>calc_tickadj</code> tries to determine the the tick value by using 82<code>tickadj</code> program from ntp package. If this doesn't work you can specify 83current tick manually on command line. 84 85 <p>This section was generated by <strong>AutoGen</strong>, 86using the <code>agtexi-cmd</code> template and the option descriptions for the <code>calc_tickadj</code> program. 87 88<ul class="menu"> 89<li><a accesskey="1" href="#calc_005ftickadj-usage">calc_tickadj usage</a>: calc_tickadj help/usage (<samp><span class="option">--help</span></samp>) 90<li><a accesskey="2" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>: drift-file option (-d) 91<li><a accesskey="3" href="#calc_005ftickadj-tick">calc_tickadj tick</a>: tick option (-t) 92<li><a accesskey="4" href="#calc_005ftickadj-exit-status">calc_tickadj exit status</a>: exit status 93</ul> 94 95<div class="node"> 96<p><hr> 97<a name="calc_tickadj-usage"></a> 98<a name="calc_005ftickadj-usage"></a> 99Next: <a rel="next" accesskey="n" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>, 100Up: <a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a> 101 102</div> 103 104<h4 class="subsection">calc_tickadj help/usage (<samp><span class="option">--help</span></samp>)</h4> 105 106<p><a name="index-calc_005ftickadj-help-3"></a> 107This is the automatically generated usage text for calc_tickadj. 108 109 <p>The text printed is the same whether selected with the <code>help</code> option 110(<samp><span class="option">--help</span></samp>) or the <code>more-help</code> option (<samp><span class="option">--more-help</span></samp>). <code>more-help</code> will print 111the usage text by passing it through a pager program. 112<code>more-help</code> is disabled on platforms without a working 113<code>fork(2)</code> function. The <code>PAGER</code> environment variable is 114used to select the program, defaulting to <samp><span class="file">more</span></samp>. Both will exit 115with a status code of 0. 116 117<pre class="example">calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467 118USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 119 120 -d, --drift-file=str Ntp drift file to use 121 -t, --tick=num Tick value of this host 122 -?, --help Display usage information and exit 123 --more-help Pass the extended usage text through a pager 124 125Options are specified by doubled hyphens and their name or by a single 126hyphen and the flag character. 127</pre> 128 <div class="node"> 129<p><hr> 130<a name="calc_tickadj-drift-file"></a> 131<a name="calc_005ftickadj-drift_002dfile"></a> 132Next: <a rel="next" accesskey="n" href="#calc_005ftickadj-tick">calc_tickadj tick</a>, 133Previous: <a rel="previous" accesskey="p" href="#calc_005ftickadj-usage">calc_tickadj usage</a>, 134Up: <a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a> 135 136</div> 137 138<h4 class="subsection">drift-file option (-d)</h4> 139 140<p><a name="index-calc_005ftickadj_002ddrift_002dfile-4"></a> 141This is the “ntp drift file to use” option. 142This option takes a string argument. 143Use the specified drift file for calculations 144<div class="node"> 145<p><hr> 146<a name="calc_tickadj-tick"></a> 147<a name="calc_005ftickadj-tick"></a> 148Next: <a rel="next" accesskey="n" href="#calc_005ftickadj-exit-status">calc_tickadj exit status</a>, 149Previous: <a rel="previous" accesskey="p" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>, 150Up: <a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a> 151 152</div> 153 154<h4 class="subsection">tick option (-t)</h4> 155 156<p><a name="index-calc_005ftickadj_002dtick-5"></a> 157This is the “tick value of this host” option. 158This option takes a number argument. 159The current tick which to adjustment will be calculated 160<div class="node"> 161<p><hr> 162<a name="calc_tickadj-exit-status"></a> 163<a name="calc_005ftickadj-exit-status"></a> 164Previous: <a rel="previous" accesskey="p" href="#calc_005ftickadj-tick">calc_tickadj tick</a>, 165Up: <a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a> 166 167</div> 168 169<h4 class="subsection">calc_tickadj exit status</h4> 170 171<p>One of the following exit values will be returned: 172 <dl> 173<dt>`<samp><span class="samp">0 (EXIT_SUCCESS)</span></samp>'<dd>Successful program execution. 174<br><dt>`<samp><span class="samp">1 (EXIT_FAILURE)</span></samp>'<dd>The operation failed or the command syntax was not valid. 175</dl> 176 177</body></html> 178 179