Re: lscpu uses unfitting "MHz" in frequency scaling item

Karel Zak <[email protected]>
Newsgroups org.kernel.vger.util-linux
Message-ID <x7r4hxbdqrn6dk2puidq5aqjj3qtpbk6eyowchked55nh2po23@mgevlbgk6zha>
On Sun, Jan 26, 2025 at 11:52:25AM GMT, Benno Schulenberg wrote:
> Since commit 9b9e4f5d06be55f4b9e1a52b448055933df92c6b
> from four years ago, lscpu lists also an item like this:
> 
>   CPU(s) scaling MHz: 61%
> 
> The printed value is a percentage, not a frequency, so the
> "MHz" should not be there, I think -- the percentage would
> be the same no matter whether the frequencies (in other items)
> are shown in kHz or MHz or GHz.

lscpu only uses MHz (as well as the kernel in /sys), but you are
correct that "CPU(s) frequency scaling" sounds better.

> I would provide a patch, but the message occurs in a dozen
> or more tests.  And probably the column name needs to be
> changed too, from SCALMHZ% to FREQSCAL% or SCALING%?

I am doubtful that we can alter column names. The usual recommendation
is to use "-o <colname>" to obtain output for the script. Changing a
column name would cause a backwardly incompatible modification. It may
be feasible to introduce a column alias, but I am uncertain if it
would be worthwhile.

    Karel



-- 
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.