Linux监控CPU和GPU

监控显卡占用情况
watch -n 2 nvidia-smi
cpupower 安装
sudo apt install linux-tools-common
CPU实时频率查看
watch -n 1 sudo cpupower monitor
查看cpu频率
watch -n 0 "cat /proc/cpuinfo | grep -i mhz"
查看cpu频率模式
cpupower frequency-info
查看当前所有CPU的信息
sudo cpupower -c all frequency-info
查看intel睿频的使能情况
cat /sys/devices/system/cpu/intel_pstate/no_turbo
查看内核支持的cpu策略
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
查看当前策略
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
设置所有CPU为性能模式
sudo cpupower -c all frequency-set -g performance
设置所有CPU为节能模式
sudo cpupower -c all frequency-set -g powersave
posted @ 2024-03-17 18:34  光辉233  阅读(78)  评论(0编辑  收藏  举报