]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts.def
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / ntp / scripts / calc_tickadj / calc_tickadj-opts.def
1 /* -*- Mode: Text -*- */
2 AutoGen Definitions perlopt;
3
4 #include autogen-version.def
5
6 prog-name       = calc_tickadj;
7 prog-title      = 'Calculates "optimal" value for tick given ntp drift file.';
8 package         = ntp;
9 #include        version.def
10
11 long-opts;
12 gnu-usage;
13
14 flag = {
15     name        = drift-file;
16     value       = d;
17     arg-type    = string;
18     arg-default = '/etc/ntp/drift';
19     descrip     = 'Ntp drift file to use';
20     doc         = 'Use the specified drift file for calculations';
21 };
22
23 flag = {
24     name        = tick;
25     value       = t;
26     arg-type    = number;
27     descrip     = 'Tick value of this host';
28     doc         = 'The current tick which to adjustment will be calculated';
29 };
30
31 doc-section = {
32     ds-type     = 'DESCRIPTION';
33     ds-format   = 'texi';
34     ds-text     = <<- _EndOfDoc
35 The @code{calc_tickadj} script uses provided ntp drift file to generate optimal
36 tick value. Generally, ntpd can do better job if the drift value is the
37 smallest possible number. 
38
39 The example output of 
40 @example
41 $ ./calc_tickadj
42 81.699 (drift)
43 9999 usec; 9999779 nsec
44 $ cat /etc/ntp/drift
45 -23.159
46 @end example
47
48 means the following. If tick on that box is 10,000, by making the value 9999
49 we'll shift the box from its current drift of -23.159 to a drift of 81.699, and
50 in doing so we'll speed the clock up a little every second instead of slowing
51 the clock down a little.
52
53 If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
54 value will be somewhere around 0.0.
55
56 @code{calc_tickadj} tries to determine the the tick value by using
57 @code{tickadj} program from ntp package. If this doesn't work you can specify
58 current tick manually on command line.
59         _EndOfDoc;
60 };