在 Linux 上生成特定的 cpu、磁盘和网络利用率工作负载
我正在寻找一个 Linux 工具来生成具有预定义 CPU、磁盘和网络利用率的工作负载。例如,我需要在 Ubuntu 工作站上将 CPU 利用率保持在 55%,磁盘利用率保持在 30%,持续一分钟。有没有什么工具可以为CPU、磁盘和网络生成这样的工作负载?
ps 最好有一个工具来完成上述所有功能。但是,如果有针对 cpu、磁盘和网络的不同工具,如果您能分享链接,我将很高兴。
I am looking for a Linux tool to generate workloads with pre-defined cpu, disk and network utilization. For example, I need to keep my cpu utilization on 55% and the disk utilization on 30% for a minute on my Ubuntu workstation. Is there any tool to generate such workloads for cpu, disk and net?
p.s. It is preferable to have one tool to do all the above mentioned features. But, if there are different tools for cpu, disk and net, I will be happy if you could share the links.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于没有
占用30%的系统资源
功能,我认为没有相应的工具。 Linux 内核根据调度机制等因素提供尽可能多的所需资源和免费资源。像您正在寻找的工具必须:
不同的负载量可能会可以用动态睡眠等等来完成,但是难度很高,效率很低。
例如,对于磁盘 IO,您可以测试 IOZone,并稍微调整一下参数。
As there is no
take 30% of system resources
function, i don't think there is a corresponding tool. The Linux kernel gives out as much resources as needed and free, depending on the scheduling mechanism and more.A tool like you are looking for would have to:
The different amount of load could be accomplished with dynamic sleeps, and more, but the difficulty is very high, the efficiency very low.
For disk IO you could test IOZone for example, and play a little bit with the parameters.