From b425736e5ccb0eeba7a70df332a82dff619a42a8 Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 10 Sep 2018 16:24:10 -0400 Subject: ... --- scripts/run_client.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/run_client.sh b/scripts/run_client.sh index 9e7d1db..2ecdf31 100755 --- a/scripts/run_client.sh +++ b/scripts/run_client.sh @@ -17,6 +17,7 @@ copy_from_remote_pat="rsync -avz @: \"; '$proj_client_path' --idx \"\" --iter -1 --max-async 3" reset_remote_pat="pgrep -f '$proj_client_bin' | xargs kill -9" +node_id_step=1 function join { local IFS="$1"; shift; echo "$*"; } function split { @@ -143,7 +144,7 @@ function _remote_start { local client_port="$5" local client_ip="$6" local cmd="${run_remote_pat///$rworkdir}" - cmd="${cmd///$node_id}" + cmd="${cmd///$((node_id * node_id_step))}" cmd="${cmd///$node_ip:$client_port}" execute_remote_cmd_pid "$client_ip" "$cmd" \ "\"$rworkdir/$remote_log\"" > "$workdir/${node_id}.pid" @@ -313,6 +314,7 @@ exe-remote-pat:,\ run-remote-pat:,\ reset-remote-pat:,\ force-peer-list,\ +node-id-step:,\ help' PARSED=$(getopt --options "$SHORT" --longoptions "$LONG" --name "$0" -- "$@") @@ -334,6 +336,7 @@ while true; do --exe-remote-pat) exe_remote_pat="$2"; shift 2;; --run-remote-pat) run_remote_pat="$2"; shift 2;; --reset-remote-pat) reset_remote_pat="$2"; shift 2;; + --node-id-step) node_id_step="$2"; shift 2;; --help) print_help; shift 1;; --) shift; break;; *) die "internal error";; -- cgit v1.2.3-70-g09d2