1998-01-22 07:26:08 +00:00
|
|
|
.\" $Id: tickadj.8,v 1.4 1997/02/22 16:14:18 peter Exp $
|
|
|
|
.\"
|
|
|
|
.Dd December 21, 1993
|
|
|
|
.Dt TICKADJ 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm tickadj
|
|
|
|
.Nd fiddle time\-related variables in the kernel
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm tickadj
|
|
|
|
.Op Fl Adkpqs
|
|
|
|
.Op Fl a Ar new_tickadj
|
|
|
|
.Op Fl t Ar new_tick
|
|
|
|
.Sh DESCRIPTION
|
1993-12-21 18:36:48 +00:00
|
|
|
The
|
1998-01-22 07:26:08 +00:00
|
|
|
.Nm
|
1993-12-21 18:36:48 +00:00
|
|
|
program reads, and optionally modifies, several time\-keeping\-related
|
|
|
|
variables in the running kernel, via
|
1998-01-22 07:26:08 +00:00
|
|
|
.Pa /dev/kmem .
|
1993-12-21 18:36:48 +00:00
|
|
|
The particular variables it is concerned with are
|
1998-01-22 07:26:08 +00:00
|
|
|
.Em tick ,
|
1993-12-21 18:36:48 +00:00
|
|
|
which is the number of microseconds added to the system time during a
|
|
|
|
clock interrupt,
|
1998-01-22 07:26:08 +00:00
|
|
|
.Em tickadj ,
|
1993-12-21 18:36:48 +00:00
|
|
|
which sets the slew rate and resolution used by the
|
1998-01-22 07:26:08 +00:00
|
|
|
.Xr adjtime 2
|
1993-12-21 18:36:48 +00:00
|
|
|
system call, and
|
1998-01-22 07:26:08 +00:00
|
|
|
.Em dosynctodr ,
|
1993-12-21 18:36:48 +00:00
|
|
|
which indicates to the kernels on some machines whether they should internally
|
1996-10-05 22:27:30 +00:00
|
|
|
adjust the system clock to keep it in line with time\-of\-day clock
|
1993-12-21 18:36:48 +00:00
|
|
|
or not.
|
1998-01-22 07:26:08 +00:00
|
|
|
.Pp
|
1993-12-21 18:36:48 +00:00
|
|
|
By default, with no arguments,
|
1998-01-22 07:26:08 +00:00
|
|
|
.Nm
|
1993-12-21 18:36:48 +00:00
|
|
|
reads the variables of interest in the kernel and prints them. At the
|
1998-01-22 07:26:08 +00:00
|
|
|
same time it determines an
|
|
|
|
.Qq optimal
|
|
|
|
value for the value of the
|
|
|
|
.Em tickadj
|
1993-12-21 18:36:48 +00:00
|
|
|
variable if the intent is to run the
|
1998-01-22 07:26:08 +00:00
|
|
|
.Xr xntpd 8
|
1993-12-21 18:36:48 +00:00
|
|
|
Network Time Protocol daemon, and prints this as well. Since the operation
|
|
|
|
of
|
1998-01-22 07:26:08 +00:00
|
|
|
.Nm
|
1993-12-21 18:36:48 +00:00
|
|
|
when reading the kernel mimics the operation of similar parts of the
|
1998-01-22 07:26:08 +00:00
|
|
|
.Xr xntpd 8
|
1993-12-21 18:36:48 +00:00
|
|
|
program fairly closely, this is useful for doing debugging of problems
|
|
|
|
with
|
1998-01-22 07:26:08 +00:00
|
|
|
.Xr xntpd 8 Ns .
|
|
|
|
.Pp
|
1993-12-21 18:36:48 +00:00
|
|
|
Various flags may be specified to change the variables of interest in
|
1998-01-22 07:26:08 +00:00
|
|
|
the running kernel:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl a Ar new_tickadj
|
|
|
|
Allow one to set the variable
|
|
|
|
.Em tickadj
|
|
|
|
to the value specified as an argument.
|
|
|
|
.It Fl A
|
|
|
|
Cause
|
|
|
|
.Em tickadj
|
1993-12-21 18:36:48 +00:00
|
|
|
to be modified, but instead will set it to the internally computed
|
1998-01-22 07:26:08 +00:00
|
|
|
.Qq optimal
|
|
|
|
value.
|
|
|
|
.It Fl d
|
|
|
|
Add debugging information.
|
|
|
|
.It Fl k
|
|
|
|
Use
|
|
|
|
.Pa /dev/kmem
|
|
|
|
instead of
|
|
|
|
.Pa /kernel .
|
|
|
|
This is the default.
|
|
|
|
.It Fl p
|
|
|
|
Tell
|
|
|
|
.Nm
|
|
|
|
to set the value of the variable
|
|
|
|
.Em noprintf
|
|
|
|
to one.
|
|
|
|
.It Fl q
|
|
|
|
Tell
|
|
|
|
.Nm
|
|
|
|
to shut up about everything except errors. Normally
|
|
|
|
.Nm
|
|
|
|
is quite verbose about what it is doing.
|
|
|
|
.It Fl s
|
|
|
|
Tell
|
|
|
|
.Nm
|
|
|
|
to set the value of the variable
|
|
|
|
.Em dosynctodr
|
1993-12-21 18:36:48 +00:00
|
|
|
to zero, a prerequisite for running the
|
1998-01-22 07:26:08 +00:00
|
|
|
.Xr xntpd 8
|
|
|
|
daemon under SunOS 4.0.
|
|
|
|
.It Fl t Ar new_tick
|
|
|
|
May be used to reset the kernel's value of
|
|
|
|
.Em tick ,
|
|
|
|
a capability which is useful on machines with very broken clocks.
|
|
|
|
.El
|
|
|
|
.Pp
|
1993-12-21 18:36:48 +00:00
|
|
|
Note that
|
1998-01-22 07:26:08 +00:00
|
|
|
.Nm
|
1993-12-21 18:36:48 +00:00
|
|
|
should be run with some caution when being used for the first time on
|
|
|
|
different types of machines. The operations which
|
1998-01-22 07:26:08 +00:00
|
|
|
.Nm
|
1993-12-21 18:36:48 +00:00
|
|
|
trys to perform are not guaranteed to work on all Unix machines.
|
1998-01-22 07:26:08 +00:00
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width /dev/kmem -compact
|
|
|
|
.It Pa /kernel
|
|
|
|
.It Pa /dev/kmem
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr xntpd 8
|
|
|
|
.Sh HISTORY
|
|
|
|
Written by
|
|
|
|
.An Dennis Ferguson
|
|
|
|
at the University of Toronto.
|
|
|
|
.Sh BUGS
|
1993-12-21 18:36:48 +00:00
|
|
|
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
|
1998-01-22 07:26:08 +00:00
|
|
|
.Xr adjtime 8
|
1993-12-21 18:36:48 +00:00
|
|
|
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
|
1998-01-22 07:26:08 +00:00
|
|
|
.Nm
|
1993-12-21 18:36:48 +00:00
|
|
|
program went away.
|