1344884Scy<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2344884Scy<html>
3344884Scy<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
4275970Scy<head>
5344884Scy<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6344884Scy<title>calc_tickadj User&rsquo;s Manual</title>
7344884Scy
8344884Scy<meta name="description" content="calc_tickadj User&rsquo;s Manual">
9344884Scy<meta name="keywords" content="calc_tickadj User&rsquo;s Manual">
10344884Scy<meta name="resource-type" content="document">
11344884Scy<meta name="distribution" content="global">
12344884Scy<meta name="Generator" content="makeinfo">
13344884Scy<link href="#Top" rel="start" title="Top">
14344884Scy<link href="dir.html#Top" rel="up" title="(dir)">
15344884Scy<style type="text/css">
16344884Scy<!--
17344884Scya.summary-letter {text-decoration: none}
18344884Scyblockquote.indentedblock {margin-right: 0em}
19344884Scyblockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
20344884Scyblockquote.smallquotation {font-size: smaller}
21344884Scydiv.display {margin-left: 3.2em}
22344884Scydiv.example {margin-left: 3.2em}
23344884Scydiv.lisp {margin-left: 3.2em}
24344884Scydiv.smalldisplay {margin-left: 3.2em}
25344884Scydiv.smallexample {margin-left: 3.2em}
26344884Scydiv.smalllisp {margin-left: 3.2em}
27344884Scykbd {font-style: oblique}
28344884Scypre.display {font-family: inherit}
29344884Scypre.format {font-family: inherit}
30344884Scypre.menu-comment {font-family: serif}
31344884Scypre.menu-preformatted {font-family: serif}
32344884Scypre.smalldisplay {font-family: inherit; font-size: smaller}
33344884Scypre.smallexample {font-size: smaller}
34344884Scypre.smallformat {font-family: inherit; font-size: smaller}
35344884Scypre.smalllisp {font-size: smaller}
36344884Scyspan.nolinebreak {white-space: nowrap}
37344884Scyspan.roman {font-family: initial; font-weight: normal}
38344884Scyspan.sansserif {font-family: sans-serif; font-weight: normal}
39344884Scyul.no-bullet {list-style: none}
40344884Scy-->
41344884Scy</style>
42344884Scy
43344884Scy
44275970Scy</head>
45275970Scy
46344884Scy<body lang="en">
47344884Scy<h1 class="settitle" align="center">calc_tickadj User&rsquo;s Manual</h1>
48275970Scy
49275970Scy
50344884Scy
51344884Scy
52344884Scy<a name="Top"></a>
53344884Scy<div class="header">
54344884Scy<p>
55344884ScyPrevious: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
56275970Scy</div>
57344884Scy<a name="calc_005ftickadj-User_0027s-Manual"></a>
58344884Scy<h1 class="top">calc_tickadj User&rsquo;s Manual</h1>
59275970Scy
60344884Scy<p>This document describes the use of the NTP Project&rsquo;s <code>calc_tickadj</code> program.
61362716ScyThis document applies to version 4.2.8p15 of <code>calc_tickadj</code>.
62344884Scy</p>
63344884Scy<a name="SEC_Overview"></a>
64344884Scy<h2 class="shortcontents-heading">Short Table of Contents</h2>
65344884Scy
66344884Scy<div class="shortcontents">
67344884Scy<ul class="no-bullet">
68344884Scy<li><a name="stoc-Invoking-calc_005ftickadj" href="#toc-Invoking-calc_005ftickadj">1 Invoking calc_tickadj</a></li>
69275970Scy</ul>
70344884Scy</div>
71275970Scy
72344884Scy
73344884Scy<table class="menu" border="0" cellspacing="0">
74344884Scy<tr><td align="left" valign="top">&bull; calc_tickadj Description:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
75344884Scy</td></tr>
76344884Scy<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-Invocation" accesskey="2">calc_tickadj Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking calc_tickadj
77344884Scy</td></tr>
78344884Scy</table>
79344884Scy
80344884Scy<hr>
81344884Scy<a name="calc_005ftickadj-Invocation"></a>
82344884Scy<div class="header">
83344884Scy<p>
84344884ScyUp: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
85275970Scy</div>
86344884Scy<a name="Invoking-calc_005ftickadj"></a>
87344884Scy<h2 class="chapter">1 Invoking calc_tickadj</h2>
88344884Scy<a name="index-calc_005ftickadj"></a>
89344884Scy<a name="index-Calculates-_0022optimal_0022-value-for-tick-given-ntp-drift-file_002e"></a>
90275970Scy
91344884Scy<p>The <code>calc_tickadj</code> script uses provided ntp drift file to generate optimal
92275970Scytick value. Generally, ntpd can do better job if the drift value is the
93344884Scysmallest possible number. 
94344884Scy</p>
95344884Scy<p>The example output of 
96344884Scy</p><div class="example">
97344884Scy<pre class="example">$ ./calc_tickadj
98344884Scy81.699 (drift)
99344884Scy9999 usec; 9999779 nsec
100344884Scy$ cat /etc/ntp/drift
101344884Scy-23.159
102344884Scy</pre></div>
103275970Scy
104344884Scy<p>means the following. If tick on that box is 10,000, by making the value 9999
105344884Scywe&rsquo;ll shift the box from its current drift of -23.159 to a drift of 81.699, and
106344884Scyin doing so we&rsquo;ll speed the clock up a little every second instead of slowing
107275970Scythe clock down a little.
108344884Scy</p>
109344884Scy<p>If &rsquo;tick&rsquo; on that box is 10,000,000 then by setting it to 9999779 the drift
110275970Scyvalue will be somewhere around 0.0.
111344884Scy</p>
112344884Scy<p><code>calc_tickadj</code> tries to determine the the tick value by using
113344884Scy<code>tickadj</code> program from ntp package. If this doesn&rsquo;t work you can specify
114275970Scycurrent tick manually on command line.
115344884Scy</p>
116275970Scy
117344884Scy<p>This section was generated by <strong>AutoGen</strong>,
118275970Scyusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>calc_tickadj</code> program.
119344884Scy</p>
120344884Scy<table class="menu" border="0" cellspacing="0">
121344884Scy<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-usage" accesskey="1">calc_tickadj usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">calc_tickadj help/usage (<samp>--help</samp>)
122344884Scy</td></tr>
123344884Scy<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-drift_002dfile" accesskey="2">calc_tickadj drift-file</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">drift-file option (-d)
124344884Scy</td></tr>
125344884Scy<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-tick" accesskey="3">calc_tickadj tick</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">tick option (-t)
126344884Scy</td></tr>
127344884Scy<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-exit-status" accesskey="4">calc_tickadj exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
128344884Scy</td></tr>
129344884Scy</table>
130275970Scy
131344884Scy<hr>
132344884Scy<a name="calc_005ftickadj-usage"></a>
133344884Scy<div class="header">
134344884Scy<p>
135344884ScyNext: <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> &nbsp; </p>
136275970Scy</div>
137344884Scy<a name="calc_005ftickadj-help_002fusage-_0028_002d_002dhelp_0029"></a>
138344884Scy<h3 class="section">1.1 calc_tickadj help/usage (<samp>--help</samp>)</h3>
139344884Scy<a name="index-calc_005ftickadj-help"></a>
140275970Scy
141344884Scy<p>This is the automatically generated usage text for calc_tickadj.
142344884Scy</p>
143344884Scy<p>The text printed is the same whether selected with the <code>help</code> option
144344884Scy(<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>).  <code>more-help</code> will print
145344884Scythe usage text by passing it through a pager program.
146275970Scy<code>more-help</code> is disabled on platforms without a working
147275970Scy<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
148344884Scyused to select the program, defaulting to <samp>more</samp>.  Both will exit
149275970Scywith a status code of 0.
150344884Scy</p>
151344884Scy<div class="example">
152358659Scy<pre class="example">calc_tickadj - Calculates &quot;optimal&quot; value for tick given ntp drift file. - Ver. 4.2.8p13
153344884ScyUSAGE: calc_tickadj [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... 
154275970Scy
155275970Scy    -d, --drift-file=str         Ntp drift file to use
156275970Scy    -t, --tick=num               Tick value of this host
157275970Scy    -?, --help                   Display usage information and exit
158275970Scy        --more-help              Pass the extended usage text through a pager
159275970Scy
160275970ScyOptions are specified by doubled hyphens and their name or by a single
161275970Scyhyphen and the flag character.
162344884Scy</pre></div>
163344884Scy
164344884Scy<table class="menu" border="0" cellspacing="0">
165344884Scy<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-drift_002dfile" accesskey="1">calc_tickadj drift-file</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
166344884Scy</td></tr>
167344884Scy<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-tick" accesskey="2">calc_tickadj tick</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
168344884Scy</td></tr>
169344884Scy<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-exit-status" accesskey="3">calc_tickadj exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
170344884Scy</td></tr>
171344884Scy</table>
172344884Scy
173344884Scy<hr>
174344884Scy<a name="calc_005ftickadj-drift_002dfile"></a>
175344884Scy<div class="header">
176344884Scy<p>
177344884ScyNext: <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> &nbsp; </p>
178275970Scy</div>
179344884Scy<a name="drift_002dfile-option-_0028_002dd_0029"></a>
180344884Scy<h4 class="subsection">1.1.1 drift-file option (-d)</h4>
181344884Scy<a name="index-calc_005ftickadj_002ddrift_002dfile"></a>
182275970Scy
183344884Scy<p>This is the &ldquo;ntp drift file to use&rdquo; option.
184344884ScyThis option takes a string argument.
185275970ScyUse the specified drift file for calculations
186344884Scy</p><hr>
187344884Scy<a name="calc_005ftickadj-tick"></a>
188344884Scy<div class="header">
189344884Scy<p>
190344884ScyNext: <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> &nbsp; </p>
191275970Scy</div>
192344884Scy<a name="tick-option-_0028_002dt_0029"></a>
193344884Scy<h4 class="subsection">1.1.2 tick option (-t)</h4>
194344884Scy<a name="index-calc_005ftickadj_002dtick"></a>
195275970Scy
196344884Scy<p>This is the &ldquo;tick value of this host&rdquo; option.
197344884ScyThis option takes a number argument.
198275970ScyThe current tick which to adjustment will be calculated
199344884Scy</p><hr>
200344884Scy<a name="calc_005ftickadj-exit-status"></a>
201344884Scy<div class="header">
202344884Scy<p>
203344884ScyPrevious: <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> &nbsp; </p>
204275970Scy</div>
205344884Scy<a name="calc_005ftickadj-exit-status-1"></a>
206344884Scy<h4 class="subsection">1.1.3 calc_tickadj exit status</h4>
207275970Scy
208275970Scy<p>One of the following exit values will be returned:
209344884Scy</p><dl compact="compact">
210344884Scy<dt>&lsquo;<samp>0 (EXIT_SUCCESS)</samp>&rsquo;</dt>
211344884Scy<dd><p>Successful program execution.
212344884Scy</p></dd>
213344884Scy<dt>&lsquo;<samp>1 (EXIT_FAILURE)</samp>&rsquo;</dt>
214344884Scy<dd><p>The operation failed or the command syntax was not valid.
215344884Scy</p></dd>
216275970Scy</dl>
217344884Scy<hr>
218275970Scy
219275970Scy
220344884Scy
221344884Scy</body>
222344884Scy</html>
223