Turbostat Becomes Semi-Useful To Non-Root Users
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:
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.
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.
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:
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.
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.
7 Comments