tools/power turbostat: relax dependency on root permission
authorLen Brown <len.brown@intel.com>
Fri, 15 Aug 2014 04:36:50 +0000 (00:36 -0400)
committerLen Brown <len.brown@intel.com>
Mon, 9 Feb 2015 21:41:16 +0000 (16:41 -0500)
commit98481e79b60a50d699b79292ff1b7e56e7fa8425
tree148ec049930bed66b08ccbfa1dcddc11ebd841c4
parentbfa76d49576599a4b9f9b7a71f23d73d6dcff735
tools/power turbostat: relax dependency on root permission

For turbostat to run as non-root, it needs to permissions:

1. read access to /dev/cpu/*/msr
via standard user/group/world file permissions

2. CAP_SYS_RAWIO
eg.  # setcap cap_sys_rawio=ep turbostat

Yes, running as root still works.

Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c