Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
Re: sysctl cpu hz
To:
Theo de Raadt <deraadt@openbsd.org>
Cc:
Ted Unangst <tedu@tedunangst.com>, tech@openbsd.org
Date:
Sat, 26 Apr 2025 08:16:57 +0200

Download raw body.

Thread
  • Mark Kettenis:

    sysctl cpu hz

  • Theo de Raadt:

    sysctl cpu hz

    • Claudio Jeker:

      sysctl cpu hz

On Fri, Apr 25, 2025 at 03:30:04PM -0600, Theo de Raadt wrote:
> Ted Unangst <tedu@tedunangst.com> wrote:
> 
> > My CPU is too fast and I have trouble counting the zeros in sysctl hw.sensors.
> > 
> > For a frequency sensor greater than 10 MHz, display in Mhz instead.
> > Keep the old format when using -n, in case somebody scripted this.
> > 
> > hw.sensors.cpu0.frequency0=650.00 MHz
> > hw.sensors.cpu2.frequency0=700.00 MHz
> > hw.sensors.cpu4.frequency0=650.00 MHz
> 
> I suspect looking at the leading digit tells you the whole story.

... or use `systat -h sens`

We don't show the raw value in sysctl(8) but already adjusts the
sensor values so maybe we could also scale them but then it is even harder
for scripts to consume those values.

-- 
:wq Claudio