Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jan 2000 09:43:40 -0500
From:      Marc Giannoni <marcg@fred.net>
To:        questions@freebsd.org
Subject:   3.3/3.4-Release system clock is racing!  (more info)
Message-ID:  <00012709372901.55277@versa>

next in thread | raw e-mail | index | archive | help
I've tried everything! (I think)
This thing gains about 10 min and hour!

The OS comes from a "cheap bytes" 3.3-Release CD,
and I've updated the kernel from "cvsup" sources (stable-supfile)

The system is a Dell Dimesion P100....and
I've already flashed in a new Y2K BIOS from the Dell website.

NTPDATE works great....but
NTP wont' sync the clock....also
A new kernel (sources cvsupped this week) did not help...(amazing!)
Even "adjtime" failed to slow it down....hmmm

I've got NTP going on other machines on my network so access to peers is
available.  I compiled NTP with DEBUG and monitored it's progress...the peers
never make it past "clock_select()"

"sysctl kern.clockrate" says:
kern.clockrate: { hz = 100, tick = 10000, tickadj = 5, profhz = 1024, stathz = 128 }

I had to write a small program to tweak "kern.clockrate" with "adjtime()", but
all this managed to do was slow down the alarm clock!   I had the following
shell program "ticking" at about 1/2 the normal rate but the system clock
continued racing!

At this point I rebooted and pulled up the BIOS screen and monitored the CMOS
clock....which did not appear to be racing!   I checked it with a wristwatch
for several 10 min periods....all seemed normal !?!

#include <stdio.h>
#include <sys/time.h>

struct timeval delta[1];
struct timeval oldelta[1];

main (char *argc, char **argv)	/* program to tweak kern.clockrate */
{
	long off;
	int err;

	sscanf (*argv, "%l", &off);
	delta->tv_sec = off;
	err = adjtime(delta, oldelta);
	printf ("adjtime: %d\n\n", err);
}

#!/bin/csh			/* script to check alarm clock */
while (1)
echo "tick tock"			/* the "tick tock" slowed */
sleep 1				/* but the system clock didnt !?! */
end

--
This communication is exclusively reserved for the intended recipient.
All parties not explicitly named as recipients, including Law 
Enforcement, are hereby denied access to this entire communication.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00012709372901.55277>