summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
blob: 6ade9e258301e27740684908b4510c9854773f98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
@node calc_tickadj Invocation
@section Invoking calc_tickadj
@pindex calc_tickadj
@cindex Calculates "optimal" value for tick given ntp drift file.
@ignore
#
# EDIT THIS FILE WITH CAUTION  (invoke-calc_tickadj.texi)
#
# It has been AutoGen-ed  April 26, 2016 at 08:24:15 PM by AutoGen 5.18.5
# From the definitions    calc_tickadj-opts.def
# and the template file   agtexi-cmd.tpl
@end ignore

The @code{calc_tickadj} script uses provided ntp drift file to generate optimal
tick value. Generally, ntpd can do better job if the drift value is the
smallest possible number. 

The example output of 
@example
$ ./calc_tickadj
81.699 (drift)
9999 usec; 9999779 nsec
$ cat /etc/ntp/drift
-23.159
@end example

means the following. If tick on that box is 10,000, by making the value 9999
we'll shift the box from its current drift of -23.159 to a drift of 81.699, and
in doing so we'll speed the clock up a little every second instead of slowing
the clock down a little.

If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
value will be somewhere around 0.0.

@code{calc_tickadj} tries to determine the the tick value by using
@code{tickadj} program from ntp package. If this doesn't work you can specify
current tick manually on command line.


This section was generated by @strong{AutoGen},
using the @code{agtexi-cmd} template and the option descriptions for the @code{calc_tickadj} program.

@menu
* calc_tickadj usage::                  calc_tickadj help/usage (@option{--help})
* calc_tickadj drift-file::             drift-file option (-d)
* calc_tickadj tick::                   tick option (-t)
* calc_tickadj exit status::            exit status
@end menu

@node calc_tickadj usage
@subsection calc_tickadj help/usage (@option{--help})
@cindex calc_tickadj help

This is the automatically generated usage text for calc_tickadj.

The text printed is the same whether selected with the @code{help} option
(@option{--help}) or the @code{more-help} option (@option{--more-help}).  @code{more-help} will print
the usage text by passing it through a pager program.
@code{more-help} is disabled on platforms without a working
@code{fork(2)} function.  The @code{PAGER} environment variable is
used to select the program, defaulting to @file{more}.  Both will exit
with a status code of 0.

@exampleindent 0
@example
calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467
USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... 

    -d, --drift-file=str         Ntp drift file to use
    -t, --tick=num               Tick value of this host
    -?, --help                   Display usage information and exit
        --more-help              Pass the extended usage text through a pager

Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.
@end example
@exampleindent 4

@node calc_tickadj drift-file
@subsection drift-file option (-d)
@cindex calc_tickadj-drift-file

This is the ``ntp drift file to use'' option.
This option takes a string argument.
Use the specified drift file for calculations
@node calc_tickadj tick
@subsection tick option (-t)
@cindex calc_tickadj-tick

This is the ``tick value of this host'' option.
This option takes a number argument.
The current tick which to adjustment will be calculated
@node calc_tickadj exit status
@subsection calc_tickadj exit status

One of the following exit values will be returned:
@table @samp
@item 0 (EXIT_SUCCESS)
Successful program execution.
@item 1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
@end table
OpenPOWER on IntegriCloud