]> git.baikalelectronics.ru Git - kernel.git/commit
tools/power turbostat: modprobe msr, if needed
authorLen Brown <len.brown@intel.com>
Tue, 24 Mar 2015 20:37:35 +0000 (16:37 -0400)
committerLen Brown <len.brown@intel.com>
Sat, 18 Apr 2015 18:20:51 +0000 (14:20 -0400)
commit55dbfe0f0784e21c8ac135d049b870267a572a01
tree994b93a6ba3b49cdd435c2058938f0d3ba6ad0c2
parentdf521bdccb4876d079958e716c65d231573e4ba0
tools/power turbostat: modprobe msr, if needed

Some distros (Ubuntu) ship the msr driver as a module.
If turbosat is run as root on those systems, and discovers
that there is no /dev/cpu/cpu0/msr, it will now "modprobe msr"
for the user.

If not root, the modprobe attempt will fail, and turbostat will exit as before:

turbostat: no /dev/cpu/0/msr, Try "# modprobe msr" : No such file or directory

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