CPU性能工具
1.s-tui
s-tui是一款开源软件,关于它的简介和安装方法可以参考 《s-tui:在 Linux 中监控 CPU 温度、频率、功率和使用率的终端工具》
sudo apt install python-pip3 stress
sudo pip3 install s-tui
sudo s-tui
##功率:package-0,0 / 1,0分别显示2颗CPU功耗,dram,0、dram,1对应各自内存控制器所插的内存(注:由于Dell Precision 7920 Tower工作站多达24个DIMM槽,内存功耗这项监控不准);
2 cpupower
#1.安装cpupower
sudo apt install linux-tools-common
#2.CPU实时频率查看
watch -n 1 sudo cpupower monitor
#3.查看当前所有CPU的信息
sudo cpupower -c all frequency-info
#4.设置所有CPU为性能模式
sudo cpupower -c all frequency-set -g performance
#5.设置所有CPU为节能模式
sudo cpupower -c all frequency-set -g powersave
3.cpufrequtils
##1.安装cpufrequtils
sudo apt-get install cpufrequtils
##2.查看当前cpu的状态
cpufreq-info
##3.把cpu调整到性能模式
sudo cpufreq-set -g performance
4. Ubuntu更换内核版本
##查看系统内核版本
uname -r
##查看目前可安装版本
apt-cache search linux| grep 5.4.0-84
##安装内核版本
sudo apt-get install linux-headers-5.4.0-84-generic linux-image-5.4.0-84-generic linux-modules-extra-5.4.0-84-generic linux-tools-5.4.0-84-generic
##安装完成后查看此时内核版本有几个
dpkg --get-selections | grep linux-image
##修改内核启动顺序
vim /etc/default/grub
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.4.0-84-generic"
#GRUB_TIMEOUT_STYLE=hidden
##更新一下内核启动更新程序
sudo update-grub
##禁止内核更新
sudo apt-mark hold linux-image-5.4.0-84-generic
sudo apt-mark hold linux-modules-extra-5.4.0-84-generic
##卸载其他状态为install内核版本
sudo apt-get remove linux-image-5.4.0-107-generic
sudo apt-get remove linux-image-unsigned-5.4.0-107-generic
##删除之后通过以下查看,直到删完
dpkg --get-selections | grep linux
#删除状态为deinstall内核版本
sudo dpkg -P linux-image-5.4.0-107-generic
##重启
reboot
##进入的时候选择 5.4.0-84-generic 版本
本文来自博客园,作者:orangeScc,转载请注明原文链接:https://www.cnblogs.com/ashScc/p/16638391.html
分类:
Linux
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 终于写完轮子一部分:tcp代理 了,记录一下
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理