amanusk / s-tui

Terminal-based CPU stress and monitoring utility
https://amanusk.github.io/s-tui/
GNU General Public License v2.0
4.01k stars 139 forks source link

No power usage readings / Permission denied #167

Open galfwender opened 3 years ago

galfwender commented 3 years ago

When running as a normal user, s-tui does not show power usage and upon exiting the following errors are displayed in the terminal:

WARNING:root:ignoring (PermissionError(13, 'Permission denied'), '/sys/class/powercap/intel-rapl:0/') for file <class 'RuntimeWarning'>
WARNING:root:ignoring (PermissionError(13, 'Permission denied'), '/sys/class/powercap/intel-rapl:0:0/') for file <class 'RuntimeWarning'>
WARNING:root:ignoring (PermissionError(13, 'Permission denied'), '/sys/class/powercap/intel-rapl:0:1/') for file <class 'RuntimeWarning'>
WARNING:root:ignoring (PermissionError(13, 'Permission denied'), '/sys/class/powercap/intel-rapl:0:2/') for file <class 'RuntimeWarning'>
WARNING:root:ignoring (PermissionError(13, 'Permission denied'), '/sys/class/powercap/intel-rapl:1/') for file <class 'RuntimeWarning'>

Running as root works as expected, showing power usage without error. Arch 5.9.8-arch1-1.

amanusk commented 3 years ago

Thanks for opening the issue. I wonder if this is related to this https://platypusattack.com

Perhaps on newer kernels the permission to read the rapl files has been locked to root users only. This is a shame, but the info would still be accessible when running as root as you suggested

ejgallego commented 1 year ago

Duplicate of #179