Skip to content

Conversation

@graysky2
Copy link
Contributor

@graysky2 graysky2 commented Jan 6, 2026

📦 Package Details

Maintainer: me
(You can find this by checking the history of the package Makefile.)

Description:

Turbostat is a Linux utility that reports processor topology, real operating frequency, idle states, temperature, and power usage on x86 processors. It is useful to see actual hardware‑measured CPU behavior, not the policy targets exposed by cpufreq. It shows true core frequencies, boost behavior, idle‑state residency, thermal and power telemetry, and throttling indicators, all sampled directly from MSRs.

This makes it far more accurate than tools like lscpu or /sys frequency files, especially when diagnosing boost limits, thermal constraints, or governor behavior under load.

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc


🧪 Run Testing Details

  • OpenWrt Version: SNAPSHOT
  • OpenWrt Target/Subtarget: x86/64-glib
  • OpenWrt Device: Intel N150 based PC

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

@GeorgeSapkin
Copy link
Member

Please change the commit subject to turbostat: add new package

define Package/turbostat/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(LINUX_DIR)/tools/power/x86/turbostat/turbostat $(1)/usr/bin/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add a basic CI test script to check the version or similar?

Copy link
Contributor Author

@graysky2 graysky2 Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, is the goal to just confirm successful build? Please see latest push.

@graysky2 graysky2 changed the title add new package: turbostat turbostat: add new package Jan 6, 2026
Turbostat is a Linux utility that reports processor topology, real
operating frequency, idle states, temperature, and power usage on
x86 processors. It is useful to see actual hardware‑measured CPU
behavior, not the policy targets exposed by cpufreq. It shows true core
frequencies, boost behavior, idle‑state residency, thermal and power
telemetry, and throttling indicators, all sampled directly from MSRs.

This makes it far more accurate than tools like lscpu or /sys frequency
files, especially when diagnosing boost limits, thermal constraints,
or governor behavior under load.

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc

Signed-off-by: John Audia <therealgraysky@proton.me>
@BKPepe
Copy link
Member

BKPepe commented Jan 7, 2026

Thanks for the patch. We already have plenty of packages here, and most of them are not actively maintained. I'm not claiming that turbostat from the Linux kernel will necessarily become unmaintained or unsupported, but is it really useful to include it in OpenWrt given that it only supports x86 architectures? I'm not entirely sure who among OpenWrt x86 users would actually use it.

In the commit description, you mentioned:

like lscpu or /sys frequency files, especially when diagnosing boost limits, thermal constraints, or governor behavior under load.

I believe lscpu might be sufficient for OpenWrt use cases. What do you think? Could we consider alternatives that work across more architectures?

@graysky2
Copy link
Contributor Author

graysky2 commented Jan 7, 2026

Hi @BKPepe - IMO it is worth including. It is helpful in troubleshooting scaling issues and reading power consumption levels. I do recognize that it is x86 only but I am unaware of a util like that that works with more architectures. If adding another package is undisirable, how do you feel about a split Makefile rolling this in with cpupower? This is how Arch Linux packages the two, in a collective package called linux-utils.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants