如何在Red Hat Linux机器上设置CPU负载? [英] How to set CPU load on a Red Hat Linux box?
问题描述
我有一个 RHEL 框,我需要将它放在适当的可变范围内CPU负载(50%-75%).
解决此问题的最佳方法是什么?有一个我不知道的程序可以执行此操作吗?我很高兴编写一些C代码来实现这一目标,但我不知道哪种系统调用会有所帮助.
这正是您所需要的: http://weather.ou.edu/~apw/projects/stress/
在主页上: "stress是用于POSIX系统的简单工作负载生成器.它对系统施加了可配置的CPU,内存,I/O和磁盘压力.它是用C编写的,并且是GPL许可的免费软件." >
I have a RHEL box that I need to put under a moderate and variable amount of CPU load (50%-75%).
What is the best way to go about this? Is there a program that can do this that I am not aware of? I am happy to write some C code to make this happen, I just don't know what system calls will help.
This is exactly what you need: http://weather.ou.edu/~apw/projects/stress/
From the homepage: "stress is a simple workload generator for POSIX systems. It imposes a configurable amount of CPU, memory, I/O, and disk stress on the system. It is written in C, and is free software licensed under the GPL."
这篇关于如何在Red Hat Linux机器上设置CPU负载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!