Rev 62: added a benchmark script that launches via ssh in
http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Tue Feb 20 02:23:01 GMT 2007
------------------------------------------------------------
revno: 62
revision-id: tridge at samba.org-20070220022301-ae2ym88ba7ci5n9e
parent: tridge at samba.org-20070220022218-j14ntnf27hhsxn8h
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Tue 2007-02-20 13:23:01 +1100
message:
added a benchmark script that launches via ssh
added:
tests/bench-ssh.sh benchssh.sh-20070220022243-k2evfudau0j1bwmn-1
=== added file 'tests/bench-ssh.sh'
--- a/tests/bench-ssh.sh 1970-01-01 00:00:00 +0000
+++ b/tests/bench-ssh.sh 2007-02-20 02:23:01 +0000
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+if [ $# -lt 1 ]; then
+ echo "Usage: bench-ssh.sh <NODES> <OPTIONS>"
+ exit 1
+fi
+
+while :; do
+ if [ "`echo $1 | cut -c1`" = "-" -o $# -eq 0 ]; then break; fi
+ nodes="$nodes $1";
+ shift;
+done
+
+options=$*
+dir=`pwd`
+
+echo "Creating nodes-ssh.txt"
+rm -f nodes-ssh.txt
+count=0
+for h in $nodes; do
+ echo "$h:9001" >> nodes-ssh.txt
+ count=`expr $count + 1`
+done
+
+
+echo "Killing old processes"
+for h in $nodes; do
+ scp -q nodes-ssh.txt $h:$dir
+ ssh $h killall -q ctdb_bench
+done
+
+echo "Starting nodes"
+i=0
+for h in $nodes; do
+ if [ $i -eq `expr $count - 1` ]; then
+ ssh $h $dir/bin/ctdb_bench --nlist $dir/nodes-ssh.txt --listen $h:9001 $options
+ else
+ ssh -f $h $dir/bin/ctdb_bench --nlist $dir/nodes-ssh.txt --listen $h:9001 $options
+ fi
+ i=`expr $i + 1`
+done
+
+wait
More information about the samba-cvs
mailing list