File: tickadj.html

package info (click to toggle)
xntp3 5.93-2
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 7,644 kB
  • ctags: 7,419
  • sloc: ansic: 59,474; perl: 3,633; sh: 2,623; awk: 417; makefile: 311; asm: 37
file content (85 lines) | stat: -rw-r--r-- 3,141 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
<html><head><title>
tickadj - set time-related kernel variables
</title></head><body><h3>
<code>tickadj</code> - set time-related kernel variables
</h3><hr>

<p><h4>Synopsis</h4>

<p><code>tickadj [ -Aqs ] [ -a <i>tickadj</i> ] [ -t <i>tick</i>
]</code>

<p><h4>Description</h4>

<p>The <code>tickadj</code> program reads, and optionally modifies,
several timekeeping-related variables in the running kernel, via
<code>/dev/kmem</code>. The particular variables it is concerned with
are <code>tick</code>, which is the number of microseconds added to the
system time during a clock interrupt, <code>tickadj</code>, which sets
the slew rate and resolution used by the <code>adjtime</code> system
call, and <code>dosynctodr</code>, which indicates to the kernels on
some machines whether they should internally adjust the system clock to
keep it in line with time-of-day clock or not.

<p>By default, with no arguments, <code>tickadj</code> reads the
variables of interest in the kernel and displays them. At the same time,
it determines an "optimal" value for the value of the
<code>tickadj</code> variable if the intent is to run the
<code>xntpd</code> Network Time Protocol (NTP) daemon, and prints this
as well. Since the operation of <code>tickadj</code> when reading the
kernel mimics the operation of similar parts of the <code>xntpd</code>
program fairly closely, this can be useful when debugging problems with
<code>xntpd</code>.

<p>Note that <code>tickadj</code> should be run with some caution when
being used for the first time on different types of machines. The
operations which <code>tickadj</code> tries to perform are not
guaranteed to work on all Unix machines and may in rare cases cause the
kernel to crash.

<p><h4>Command Line Options</h4>

<dl>

<dt><code>-a <i>tickadj</i></code>
<dd>Set the kernel variable <code>tickadj</code> to the value
<code><i>tickadj</i></code> specified.

<p><dt><code>-A</code>
<dd>Set the kernel variable <code>tickadj</code> to an internally
computed "optimal" value.

<p><dt><code>-t <i>tick</i></code>
<dd>Set the kernel variable <code>tick</code> to the value
<code><i>tick</i></code> specified.

<p><dt><code>-s</code>
<dd>Set the kernel variable <code>dosynctodr</code> to zero, which
disables the hardware time-of-year clock, a prerequisite for running the
<code>xntpd</code> daemon under SunOS4.

<p><dt><code>-q</code>
<dd>Normally, <code>tickadj</code> is quite verbose about what it is
doing. The <code>-q</code> flag tells it to shut up about everything
except errors.

</dl>
<p><h4>Files</h4>

<pre>
<br>/vmunix
<br>/unix
<br>/dev/kmem
</pre>

<p><h4>Bugs</h4>

<p>Fiddling with kernel variables at run time as a part of ordinary
operations is a hideous practice which is only necessary to make up for
deficiencies in the implementation of <code>adjtime</code> in many
kernels and/or brokenness of the system clock in some vendors' kernels.
It would be much better if the kernels were fixed and the
<code><code>tickadj</code></code> program went away.

<hr><address>David L. Mills (mills@udel.edu)</address></body></html>