Turbostat Becomes Semi-Useful To Non-Root Users

Written by Michael Larabel in Intel on 10 April 2024 at 12:41 PM EDT. 7 Comments
INTEL
The turbostat utility is useful on Linux systems for reporting idle/power-state statistics, temperatures, and other useful metrics for modern CPUs. It's also able to dive deeper and provide various MSR values and counters and other intriguing CPU bits. For much of these features root access is required and thus turbostat has bailed out up to this point if not running as root. But as a number of the metrics can still be obtained without root access, turbostat is finally being adapted to handle running better as a non-root user.

While the functionality will be limited if lacking root access, patches working their way to the upstream kernel rework various checks so that non-root users can now execute turbostat. This is better than the current behavior of just emitting some errors when not running as root:

turbostat as non-root currently


So it's an improvement depending upon what you're trying to achieve with the turbostat CLI utility. The updated patches also add new command-line arguments of "--no-msr" and "--no-perf" where even root users can see that the CPU MSR driver use is optional. There are also some other changes with these forthcoming Turbostat updates such as reading the RAPL (Run-Time Average Power Limiting) counters via the Perf API and more.

turbostat as root


The non-root user support and other improvements were submitted to the Linux power management subsystem branch this week. In turn they should premiere with the Linux 6.10 kernel this summer.

Now if only dmidecode could be more robust for non-root use along with other utilities that can get by in varying ways without root access.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week