1132451Sroberto<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2132451Sroberto
3132451Sroberto<html>
4132451Sroberto
5182007Sroberto	<head>
6182007Sroberto		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
7182007Sroberto		<meta name="generator" content="HTML Tidy, see www.w3.org">
8182007Sroberto		<title>tickadj - set time-related kernel variables</title>
9182007Sroberto		<link href="scripts/style.css" type="text/css" rel="stylesheet">
10182007Sroberto	</head>
11132451Sroberto
12182007Sroberto	<body>
13182007Sroberto		<h3><tt>tickadj</tt> - set time-related kernel variables</h3>
14182007Sroberto		<p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">18:50</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="246">Thursday, July 28, 2005</csobj></p>
15182007Sroberto		<hr>
16182007Sroberto		<h4>Synopsis</h4>
17182007Sroberto		<tt>tickadj [ -Aqs ] [ -a <i>tickadj</i> ] [ -t <i>tick</i> ]</tt>
18182007Sroberto		<h4>Description</h4>
19182007Sroberto		<p>The <tt>tickadj</tt> program reads, and optionally modifies, several timekeeping-related variables in older kernels that do not have support for precision ttimekeeping, including HP-UX, SunOS, Ultrix, SGI and probably others. Those machines provide means to patch the kernel <tt>/dev/kmem</tt>. Newer machines with precision time support, including Solaris, Tru64, FreeBSD and Linux (with PPSkit patch) should NOT use the program. The particular variables that can be changed with <tt>tickadj</tt> include <tt>tick</tt>, which is the number of microseconds added to the system time for a clock interrupt, <tt>tickadj</tt>, which sets the slew rate and resolution used by the <tt>adjtime</tt> system call, and <tt>dosynctodr</tt>, 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>
20182007Sroberto		<p>By default, with no arguments, <tt>tickadj</tt> reads the variables of interest in the kernel and displays them. At the same time, it determines an &quot;optimal&quot; value for the value of the <tt>tickadj</tt> variable if the intent is to run the <tt>ntpd</tt> Network Time Protocol (NTP) daemon, and prints this as well. Since the operation of <tt>tickadj</tt> when reading the kernel mimics the operation of similar parts of the <tt>ntpd</tt> program fairly closely, this can be useful when debugging problems with <tt>ntpd</tt>.</p>
21182007Sroberto		<p>Note that <tt>tickadj</tt> should be run with some caution when being used for the first time on different types of machines. The operations which <tt>tickadj</tt> tries to perform are not guaranteed to work on all Unix machines and may in rare cases cause the kernel to crash.</p>
22182007Sroberto		<h4>Command Line Options</h4>
23182007Sroberto		<dl>
24182007Sroberto			<dt><tt>-a <i>tickadj</i></tt>
25182007Sroberto			<dd>Set the kernel variable <tt>tickadj</tt> to the value <i><tt>tickadj</tt></i>specified.
26182007Sroberto			<dt><tt>-A</tt>
27182007Sroberto			<dd>Set the kernel variable <tt>tickadj</tt> to an internally computed &quot;optimal&quot; value.
28182007Sroberto			<dt><tt>-t <i>tick</i></tt>
29182007Sroberto			<dd>Set the kernel variable <tt>tick</tt> to the value <i><tt>tick</tt></i> specified.
30182007Sroberto			<dt><tt>-s</tt>
31182007Sroberto			<dd>Set the kernel variable <tt>dosynctodr</tt> to zero, which disables the hardware time-of-year clock, a prerequisite for running the <tt>ntpd</tt> daemon under SunOS4.
32182007Sroberto			<dt><tt>-q</tt>
33182007Sroberto			<dd>Normally, <tt>tickadj</tt> is quite verbose about what it is doing. The <tt>-q</tt> flag tells it to shut up about everything except errors.
34182007Sroberto		</dl>
35182007Sroberto		<h4>Files</h4>
36182007Sroberto		<pre>
37132451Sroberto/vmunix
38132451Sroberto
39132451Sroberto/unix
40132451Sroberto
41132451Sroberto/dev/kmem
42132451Sroberto</pre>
43182007Sroberto		<h4>Bugs</h4>
44182007Sroberto		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 <tt>adjtime</tt> 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 <tt>tickadj</tt> program went away.
45182007Sroberto		<hr>
46182007Sroberto		<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
47182007Sroberto	</body>
48132451Sroberto
49132451Sroberto</html>