Code

Turbostat plugin: relax dependency on root
authorVincent Brillault <git@lerya.net>
Wed, 11 Feb 2015 22:19:53 +0000 (23:19 +0100)
committerVincent Brillault <git@lerya.net>
Sat, 28 Feb 2015 06:35:42 +0000 (07:35 +0100)
commitdaebff6bb861acc0ed7390bcb101b6e9af85efff
treef0d8875b13ebf40172f7f8d7dfc0303ae77ec5df
parentbb1b94f90e492d25aebe88949075c629fc7fe03d
Turbostat plugin: relax dependency on root

Backporting commit 98481e79b60a50d699b79292ff1b7e56e7fa8425
from Len Brown <len.brown@intel.com>

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 $(which collectd)

Yes, running as root still works.
src/turbostat.c