xref: /freebsd/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts.def (revision 0b3105a37d7adcadcb720112fed4dc4e8040be99)
1/* -*- Mode: Text -*- */
2AutoGen Definitions perlopt;
3
4#include autogen-version.def
5
6prog-name	= calc_tickadj;
7prog-title	= 'Calculates "optimal" value for tick given ntp drift file.';
8package		= ntp;
9#include	version.def
10
11long-opts;
12gnu-usage;
13
14flag = {
15    name        = drift-file;
16    value       = d;
17    arg-type    = string;
18    arg-default = '/etc/ntp/drift';
19    descrip     = 'Ntp drift file to use';
20    doc         = 'Use the specified drift file for calculations';
21};
22
23flag = {
24    name        = tick;
25    value       = t;
26    arg-type    = number;
27    descrip     = 'Tick value of this host';
28    doc         = 'The current tick which to adjustment will be calculated';
29};
30
31doc-section = {
32    ds-type     = 'DESCRIPTION';
33    ds-format   = 'texi';
34    ds-text     = <<- _EndOfDoc
35The @code{calc_tickadj} script uses provided ntp drift file to generate optimal
36tick value. Generally, ntpd can do better job if the drift value is the
37smallest possible number.
38
39The example output of
40@example
41$ ./calc_tickadj
4281.699 (drift)
439999 usec; 9999779 nsec
44$ cat /etc/ntp/drift
45-23.159
46@end example
47
48means the following. If tick on that box is 10,000, by making the value 9999
49we'll shift the box from its current drift of -23.159 to a drift of 81.699, and
50in doing so we'll speed the clock up a little every second instead of slowing
51the clock down a little.
52
53If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
54value will be somewhere around 0.0.
55
56@code{calc_tickadj} tries to determine the the tick value by using
57@code{tickadj} program from ntp package. If this doesn't work you can specify
58current tick manually on command line.
59	_EndOfDoc;
60};
61