如何使用 wget 在服务器上生成恒定的工作负载

发布于 2024-10-04 14:43:46 字数 189 浏览 0 评论 0原文

嘿伙计们, 我想在服务器上生成恒定的工作负载 - 因此它在我的节点上利用一定量的 CPU。我尝试在脚本中通过循环“n”次重复获取我的 web 应用程序的主页来执行此操作。但是,这不会生成恒定的工作负载,而是工作负载不断变化。有没有办法通过编写某种脚本来使用 wget 生成恒定的工作负载?我可以使用“wget”编写什么类型的脚本?

感谢您的帮助!!

Hey folks,
I want to generate a constant workload on a server - so it utilizes a certain amount of CPU on my node. I tried doing this in a script by repeatedly fetching the homepage of my webapp in a loop 'n' times. However, this does not generate a constant workload, instead the workload continuously varies..Is there any way to generate a constant workload using wget by writing some kind of a script? What kind of scripts can i write using 'wget'?

Thanks for your help!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

上课铃就是安魂曲 2024-10-11 14:43:46

我正在使用 JMeter 来解决此类问题。您只需要找到应该运行的适量线程即可。

I'm using JMeter for these kind of problems. You just have to find the right amount of threads that should be running.

无尽的现实 2024-10-11 14:43:46

如果 JMeter 太复杂,无法满足您的需求,ab 是一个更简单的替代方案这很容易上手(但当然与 JMeter 功能不同)。

If JMeter is too involved for what you need, ab is a simpler alternative that's very easy to get started with (but of course isn't in the same league as JMeter feature-wise).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文