TICKADJ(8)

NAME
tickadj - fiddle time-related variables in the kernel

SYNOPSIS
tickadj [ -Aqs ] [ -a new_tickadj ] [ -t new_tick ]

DESCRIPTION
The tickadj program reads, and optionally modifies, several time-keeping-related variables in the running kernel, via /dev/kmem. The particular variables it is concerned with are tick, which is the number of microseconds added to the system time during a clock interrupt, tickadj, which sets the slew rate and resolution used by the adjtime(2) system call, and dosynctodr, 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.

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

Various flags may be specified to change the variables of interest in the running kernel. The -a flag allows one to set the variable tickadj to the value specified as an argument. The -A flag will also cause tickadj to be modified, but instead will set it to the internally computed "optimal" value. The -t flag may be used to reset the kernel's value of tick, a capability which is useful on machines with very broken clocks. The -s flag tells the program to set the value of the variable dosynctodr to zero, a prerequisite for running the xntpd(8) daemon under SunOS 4.0. Normally tickadj is quite verbose about what it is doing. The -q flag tells it to shut up about everything except errors.

Note that tickadj should be run with some caution when being used for the first time on different types of machines. The operations which tickadj trys to perform are not guaranteed to work on all Unix machines.

FILES
/vmunix
/unix
/dev/kmem

SEE ALSO
xntpd(8)

HISTORY
Written by Dennis Ferguson at the University of Toronto

BUGS
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 adjtime(8) 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 tickadj program went away.