]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
Fix ntp multiple vulnerabilities.
[FreeBSD/releng/10.2.git] / contrib / ntp / scripts / calc_tickadj / invoke-calc_tickadj.texi
1 @node calc_tickadj Invocation
2 @section Invoking calc_tickadj
3 @pindex calc_tickadj
4 @cindex Calculates "optimal" value for tick given ntp drift file.
5 @ignore
6 #
7 # EDIT THIS FILE WITH CAUTION  (invoke-calc_tickadj.texi)
8 #
9 # It has been AutoGen-ed  April 26, 2016 at 08:24:15 PM by AutoGen 5.18.5
10 # From the definitions    calc_tickadj-opts.def
11 # and the template file   agtexi-cmd.tpl
12 @end ignore
13
14 The @code{calc_tickadj} script uses provided ntp drift file to generate optimal
15 tick value. Generally, ntpd can do better job if the drift value is the
16 smallest possible number. 
17
18 The example output of 
19 @example
20 $ ./calc_tickadj
21 81.699 (drift)
22 9999 usec; 9999779 nsec
23 $ cat /etc/ntp/drift
24 -23.159
25 @end example
26
27 means the following. If tick on that box is 10,000, by making the value 9999
28 we'll shift the box from its current drift of -23.159 to a drift of 81.699, and
29 in doing so we'll speed the clock up a little every second instead of slowing
30 the clock down a little.
31
32 If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
33 value will be somewhere around 0.0.
34
35 @code{calc_tickadj} tries to determine the the tick value by using
36 @code{tickadj} program from ntp package. If this doesn't work you can specify
37 current tick manually on command line.
38
39
40 This section was generated by @strong{AutoGen},
41 using the @code{agtexi-cmd} template and the option descriptions for the @code{calc_tickadj} program.
42
43 @menu
44 * calc_tickadj usage::                  calc_tickadj help/usage (@option{--help})
45 * calc_tickadj drift-file::             drift-file option (-d)
46 * calc_tickadj tick::                   tick option (-t)
47 * calc_tickadj exit status::            exit status
48 @end menu
49
50 @node calc_tickadj usage
51 @subsection calc_tickadj help/usage (@option{--help})
52 @cindex calc_tickadj help
53
54 This is the automatically generated usage text for calc_tickadj.
55
56 The text printed is the same whether selected with the @code{help} option
57 (@option{--help}) or the @code{more-help} option (@option{--more-help}).  @code{more-help} will print
58 the usage text by passing it through a pager program.
59 @code{more-help} is disabled on platforms without a working
60 @code{fork(2)} function.  The @code{PAGER} environment variable is
61 used to select the program, defaulting to @file{more}.  Both will exit
62 with a status code of 0.
63
64 @exampleindent 0
65 @example
66 calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467
67 USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... 
68
69     -d, --drift-file=str         Ntp drift file to use
70     -t, --tick=num               Tick value of this host
71     -?, --help                   Display usage information and exit
72         --more-help              Pass the extended usage text through a pager
73
74 Options are specified by doubled hyphens and their name or by a single
75 hyphen and the flag character.
76 @end example
77 @exampleindent 4
78
79 @node calc_tickadj drift-file
80 @subsection drift-file option (-d)
81 @cindex calc_tickadj-drift-file
82
83 This is the ``ntp drift file to use'' option.
84 This option takes a string argument.
85 Use the specified drift file for calculations
86 @node calc_tickadj tick
87 @subsection tick option (-t)
88 @cindex calc_tickadj-tick
89
90 This is the ``tick value of this host'' option.
91 This option takes a number argument.
92 The current tick which to adjustment will be calculated
93 @node calc_tickadj exit status
94 @subsection calc_tickadj exit status
95
96 One of the following exit values will be returned:
97 @table @samp
98 @item 0 (EXIT_SUCCESS)
99 Successful program execution.
100 @item 1 (EXIT_FAILURE)
101 The operation failed or the command syntax was not valid.
102 @end table