calc_tickadj.html revision 309007
1125635Skientzle<html lang="en">
2133244Skientzle<head>
3151275Skientzle<title>calc_tickadj User's Manual</title>
4152285Sru<meta http-equiv="Content-Type" content="text/html">
5152285Sru<meta name="description" content="calc_tickadj User's Manual">
6133244Skientzle<meta name="generator" content="makeinfo 4.7">
7156417Skientzle<link title="Top" rel="top" href="#Top">
8156417Skientzle<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9156417Skientzle<meta http-equiv="Content-Style-Type" content="text/css">
10156417Skientzle<style type="text/css"><!--
11156417Skientzle  pre.display { font-family:inherit }
12158203Skientzle  pre.format  { font-family:inherit }
13156417Skientzle  pre.smalldisplay { font-family:inherit; font-size:smaller }
14156417Skientzle  pre.smallformat  { font-family:inherit; font-size:smaller }
15151275Skientzle  pre.smallexample { font-size:smaller }
16151275Skientzle  pre.smalllisp    { font-size:smaller }
17156417Skientzle  span.sc { font-variant:small-caps }
18151332Skientzle  span.roman { font-family: serif; font-weight: normal; } 
19156417Skientzle--></style>
20156417Skientzle</head>
21156417Skientzle<body>
22151275Skientzle<h1 class="settitle">calc_tickadj User's Manual</h1>
23133244Skientzle<div class="node">
24133244Skientzle<p><hr>
25133244Skientzle<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#calc_005ftickadj-Description">calc_tickadj Description</a>,
26133244SkientzlePrevious:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27151275SkientzleUp:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
28133244Skientzle<br>
29133244Skientzle</div>
30133244Skientzle
31133244Skientzle<h2 class="unnumbered">calc_tickadj User's Manual</h2>
32133244Skientzle
33133244Skientzle<p>This document describes the use of the NTP Project's <code>calc_tickadj</code> program. 
34151275SkientzleThis document applies to version 4.2.8p9 of <code>calc_tickadj</code>.
35133244Skientzle
36133244Skientzle  <div class="shortcontents">
37156417Skientzle<h2>Short Contents</h2>
38156417Skientzle<ul>
39156417Skientzle<a href="#Top">calc_tickadj User's Manual</a>
40156417Skientzle</ul>
41156417Skientzle</div>
42156417Skientzle
43156417Skientzle<ul class="menu">
44156417Skientzle<li><a accesskey="1" href="#calc_005ftickadj-Description">calc_tickadj Description</a>:        Description
45156417Skientzle<li><a accesskey="2" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>:         Invoking calc_tickadj
46156417Skientzle</ul>
47156417Skientzle
48156417Skientzle<div class="node">
49156417Skientzle<p><hr>
50156417Skientzle<a name="calc_005ftickadj-Invocation"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#calc_005ftickadj-Description">calc_tickadj Description</a>,
51156417SkientzleUp:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
52133244Skientzle<br>
53133244Skientzle</div>
54133244Skientzle
55133244Skientzle<h3 class="section">Invoking calc_tickadj</h3>
56133244Skientzle
57133244Skientzle<p><a name="index-calc_005ftickadj-1"></a><a name="index-Calculates-_0022optimal_0022-value-for-tick-given-ntp-drift-file_002e-2"></a>
58133244SkientzleThe <code>calc_tickadj</code> script uses provided ntp drift file to generate optimal
59133244Skientzletick value. Generally, ntpd can do better job if the drift value is the
60133244Skientzlesmallest possible number.
61133244Skientzle
62133244Skientzle  <p>The example output of
63133244Skientzle<pre class="example">     $ ./calc_tickadj
64133244Skientzle     81.699 (drift)
65133244Skientzle     9999 usec; 9999779 nsec
66139565Skientzle     $ cat /etc/ntp/drift
67133244Skientzle     -23.159
68140790Skientzle</pre>
69133244Skientzle  <p>means the following. If tick on that box is 10,000, by making the value 9999
70133244Skientzlewe'll shift the box from its current drift of -23.159 to a drift of 81.699, and
71133244Skientzlein doing so we'll speed the clock up a little every second instead of slowing
72133244Skientzlethe clock down a little.
73133244Skientzle
74133244Skientzle  <p>If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
75133244Skientzlevalue will be somewhere around 0.0.
76133244Skientzle
77133244Skientzle  <p><code>calc_tickadj</code> tries to determine the the tick value by using
78133244Skientzle<code>tickadj</code> program from ntp package. If this doesn't work you can specify
79133244Skientzlecurrent tick manually on command line.
80133244Skientzle
81133244Skientzle  <p>This section was generated by <strong>AutoGen</strong>,
82133244Skientzleusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>calc_tickadj</code> program.
83133244Skientzle
84133244Skientzle<ul class="menu">
85151275Skientzle<li><a accesskey="1" href="#calc_005ftickadj-usage">calc_tickadj usage</a>:                   calc_tickadj help/usage (<span class="option">--help</span>)
86133244Skientzle<li><a accesskey="2" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>:              drift-file option (-d)
87133244Skientzle<li><a accesskey="3" href="#calc_005ftickadj-tick">calc_tickadj tick</a>:                    tick option (-t)
88133244Skientzle<li><a accesskey="4" href="#calc_005ftickadj-exit-status">calc_tickadj exit status</a>:             exit status
89133244Skientzle</ul>
90133244Skientzle
91133244Skientzle<div class="node">
92133244Skientzle<p><hr>
93133244Skientzle<a name="calc_005ftickadj-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>,
94151275SkientzleUp:&nbsp;<a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>
95133244Skientzle<br>
96133244Skientzle</div>
97133244Skientzle
98133244Skientzle<h4 class="subsection">calc_tickadj help/usage (<span class="option">--help</span>)</h4>
99133244Skientzle
100133244Skientzle<p><a name="index-calc_005ftickadj-help-3"></a>
101133244SkientzleThis is the automatically generated usage text for calc_tickadj.
102133244Skientzle
103133244Skientzle  <p>The text printed is the same whether selected with the <code>help</code> option
104133244Skientzle(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>).  <code>more-help</code> will print
105133244Skientzlethe usage text by passing it through a pager program. 
106133244Skientzle<code>more-help</code> is disabled on platforms without a working
107133244Skientzle<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
108133244Skientzleused to select the program, defaulting to <span class="file">more</span>.  Both will exit
109133244Skientzlewith a status code of 0.
110133244Skientzle
111133244Skientzle<pre class="example">calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467
112133244SkientzleUSAGE: calc_tickadj [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
113133244Skientzle
114133244Skientzle    -d, --drift-file=str         Ntp drift file to use
115133244Skientzle    -t, --tick=num               Tick value of this host
116133244Skientzle    -?, --help                   Display usage information and exit
117133244Skientzle        --more-help              Pass the extended usage text through a pager
118133244Skientzle
119133244SkientzleOptions are specified by doubled hyphens and their name or by a single
120133244Skientzlehyphen and the flag character.
121133244Skientzle</pre>
122133244Skientzle  <div class="node">
123133244Skientzle<p><hr>
124133244Skientzle<a name="calc_005ftickadj-drift_002dfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#calc_005ftickadj-tick">calc_tickadj tick</a>,
125133244SkientzlePrevious:&nbsp;<a rel="previous" accesskey="p" href="#calc_005ftickadj-usage">calc_tickadj usage</a>,
126133244SkientzleUp:&nbsp;<a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>
127133244Skientzle<br>
128133244Skientzle</div>
129133244Skientzle
130133244Skientzle<h4 class="subsection">drift-file option (-d)</h4>
131133244Skientzle
132133244Skientzle<p><a name="index-calc_005ftickadj_002ddrift_002dfile-4"></a>
133133244SkientzleThis is the &ldquo;ntp drift file to use&rdquo; option. 
134133244SkientzleThis option takes a string argument. 
135133244SkientzleUse the specified drift file for calculations
136133244Skientzle<div class="node">
137133244Skientzle<p><hr>
138133244Skientzle<a name="calc_005ftickadj-tick"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#calc_005ftickadj-exit-status">calc_tickadj exit status</a>,
139133244SkientzlePrevious:&nbsp;<a rel="previous" accesskey="p" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>,
140133244SkientzleUp:&nbsp;<a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>
141133244Skientzle<br>
142133244Skientzle</div>
143133244Skientzle
144133244Skientzle<h4 class="subsection">tick option (-t)</h4>
145133244Skientzle
146133244Skientzle<p><a name="index-calc_005ftickadj_002dtick-5"></a>
147133244SkientzleThis is the &ldquo;tick value of this host&rdquo; option. 
148133244SkientzleThis option takes a number argument. 
149133244SkientzleThe current tick which to adjustment will be calculated
150133244Skientzle<div class="node">
151133244Skientzle<p><hr>
152133244Skientzle<a name="calc_005ftickadj-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#calc_005ftickadj-tick">calc_tickadj tick</a>,
153133244SkientzleUp:&nbsp;<a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>
154133244Skientzle<br>
155133244Skientzle</div>
156133244Skientzle
157133244Skientzle<h4 class="subsection">calc_tickadj exit status</h4>
158133244Skientzle
159133244Skientzle<p>One of the following exit values will be returned:
160133244Skientzle     <dl>
161133244Skientzle<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution. 
162133244Skientzle<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid. 
163133244Skientzle</dl>
164133244Skientzle
165133244Skientzle</body></html>
166133244Skientzle
167133244Skientzle