如何在多个 Linux 系统上同时运行相同的脚本 [英] How to run the same script on several Linux systems concurrently

查看:67
本文介绍了如何在多个 Linux 系统上同时运行相同的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个与延迟基准测试相关的问题.我在 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屋!

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