Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Feb 2015 11:17:03 -0800
From:      Rick Thomas <rbthomas@pobox.com>
To:        Adam Vande More <amvandemore@gmail.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: How to adjust clock frequency in FreeBSD 10.1 ?
Message-ID:  <2F352B9F-A1CA-47D3-B17D-4C7918B80636@pobox.com>
In-Reply-To: <CA%2BtpaK1rJszT2-JMUqBp6hb3nMDVQchn8FBR7icQaSNi1gad4w@mail.gmail.com>
References:  <AE5A370C-A7F7-41D2-900D-B26521A2D705@pobox.com> <CA%2BtpaK3bn-UPrqTU9cME2V9Ls=auf1n0rdr%2BuHA1b7pcspmiPw@mail.gmail.com> <BF8DFE66-E19D-45DA-A0C3-EB08D7E9DFF9@pobox.com> <CA%2BtpaK1rJszT2-JMUqBp6hb3nMDVQchn8FBR7icQaSNi1gad4w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Feb 14, 2015, at 4:50 AM, Adam Vande More <amvandemore@gmail.com> =
wrote:

> On Sat, Feb 14, 2015 at 5:42 AM, Rick Thomas <rbthomas@pobox.com> =
wrote:
>=20
>> When I try to change the frequency with (e.g.)
>>    sysctl kern.timecounter.tc.timebase.frequency=3D36000000
>>=20
>> I get
>>    sysctl: oid =91kern.timecounter.tc.timebase.frequency' is read =
only
>>=20
>=20
> Yeah, pretty clear that sysctl isn't going to help you in any way in =
"man 4
> timecounters"
>=20
> Is there some other way to set the frequency?
>>=20
>=20
> Sure, but I thought keeping accurate time was the goal?  If so, =
sharing the
> output from the first command I gave you is a good start.

Ooops=85  Sorry! I thought I had already done that.  In any case, here =
it is:

> [root@grey ~]# sysctl kern.timecounter
> kern.timecounter.fast_gettime: 1
> kern.timecounter.tick: 1
> kern.timecounter.choice: timebase(0) dummy(-1000000)
> kern.timecounter.hardware: timebase
> kern.timecounter.alloweddeviation: 5
> kern.timecounter.stepwarnings: 0
> kern.timecounter.tc.timebase.mask: 4294967295
> kern.timecounter.tc.timebase.counter: 1981288884
> kern.timecounter.tc.timebase.frequency: 33290001
> kern.timecounter.tc.timebase.quality: 0
> [root@grey ~]#=20

I=92m guessing that by tuning the timebase.frequency number, I can make =
the clock run effectively slower or faster.  If I find the right value, =
I can correct the problem I=92m seeing with ntpd.

In case it matters, this is a powerpc Macintosh G4, so the only =
available timecounter is =93timebase=94.  Switching to a different =
timecounter is not an available option.

Rick=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2F352B9F-A1CA-47D3-B17D-4C7918B80636>