From c79bc6756a744bc6af183546a0221eff79740ccf Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 11 Jun 1999 00:25:03 +0000 Subject: [PATCH] ping a client to make sure it is alive before launching a process on it. --- Tools/Construct/Parallel/fgfs-launch-clients | 14 ++++++++++++-- Tools/Construct/Parallel/fgfs-launch-server | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Tools/Construct/Parallel/fgfs-launch-clients b/Tools/Construct/Parallel/fgfs-launch-clients index 4f3f587b1..0eaab1c09 100755 --- a/Tools/Construct/Parallel/fgfs-launch-clients +++ b/Tools/Construct/Parallel/fgfs-launch-clients @@ -88,7 +88,12 @@ fi # launch a copy of the client process on each specified machine for i in $CLIENTS_RUDE; do - echo "Launching client process on $i" + if ping -c 1 -i 5 $i > /dev/null; then + echo "Launching client process on $i" + else + echo "client $i is currently down, skipping" + continue + fi LOG_FILE="${LOG_DIR}/client-$i.log" @@ -104,7 +109,12 @@ for i in $CLIENTS_RUDE; do done for i in $CLIENTS_NICE; do - echo "Launching client process on $i" + if ping -c 1 -i 5 $i > /dev/null; then + echo "Launching client process on $i" + else + echo "client $i is currently down, skipping" + continue + fi LOG_FILE="${LOG_DIR}/client-$i.log" diff --git a/Tools/Construct/Parallel/fgfs-launch-server b/Tools/Construct/Parallel/fgfs-launch-server index 1601873e1..5dd513d6e 100755 --- a/Tools/Construct/Parallel/fgfs-launch-server +++ b/Tools/Construct/Parallel/fgfs-launch-server @@ -83,4 +83,4 @@ echo $SERVER_PORT > $MASTER_ON echo "server is now running in background:" echo " host = $SERVER_HOST" echo " pid = $SERVER_PID" -echo " port = $SERVER_PORT" \ No newline at end of file +echo " port = $SERVER_PORT" -- 2.39.5