Linux CPU 功耗信息的查看位置与方法
核心结论
获取功耗的常用方法
RAPL 能量计数器(turbostat、powertop)
sudo turbostat --Summary --quiet --show PkgWatt --interval 1sudo turbostat --Summary --quiet --Joules --show Pkg_J --interval 60sudo turbostat --Summary --quiet --Joules --show Pkg_J your_cmdsudo powertop(适合定位高耗电进程与设备)。cpupower 频率/策略工具(间接反映功耗趋势)
watch -n 1 sudo cpupower monitorsudo cpupower -c all frequency-infosudo cpupower -c all frequency-set -g performance 或 powersave。硬件传感器(电压/温度,非功率)
sudo apt-get install lm-sensors && sudo sensors。