首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何自动改变CPU的频率?

如何自动改变CPU的频率?
EN

Ask Ubuntu用户
提问于 2022-09-03 05:48:18
回答 1查看 54关注 0票数 1

我试着用Ubuntu操作系统来制作服务器,我不希望CPU总是以高频率运行,只是为了节省电费。

我希望它在没有负载的情况下以低频工作,如果服务器上有负载,则工作频率较高。

EN

回答 1

Ask Ubuntu用户

发布于 2022-09-03 05:59:36

有一个包"cpulimit“可以用来限制消耗过多资源的特定进程的cpu百分比。

在安装之后

代码语言:javascript
复制
sudo apt update && sudo apt install cpulimit

您可以使用它来限制1-进程(按ID)或2-进程(根据可执行文件的名称)或3-的资源消耗分别使用-p、-e和-P的路径。

这些例子来自手册:

代码语言:javascript
复制
cpulimit -e foo -l 50
              limits  the CPU usage of the process by acting on the executable
              program file (note: the argument "--bar" is omitted)

cpulimit -p 1234 -l 50
              limits the CPU usage of the process by acting  on  its  PID,  as
              shown by ps(1)

cpulimit -P /usr/bin/foo -l 50
              same as -e but uses the absolute path name
票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1427278

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档