xref: /freebsd/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc (revision f5f40dd63bc7acbb5312b26ac1ea1103c12352a6)
1*f5f40dd6SCy Schubert.Dd May 25 2024
22b15cb3dSCy Schubert.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
32b15cb3dSCy Schubert.Os
42b15cb3dSCy Schubert.\"  EDIT THIS FILE WITH CAUTION  (calc_tickadj-opts.mdoc)
52b15cb3dSCy Schubert.\"
6*f5f40dd6SCy Schubert.\"  It has been AutoGen-ed  May 25, 2024 at 12:05:33 AM by AutoGen 5.18.16
72b15cb3dSCy Schubert.\"  From the definitions    calc_tickadj-opts.def
82b15cb3dSCy Schubert.\"  and the template file   agmdoc-cmd.tpl
92b15cb3dSCy Schubert.Sh NAME
102b15cb3dSCy Schubert.Nm calc_tickadj
112b15cb3dSCy Schubert.Nd Calculates "optimal" value for tick given ntp drift file.
122b15cb3dSCy Schubert.Sh SYNOPSIS
132b15cb3dSCy Schubert.Nm
142b15cb3dSCy Schubert.\" Mixture of short (flag) options and long options
152b15cb3dSCy Schubert.Op Fl flags
162b15cb3dSCy Schubert.Op Fl flag Op Ar value
172b15cb3dSCy Schubert.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
182b15cb3dSCy Schubert.Pp
192b15cb3dSCy SchubertAll arguments must be options.
202b15cb3dSCy Schubert.Pp
212b15cb3dSCy Schubert.Sh DESCRIPTION
222b15cb3dSCy SchubertThe \fBcalc_tickadj\fP script uses provided ntp drift file to generate optimal
232b15cb3dSCy Schuberttick value. Generally, ntpd can do better job if the drift value is the
242b15cb3dSCy Schubertsmallest possible number.
252b15cb3dSCy Schubert.sp
262b15cb3dSCy SchubertThe example output of
272b15cb3dSCy Schubert.Bd -literal -offset indent
282b15cb3dSCy Schubert$ ./calc_tickadj
292b15cb3dSCy Schubert81.699 (drift)
302b15cb3dSCy Schubert9999 usec; 9999779 nsec
312b15cb3dSCy Schubert$ cat /etc/ntp/drift
322b15cb3dSCy Schubert-23.159
332b15cb3dSCy Schubert.Ed
342b15cb3dSCy Schubert.sp
352b15cb3dSCy Schubertmeans the following. If tick on that box is 10,000, by making the value 9999
362b15cb3dSCy Schubertwe'll shift the box from its current drift of \-23.159 to a drift of 81.699, and
372b15cb3dSCy Schubertin doing so we'll speed the clock up a little every second instead of slowing
382b15cb3dSCy Schubertthe clock down a little.
392b15cb3dSCy Schubert.sp
402b15cb3dSCy SchubertIf 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
412b15cb3dSCy Schubertvalue will be somewhere around 0.0.
422b15cb3dSCy Schubert.sp
432b15cb3dSCy Schubert\fBcalc_tickadj\fP tries to determine the the tick value by using
442b15cb3dSCy Schubert\fBtickadj\fP program from ntp package. If this doesn't work you can specify
452b15cb3dSCy Schubertcurrent tick manually on command line.
462b15cb3dSCy Schubert.Sh "OPTIONS"
472b15cb3dSCy Schubert.Bl -tag
482b15cb3dSCy Schubert.It  Fl d Ar string , Fl \-drift\-file Ns = Ns Ar string
492b15cb3dSCy SchubertNtp drift file to use.
502b15cb3dSCy SchubertThe default
512b15cb3dSCy Schubert.Ar string
522b15cb3dSCy Schubertfor this option is:
532b15cb3dSCy Schubert.ti +4
542b15cb3dSCy Schubert /etc/ntp/drift
552b15cb3dSCy Schubert.sp
562b15cb3dSCy SchubertUse the specified drift file for calculations
572b15cb3dSCy Schubert.It  Fl t Ar number , Fl \-tick Ns = Ns Ar number
582b15cb3dSCy SchubertTick value of this host.
592b15cb3dSCy SchubertThis option takes an integer number as its argument.
602b15cb3dSCy Schubert.sp
612b15cb3dSCy SchubertThe current tick which to adjustment will be calculated
622b15cb3dSCy Schubert.It Fl \&? , Fl \-help
632b15cb3dSCy SchubertDisplay usage information and exit.
642b15cb3dSCy Schubert.It Fl \&! , Fl \-more\-help
652b15cb3dSCy SchubertPass the extended usage information through a pager.
662b15cb3dSCy Schubert.It Fl v Op Brq Ar v|c|n  Fl \-version Op Brq Ar v|c|n
672b15cb3dSCy SchubertOutput version of program and exit.  The default mode is `v', a simple
682b15cb3dSCy Schubertversion.  The `c' mode will print copyright information and `n' will
692b15cb3dSCy Schubertprint the full copyright notice.
702b15cb3dSCy Schubert.El
712b15cb3dSCy Schubert.Sh "EXIT STATUS"
722b15cb3dSCy SchubertOne of the following exit values will be returned:
732b15cb3dSCy Schubert.Bl -tag
742b15cb3dSCy Schubert.It 0 " (EXIT_SUCCESS)"
752b15cb3dSCy SchubertSuccessful program execution.
762b15cb3dSCy Schubert.It 1 " (EXIT_FAILURE)"
772b15cb3dSCy SchubertThe operation failed or the command syntax was not valid.
782b15cb3dSCy Schubert.It 70 " (EX_SOFTWARE)"
792b15cb3dSCy Schubertlibopts had an internal operational error.  Please report
802b15cb3dSCy Schubertit to autogen\-users@lists.sourceforge.net.  Thank you.
812b15cb3dSCy Schubert.El
822b15cb3dSCy Schubert.Sh "NOTES"
832b15cb3dSCy SchubertThis manual page was \fIAutoGen\fP\-erated from the \fBcalc_tickadj\fP
842b15cb3dSCy Schubertoption definitions.
85