[jbosscache-commits] JBoss Cache SVN: r5212 - benchmarks/benchmark-fwk/trunk.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Thu Jan 24 07:12:47 EST 2008


Author: manik.surtani at jboss.com
Date: 2008-01-24 07:12:47 -0500 (Thu, 24 Jan 2008)
New Revision: 5212

Modified:
   benchmarks/benchmark-fwk/trunk/cluster.sh
Log:


Modified: benchmarks/benchmark-fwk/trunk/cluster.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/cluster.sh	2008-01-24 12:06:18 UTC (rev 5211)
+++ benchmarks/benchmark-fwk/trunk/cluster.sh	2008-01-24 12:12:47 UTC (rev 5212)
@@ -1,29 +1,54 @@
 #!/bin/bash
 
-CACHE_DIST=${1}
-NUM_SERVERS=${2}
-COMMAND=start
+#####################################################
+# 
+# This script allows you to start multiple cache bench instances across a cluster
+#
+# Note that this requires BASH, as well as that all your instances have the cache
+# bench framework installed in the same location.  Finally, it requires SSH keys
+# set up such that executing commands using 
+#
+#     $ ssh hostName "command" 
+# 
+# will work without prompting for passwords, or any user input.
+#
+#####################################################
 
-SERVER_POSTFIX="qa.atl.jboss.com"
-SERVERS=( cluster01 cluster02 cluster03 cluster04 cluster05 cluster06 cluster07 cluster08 cluster09 cluster10 )
+## Some user-cnfigurable variables:
 
-CACHE_BENCHMARK_HOME=`pwd`/code/cache-bench-fwk
+# Defaults to the currently logged in user
+SSH_USER=${USER}
+
+# Cache instance you wish to run - taken from the command line.
+CACHE_DIST=${2}
+
+# Number of servers to launch on - taken from the command line.
+NUM_SERVERS=${3}
+
+COMMAND=${1}
+
+# the DNS domain of your servers
+DOMAIN="qa.atl.jboss.com"
+# the host names of available servers
+HOSTNAMES=( cluster01 cluster02 cluster03 cluster04 cluster05 cluster06 cluster07 cluster08 cluster09 cluster10 )
+
+CACHE_BENCHMARK_HOME=`pwd`
 echo "Using cache benchmark home: $CACHE_BENCHMARK_HOME"
 
 case $COMMAND in
     start)
          for ((idx=0; idx < NUM_SERVERS ; idx++))
          do
-            server="${SERVERS[idx]}"
-            echo "jboss: Startup CacheBenchmarkFramework@$server"
-            ssh $server.$SERVER_POSTFIX "cd ${CACHE_BENCHMARK_HOME} &&  ./runNode.sh &"
-            sleep 5
+            server="${HOSTNAMES[idx]}"
+            echo Starting CacheBenchmarkFramework on host ${server}
+            ssh ${SSH_USER}@${server}.${DOMAIN} "cd ${CACHE_BENCHMARK_HOME} &&  ./runNode.sh &"
+            sleep 2
          done
         ;;
     stop)
       echo "stop not implemented yet"
       ;;
     *)
-        echo "Usage: $0 [start] CACHE_DIST NUM_SERVERS"
+        echo "Usage: $0 [start | stop] [cache distribution to test] [number of servers to launch on]"
         ;;
 esac




More information about the jbosscache-commits mailing list