From a9c142f818898e3aa25137edd15d5336f652a6a7 Mon Sep 17 00:00:00 2001 From: House of Vanity Date: Tue, 20 Jun 2023 02:35:46 +0300 Subject: [PATCH] Update README.md --- README.md | 79 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index ded847c..f995550 100644 --- a/README.md +++ b/README.md @@ -5,50 +5,53 @@ Parallel SSH executor in Rust. Read hosts from `known_hosts` ``` [ab@test debug]$ ./rexec -k admin-gce-sc.* --help -Usage: rexec [OPTIONS] --kh --command +Parallel SSH executor in Rust + +Usage: rexec [OPTIONS] --expression --command Options: - -u, --username [default: ab] - -k, --kh Use known_hosts to build servers list - -c, --command Command to execute on servers - --code Show exit code ONLY - --noconfirm Don't ask for confirmation - -p, --parallel [default: 100] - -h, --help Print help - -V, --version Print version - - -[ab@test debug]$ ./rexec -k admin-gce-sc.* -c uptime -u ab + -u, --username [default: ab] + -k, --known-hosts Use known_hosts to build servers list + -e, --expression Expression to build server list + -c, --command Command to execute on servers + --code Show exit code ONLY + -f, --noconfirm Don't ask for confirmation + -p, --parallel [default: 100] + -h, --help Print help + -V, --version Print version + + +[ab@test debug]$ ./rexec -u ab -k -c uptime -e admin.* -f [INFO ] Matched hosts: [INFO ] admin-gce-sc-1.lca-prod.** [35.211.27.195] [INFO ] admin-gce-sc-1.mmk-prod.** [35.211.79.202] -[ERROR] admin-gce-sc-1.led-prod.** couldn't ve resolved. +[ERROR] admin-gce-sc-1.led-prod.** couldn't be resolved. [INFO ] admin-gce-sc-1.msq-dev.** [35.211.0.24] -[ERROR] admin-gce-sc-1.hui-dev.** couldn't ve resolved. -Continue on following 3 servers? yes -[INFO ] +[ERROR] admin-gce-sc-1.hui-dev.** couldn't be resolved. [INFO ] Run command on 3 servers. -[INFO ] - -[INFO ] admin-gce-sc-1.mmk-prod.** -[INFO ] Code 0 -[INFO ] STDOUT: - 10:20:02 up 284 days, 23:04, 0 users, load average: 0.00, 0.08, 0.16 - -[INFO ] STDERR: - -[INFO ] admin-gce-sc-1.msq-dev.** -[INFO ] Code 0 -[INFO ] STDOUT: - 10:20:03 up 186 days, 23:52, 1 user, load average: 0.12, 0.12, 0.16 - -[INFO ] STDERR: - -[INFO ] admin-gce-sc-1.lca-prod.** -[INFO ] Code 0 -[INFO ] STDOUT: - 10:20:03 up 292 days, 8:35, 0 users, load average: 0.57, 0.49, 0.47 - -[INFO ] STDERR: + + +[INFO ] admin.gnb-prod.** +Code 0 +STDOUT: + 23:31:21 up 294 days, 14:14, 0 users, load average: 0.53, 0.64, 0.52 + +STDERR: + +[INFO ] admin.abe-prod.** +Code 0 +STDOUT: + 23:31:22 up 154 days, 9:24, 0 users, load average: 0.31, 0.25, 0.18 + +STDERR: + +[INFO ] admin-gce-be-1.toy-prod.** +Code 0 +STDOUT: + 23:31:22 up 98 days, 6:20, 0 users, load average: 0.88, 0.74, 0.80 + +STDERR: +no server running on /tmp/tmux-1019/default +open terminal failed: not a terminal ```