summaryrefslogtreecommitdiff
path: root/cpp/src/tests/cluster_test_scripts/cluster_check
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/tests/cluster_test_scripts/cluster_check')
-rwxr-xr-xcpp/src/tests/cluster_test_scripts/cluster_check17
1 files changed, 17 insertions, 0 deletions
diff --git a/cpp/src/tests/cluster_test_scripts/cluster_check b/cpp/src/tests/cluster_test_scripts/cluster_check
new file mode 100755
index 0000000000..5cc872a921
--- /dev/null
+++ b/cpp/src/tests/cluster_test_scripts/cluster_check
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Check that all members of a cluster are running
+
+source config.sh
+
+HOSTS=(`cat $CLUSTER_HOME/hosts`)
+PORTS=(`cat $CLUSTER_HOME/ports`)
+
+for ((i=0; i<${#HOSTS[*]}; ++i)); do
+ host=${HOSTS[$i]}
+ port=${PORTS[$i]}
+ ssh $host "$QPIDD -cp $port" > /dev/null || {
+ ret=1
+ echo "ERROR: broker not running $host:$port"
+ }
+done
+exit $ret