Skip to content

Commit

Permalink
tools/power turbostat: be more useful as non-root
Browse files Browse the repository at this point in the history
Don't exit if used this way:

sudo setcap cap_sys_nice,cap_sys_rawio=+ep ./turbostat
sudo chmod +r /dev/cpu/*/msr
./turbostat

note: cap_sys_admin is now also needed for the perf IPC counter:
sudo setcap cap_sys_admin,cap_sys_nice,cap_sys_rawio=+ep ./turbostat

Reported-by: Artem S. Tashkinov <aros@gmx.com>
Reported-by: Toby Broom <tbroom@outlook.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Len Brown committed Apr 17, 2022
1 parent 6397b64 commit 164d7a9
Show file tree
Hide file tree
Showing 2 changed files with 179 additions and 173 deletions.
2 changes: 1 addition & 1 deletion tools/power/x86/turbostat/turbostat.8
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ starts a new interval.
must be run as root.
Alternatively, non-root users can be enabled to run turbostat this way:

# setcap cap_sys_rawio=ep ./turbostat
# setcap cap_sys_admin,cap_sys_rawio,cap_sys_nice=+ep ./turbostat

# chmod +r /dev/cpu/*/msr

Expand Down
Loading

0 comments on commit 164d7a9

Please sign in to comment.