xref: /freebsd/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in (revision f7c32ed617858bcd22f8d1b03199099d50125721)
1.Dd June 23 2020
2.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
3.Os
4.\"  EDIT THIS FILE WITH CAUTION  (calc_tickadj-opts.mdoc)
5.\"
6.\"  It has been AutoGen-ed  June 23, 2020 at 02:21:28 AM by AutoGen 5.18.5
7.\"  From the definitions    calc_tickadj-opts.def
8.\"  and the template file   agmdoc-cmd.tpl
9.Sh NAME
10.Nm calc_tickadj
11.Nd Calculates "optimal" value for tick given ntp drift file.
12.Sh SYNOPSIS
13.Nm
14.\" Mixture of short (flag) options and long options
15.Op Fl flags
16.Op Fl flag Op Ar value
17.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
18.Pp
19All arguments must be options.
20.Pp
21.Sh DESCRIPTION
22The \fBcalc_tickadj\fP script uses provided ntp drift file to generate optimal
23tick value. Generally, ntpd can do better job if the drift value is the
24smallest possible number.
25.sp
26The example output of
27.Bd -literal -offset indent
28$ ./calc_tickadj
2981.699 (drift)
309999 usec; 9999779 nsec
31$ cat /etc/ntp/drift
32-23.159
33.Ed
34.sp
35means the following. If tick on that box is 10,000, by making the value 9999
36we'll shift the box from its current drift of \-23.159 to a drift of 81.699, and
37in doing so we'll speed the clock up a little every second instead of slowing
38the clock down a little.
39.sp
40If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
41value will be somewhere around 0.0.
42.sp
43\fBcalc_tickadj\fP tries to determine the the tick value by using
44\fBtickadj\fP program from ntp package. If this doesn't work you can specify
45current tick manually on command line.
46.Sh "OPTIONS"
47.Bl -tag
48.It  Fl d Ar string , Fl \-drift\-file Ns = Ns Ar string
49Ntp drift file to use.
50The default
51.Ar string
52for this option is:
53.ti +4
54 /etc/ntp/drift
55.sp
56Use the specified drift file for calculations
57.It  Fl t Ar number , Fl \-tick Ns = Ns Ar number
58Tick value of this host.
59This option takes an integer number as its argument.
60.sp
61The current tick which to adjustment will be calculated
62.It Fl \&? , Fl \-help
63Display usage information and exit.
64.It Fl \&! , Fl \-more\-help
65Pass the extended usage information through a pager.
66.It Fl v Op Brq Ar v|c|n  Fl \-version Op Brq Ar v|c|n
67Output version of program and exit.  The default mode is `v', a simple
68version.  The `c' mode will print copyright information and `n' will
69print the full copyright notice.
70.El
71.Sh "EXIT STATUS"
72One of the following exit values will be returned:
73.Bl -tag
74.It 0 " (EXIT_SUCCESS)"
75Successful program execution.
76.It 1 " (EXIT_FAILURE)"
77The operation failed or the command syntax was not valid.
78.It 70 " (EX_SOFTWARE)"
79libopts had an internal operational error.  Please report
80it to autogen\-users@lists.sourceforge.net.  Thank you.
81.El
82.Sh "NOTES"
83This manual page was \fIAutoGen\fP\-erated from the \fBcalc_tickadj\fP
84option definitions.
85