calc_tickadj.html revision 330567
117683Spst<html lang="en"> 239294Sfenner<head> 317683Spst<title>calc_tickadj User's Manual</title> 417683Spst<meta http-equiv="Content-Type" content="text/html"> 517683Spst<meta name="description" content="calc_tickadj User's Manual"> 617683Spst<meta name="generator" content="makeinfo 4.7"> 717683Spst<link title="Top" rel="top" href="#Top"> 817683Spst<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 917683Spst<meta http-equiv="Content-Style-Type" content="text/css"> 1017683Spst<style type="text/css"><!-- 1117683Spst pre.display { font-family:inherit } 1217683Spst pre.format { font-family:inherit } 1317683Spst pre.smalldisplay { font-family:inherit; font-size:smaller } 1417683Spst pre.smallformat { font-family:inherit; font-size:smaller } 1517683Spst pre.smallexample { font-size:smaller } 1617683Spst pre.smalllisp { font-size:smaller } 1717683Spst span.sc { font-variant:small-caps } 1817683Spst span.roman { font-family: serif; font-weight: normal; } 1917683Spst--></style> 2017683Spst</head> 2117683Spst<body> 2217683Spst<h1 class="settitle">calc_tickadj User's Manual</h1> 2356891Sfenner<div class="node"> 2456891Sfenner<p><hr> 2517683Spst<a name="Top"></a>Next: <a rel="next" accesskey="n" href="#calc_005ftickadj-Description">calc_tickadj Description</a>, 2617683SpstPrevious: <a rel="previous" accesskey="p" href="#dir">(dir)</a>, 2717683SpstUp: <a rel="up" accesskey="u" href="#dir">(dir)</a> 28127667Sbms<br> 29127667Sbms</div> 3017683Spst 3117683Spst<h2 class="unnumbered">calc_tickadj User's Manual</h2> 3275110Sfenner 3375110Sfenner<p>This document describes the use of the NTP Project's <code>calc_tickadj</code> program. 3475110SfennerThis document applies to version 4.2.8p11 of <code>calc_tickadj</code>. 3575110Sfenner 36127667Sbms <div class="shortcontents"> 37127667Sbms<h2>Short Contents</h2> 38127667Sbms<ul> 39127667Sbms<a href="#Top">calc_tickadj User's Manual</a> 40127667Sbms</ul> 4117683Spst</div> 4217683Spst 4317683Spst<ul class="menu"> 4420287Swollman<li><a accesskey="1" href="#calc_005ftickadj-Description">calc_tickadj Description</a>: Description 4517683Spst<li><a accesskey="2" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>: Invoking calc_tickadj 4617683Spst</ul> 47127667Sbms 48127667Sbms<div class="node"> 49127667Sbms<p><hr> 50127667Sbms<a name="calc_005ftickadj-Invocation"></a>Previous: <a rel="previous" accesskey="p" href="#calc_005ftickadj-Description">calc_tickadj Description</a>, 51127667SbmsUp: <a rel="up" accesskey="u" href="#Top">Top</a> 52127667Sbms<br> 53127667Sbms</div> 54127667Sbms 55127667Sbms<h3 class="section">Invoking calc_tickadj</h3> 56127667Sbms 57127667Sbms<p><a name="index-calc_005ftickadj-1"></a><a name="index-Calculates-_0022optimal_0022-value-for-tick-given-ntp-drift-file_002e-2"></a> 5875110SfennerThe <code>calc_tickadj</code> script uses provided ntp drift file to generate optimal 59127667Sbmstick value. Generally, ntpd can do better job if the drift value is the 60127667Sbmssmallest possible number. 61127667Sbms 6275110Sfenner <p>The example output of 63127667Sbms<pre class="example"> $ ./calc_tickadj 64127667Sbms 81.699 (drift) 6517683Spst 9999 usec; 9999779 nsec 6656891Sfenner $ cat /etc/ntp/drift 67127667Sbms -23.159 6817683Spst</pre> 6917683Spst <p>means the following. If tick on that box is 10,000, by making the value 9999 7017683Spstwe'll shift the box from its current drift of -23.159 to a drift of 81.699, and 7117683Spstin doing so we'll speed the clock up a little every second instead of slowing 7217683Spstthe clock down a little. 7317683Spst 7417683Spst <p>If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift 7517683Spstvalue will be somewhere around 0.0. 7617683Spst 7717683Spst <p><code>calc_tickadj</code> tries to determine the the tick value by using 7817683Spst<code>tickadj</code> program from ntp package. If this doesn't work you can specify 7917683Spstcurrent tick manually on command line. 8017683Spst 8117683Spst <p>This section was generated by <strong>AutoGen</strong>, 8217683Spstusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>calc_tickadj</code> program. 8317683Spst 8417683Spst<ul class="menu"> 8517683Spst<li><a accesskey="1" href="#calc_005ftickadj-usage">calc_tickadj usage</a>: calc_tickadj help/usage (<span class="option">--help</span>) 8617683Spst<li><a accesskey="2" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>: drift-file option (-d) 8717683Spst<li><a accesskey="3" href="#calc_005ftickadj-tick">calc_tickadj tick</a>: tick option (-t) 8817683Spst<li><a accesskey="4" href="#calc_005ftickadj-exit-status">calc_tickadj exit status</a>: exit status 8917683Spst</ul> 9017683Spst 9117683Spst<div class="node"> 9217683Spst<p><hr> 9317683Spst<a name="calc_005ftickadj-usage"></a>Next: <a rel="next" accesskey="n" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>, 9417683SpstUp: <a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a> 9517683Spst<br> 9617683Spst</div> 9717683Spst 9817683Spst<h4 class="subsection">calc_tickadj help/usage (<span class="option">--help</span>)</h4> 9917683Spst 10017683Spst<p><a name="index-calc_005ftickadj-help-3"></a> 10117683SpstThis is the automatically generated usage text for calc_tickadj. 10217683Spst 10317683Spst <p>The text printed is the same whether selected with the <code>help</code> option 10417683Spst(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print 10517683Spstthe usage text by passing it through a pager program. 10617683Spst<code>more-help</code> is disabled on platforms without a working 10717683Spst<code>fork(2)</code> function. The <code>PAGER</code> environment variable is 10817683Spstused to select the program, defaulting to <span class="file">more</span>. Both will exit 10917683Spstwith a status code of 0. 11017683Spst 11117683Spst<pre class="example">calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467 11217683SpstUSAGE: calc_tickadj [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 11317683Spst 11417683Spst -d, --drift-file=str Ntp drift file to use 11517683Spst -t, --tick=num Tick value of this host 11617683Spst -?, --help Display usage information and exit 11717683Spst --more-help Pass the extended usage text through a pager 11875110Sfenner 11975110SfennerOptions are specified by doubled hyphens and their name or by a single 12056891Sfennerhyphen and the flag character. 12175110Sfenner</pre> 12256891Sfenner <div class="node"> 12356891Sfenner<p><hr> 12456891Sfenner<a name="calc_005ftickadj-drift_002dfile"></a>Next: <a rel="next" accesskey="n" href="#calc_005ftickadj-tick">calc_tickadj tick</a>, 12517683SpstPrevious: <a rel="previous" accesskey="p" href="#calc_005ftickadj-usage">calc_tickadj usage</a>, 12656891SfennerUp: <a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a> 12756891Sfenner<br> 12856891Sfenner</div> 12956891Sfenner 13056891Sfenner<h4 class="subsection">drift-file option (-d)</h4> 13156891Sfenner 13256891Sfenner<p><a name="index-calc_005ftickadj_002ddrift_002dfile-4"></a> 13356891SfennerThis is the “ntp drift file to use” option. 13456891SfennerThis option takes a string argument. 13556891SfennerUse the specified drift file for calculations 13656891Sfenner<div class="node"> 13717683Spst<p><hr> 13817683Spst<a name="calc_005ftickadj-tick"></a>Next: <a rel="next" accesskey="n" href="#calc_005ftickadj-exit-status">calc_tickadj exit status</a>, 13917683SpstPrevious: <a rel="previous" accesskey="p" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>, 14017683SpstUp: <a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a> 14117683Spst<br> 14217683Spst</div> 14317683Spst 144127667Sbms<h4 class="subsection">tick option (-t)</h4> 14517683Spst 14617683Spst<p><a name="index-calc_005ftickadj_002dtick-5"></a> 14717683SpstThis is the “tick value of this host” option. 14817683SpstThis option takes a number argument. 14917683SpstThe current tick which to adjustment will be calculated 15017683Spst<div class="node"> 151127667Sbms<p><hr> 152127667Sbms<a name="calc_005ftickadj-exit-status"></a>Previous: <a rel="previous" accesskey="p" href="#calc_005ftickadj-tick">calc_tickadj tick</a>, 153127667SbmsUp: <a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a> 154127667Sbms<br> 155127667Sbms</div> 156127667Sbms 15717683Spst<h4 class="subsection">calc_tickadj exit status</h4> 15817683Spst 15917683Spst<p>One of the following exit values will be returned: 16017683Spst <dl> 16117683Spst<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution. 16217683Spst<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid. 16317683Spst</dl> 16417683Spst 16517683Spst</body></html> 16617683Spst 16717683Spst