如何在多个 Linux 系统上同时运行相同的脚本

编程入门 行业动态 更新时间:2024-10-28 18:34:30
本文介绍了如何在多个 Linux 系统上同时运行相同的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我有一个与延迟基准测试相关的问题.我在 5 台机器的集群中运行 Apache ZooKeeper(一个领导者,其余是追随者).还有另一台机器(客户端)用于对向协议发送请求进行排序.

I have a question related to latency benchmark. I run Apache ZooKeeper in a cluster of 5 machines (one leader and the rest are followers). There is another machine (client) used to sequence send requests to the protocol.

我设法运行了一个基准程序,该程序持续预选的时间,旨在同时且连续地向每个 ZooKeeper 服务器发送请求.当预先选择的时间过去后,我可以看到延迟结果.

I manage to run a benchmark program which lasts for pre-selected time, aims to send requests simultaneously and continuously to each ZooKeeper server. When the pre-selected time elapses, I can see the latency result.

然而,上述基准测试仅使用一台客户端机器来运行基准测试代码.现在,我想增加客户端机器的数量,让更多的机器同时发送请求.请注意,我想使用上面相同的代码来测试延迟.问题是如何同时在不同机器上运行基准代码?

However, the above benchmark uses only one client machine to run the benchmark code. Now, I want to increase the number of client machines to make more machines send requests simultaneously. Note that I want to use same code above to test the latency. The question is how to run the benchmark code from different machines simultaneously?

我猜它应该是一个同时在不同机器上运行的 Linux 脚本.

I guess it should be a Linux script which runs in different machines at the same time.

我的实验是使用通过 SSH 访问的远程 Linux 集群运行的.

My experiments are runusing remote Linux cluster which is accessed with SSH.

期待您的回音

干杯,

推荐答案

Ansible 当然是那种您正在寻找的工具

Ansible is certainly the kind of tool you're searching for

这篇关于如何在多个 Linux 系统上同时运行相同的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-18 17:30:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/943788.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   脚本   如何在   系统   Linux

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!