如何在Red Hat Linux机器上设置CPU负载? [英] How to set CPU load on a Red Hat Linux box?

查看:97
本文介绍了如何在Red Hat Linux机器上设置CPU负载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆