invoke-calc_tickadj.texi revision 294904
179543Sru@node calc_tickadj Invocation
2151497Sru@section Invoking calc_tickadj
375584Sru@pindex calc_tickadj
475584Sru@cindex Calculates "optimal" value for tick given ntp drift file.
575584Sru@ignore
675584Sru#
775584Sru# EDIT THIS FILE WITH CAUTION  (invoke-calc_tickadj.texi)
875584Sru#
975584Sru# It has been AutoGen-ed  January 20, 2016 at 04:09:47 AM by AutoGen 5.18.5
1075584Sru# From the definitions    calc_tickadj-opts.def
1175584Sru# and the template file   agtexi-cmd.tpl
1275584Sru@end ignore
1375584Sru
1475584SruThe @code{calc_tickadj} script uses provided ntp drift file to generate optimal
1575584Srutick value. Generally, ntpd can do better job if the drift value is the
1675584Srusmallest possible number. 
1775584Sru
1875584SruThe example output of 
19151497Sru@example
20151497Sru$ ./calc_tickadj
2175584Sru81.699 (drift)
2275584Sru9999 usec; 9999779 nsec
2375584Sru$ cat /etc/ntp/drift
24151497Sru-23.159
25151497Sru@end example
2675584Sru
27151497Srumeans the following. If tick on that box is 10,000, by making the value 9999
28151497Sruwe'll shift the box from its current drift of -23.159 to a drift of 81.699, and
2975584Sruin doing so we'll speed the clock up a little every second instead of slowing
30104862Sruthe clock down a little.
31151497Sru
3275584SruIf 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
3375584Sruvalue will be somewhere around 0.0.
34104862Sru
35151497Sru@code{calc_tickadj} tries to determine the the tick value by using
3675584Sru@code{tickadj} program from ntp package. If this doesn't work you can specify
3775584Srucurrent tick manually on command line.
3875584Sru
3975584Sru
4075584SruThis section was generated by @strong{AutoGen},
4175584Sruusing the @code{agtexi-cmd} template and the option descriptions for the @code{calc_tickadj} program.
4275584Sru
43151497Sru@menu
4475584Sru* calc_tickadj usage::                  calc_tickadj help/usage (@option{--help})
45151497Sru* calc_tickadj drift-file::             drift-file option (-d)
46151497Sru* calc_tickadj tick::                   tick option (-t)
4775584Sru* calc_tickadj exit status::            exit status
48151497Sru@end menu
49151497Sru
50151497Sru@node calc_tickadj usage
5179543Sru@subsection calc_tickadj help/usage (@option{--help})
5275584Sru@cindex calc_tickadj help
53151497Sru
54151497SruThis is the automatically generated usage text for calc_tickadj.
55104862Sru
56151497SruThe text printed is the same whether selected with the @code{help} option
57104862Sru(@option{--help}) or the @code{more-help} option (@option{--more-help}).  @code{more-help} will print
58151497Sruthe usage text by passing it through a pager program.
59151497Sru@code{more-help} is disabled on platforms without a working
6075584Sru@code{fork(2)} function.  The @code{PAGER} environment variable is
6175584Sruused to select the program, defaulting to @file{more}.  Both will exit
6275584Sruwith a status code of 0.
63104862Sru
64151497Sru@exampleindent 0
6575584Sru@example
66104862Srucalc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467
6775584SruUSAGE: calc_tickadj [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... 
68104862Sru
69104862Sru    -d, --drift-file=str         Ntp drift file to use
70104862Sru    -t, --tick=num               Tick value of this host
71104862Sru    -?, --help                   Display usage information and exit
7275584Sru        --more-help              Pass the extended usage text through a pager
7375584Sru
7475584SruOptions are specified by doubled hyphens and their name or by a single
7575584Sruhyphen and the flag character.
7675584Sru@end example
7775584Sru@exampleindent 4
7875584Sru
7975584Sru@node calc_tickadj drift-file
8075584Sru@subsection drift-file option (-d)
8175584Sru@cindex calc_tickadj-drift-file
8275584Sru
8375584SruThis is the ``ntp drift file to use'' option.
8475584SruThis option takes a string argument.
8575584SruUse the specified drift file for calculations
8675584Sru@node calc_tickadj tick
8775584Sru@subsection tick option (-t)
8875584Sru@cindex calc_tickadj-tick
8975584Sru
9075584SruThis is the ``tick value of this host'' option.
9175584SruThis option takes a number argument.
9275584SruThe current tick which to adjustment will be calculated
9375584Sru@node calc_tickadj exit status
9475584Sru@subsection calc_tickadj exit status
9575584Sru
9675584SruOne of the following exit values will be returned:
9775584Sru@table @samp
9875584Sru@item 0 (EXIT_SUCCESS)
99151497SruSuccessful program execution.
100151497Sru@item 1 (EXIT_FAILURE)
10175584SruThe operation failed or the command syntax was not valid.
10275584Sru@end table
103104862Sru