首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >质量终端控制

质量终端控制
EN

Ask Ubuntu用户
提问于 2017-02-02 17:28:24
回答 1查看 205关注 0票数 1

我有1000倍Ubuntu 16集装箱运行在码头压力测试,一个软件,我们正在测试。

我可以一次一个地进入这些盒子里.但是我正在寻找一种方法来自动化这个内部僵尸网络的命令和控制。是否有命令行镜像工具?类似于键入命令sudo shutdown -r nowsudo service myService restart并从所有1000x终端获得响应.即使它只是命令的返回代码?

到目前为止,我已经调查了:

  • 期望脚本
  • 木偶/厨师
  • 基于润湿编写自己的
EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2017-02-02 21:26:48

pssh

PSSH提供OpenSSH和相关工具的并行版本。包括pssh、pscp、prsync、pnuke和pslurp。该项目包括psshlib,它可以在自定义应用程序中使用。源代码是用Python编写的,可以从以下地方克隆:

git克隆http://code.google.com/p/parallel-ssh/

Python2.4和更高版本(包括Python3.1及更高版本)支持PSSH。它最初是Brent N. Chun编写和维护的。由于日程繁忙,布伦特于2009年10月将维修工作移交给安德鲁·McNabb。

代码语言:javascript
复制
Usage: pssh [OPTIONS] command [...]

Options:
  --version             show program's version number and exit
  --help                show this help message and exit
  -h HOST_FILE, --hosts=HOST_FILE
                        hosts file (each line "[user@]host[:port]")
  -H HOST_STRING, --host=HOST_STRING
                        additional host entries ("[user@]host[:port]")
  -l USER, --user=USER  username (OPTIONAL)
  -p PAR, --par=PAR     max number of parallel threads (OPTIONAL)
  -o OUTDIR, --outdir=OUTDIR
                        output directory for stdout files (OPTIONAL)
  -e ERRDIR, --errdir=ERRDIR
                        output directory for stderr files (OPTIONAL)
  -t TIMEOUT, --timeout=TIMEOUT
                        timeout (secs) (0 = no timeout) per host (OPTIONAL)
  -O OPTION, --option=OPTION
                        SSH option (OPTIONAL)
  -v, --verbose         turn on warning and diagnostic messages (OPTIONAL)
  -A, --askpass         Ask for a password (OPTIONAL)
  -x ARGS, --extra-args=ARGS
                        Extra command-line arguments, with processing for
                        spaces, quotes, and backslashes
  -X ARG, --extra-arg=ARG
                        Extra command-line argument
  -i, --inline          inline aggregated output and error for each server
  --inline-stdout       inline standard output for each server
  -I, --send-input      read from standard input and send as input to ssh
  -P, --print           print output as we get it

https://code.google.com/archive/p/parallel-ssh/

示例用法:

代码语言:javascript
复制
 pssh -i -h hosts.txt echo "hello, world"
票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/879125

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档