1275970Scy/* -*- Mode: Text -*- */
2275970ScyAutoGen Definitions perlopt;
3275970Scy
4275970Scy#include autogen-version.def
5275970Scy
6275970Scyprog-name	= calc_tickadj;
7275970Scyprog-title	= 'Calculates "optimal" value for tick given ntp drift file.';
8275970Scypackage		= ntp;
9275970Scy#include	version.def
10275970Scy
11275970Scylong-opts;
12275970Scygnu-usage;
13275970Scy
14275970Scyflag = {
15275970Scy    name        = drift-file;
16275970Scy    value       = d;
17275970Scy    arg-type    = string;
18275970Scy    arg-default = '/etc/ntp/drift';
19275970Scy    descrip     = 'Ntp drift file to use';
20275970Scy    doc         = 'Use the specified drift file for calculations';
21275970Scy};
22275970Scy
23275970Scyflag = {
24275970Scy    name        = tick;
25275970Scy    value       = t;
26275970Scy    arg-type    = number;
27275970Scy    descrip     = 'Tick value of this host';
28275970Scy    doc         = 'The current tick which to adjustment will be calculated';
29275970Scy};
30275970Scy
31275970Scydoc-section = {
32275970Scy    ds-type     = 'DESCRIPTION';
33275970Scy    ds-format   = 'texi';
34275970Scy    ds-text     = <<- _EndOfDoc
35275970ScyThe @code{calc_tickadj} script uses provided ntp drift file to generate optimal
36275970Scytick value. Generally, ntpd can do better job if the drift value is the
37275970Scysmallest possible number. 
38275970Scy
39275970ScyThe example output of 
40275970Scy@example
41275970Scy$ ./calc_tickadj
42275970Scy81.699 (drift)
43275970Scy9999 usec; 9999779 nsec
44275970Scy$ cat /etc/ntp/drift
45275970Scy-23.159
46275970Scy@end example
47275970Scy
48275970Scymeans the following. If tick on that box is 10,000, by making the value 9999
49275970Scywe'll shift the box from its current drift of -23.159 to a drift of 81.699, and
50275970Scyin doing so we'll speed the clock up a little every second instead of slowing
51275970Scythe clock down a little.
52275970Scy
53275970ScyIf 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
54275970Scyvalue will be somewhere around 0.0.
55275970Scy
56275970Scy@code{calc_tickadj} tries to determine the the tick value by using
57275970Scy@code{tickadj} program from ntp package. If this doesn't work you can specify
58275970Scycurrent tick manually on command line.
59275970Scy	_EndOfDoc;
60275970Scy};
61