summaryrefslogtreecommitdiffstats
path: root/extras/benchmarking/local-script.sh
diff options
context:
space:
mode:
authorVikas Gorur <vikas@zresearch.com>2009-02-18 17:36:07 +0530
committerVikas Gorur <vikas@zresearch.com>2009-02-18 17:36:07 +0530
commit77adf4cd648dce41f89469dd185deec6b6b53a0b (patch)
tree02e155a5753b398ee572b45793f889b538efab6b /extras/benchmarking/local-script.sh
parentf3b2e6580e5663292ee113c741343c8a43ee133f (diff)
Added all files
Diffstat (limited to 'extras/benchmarking/local-script.sh')
-rwxr-xr-xextras/benchmarking/local-script.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/extras/benchmarking/local-script.sh b/extras/benchmarking/local-script.sh
new file mode 100755
index 00000000000..80a7fafe816
--- /dev/null
+++ b/extras/benchmarking/local-script.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# This script needs to be present on glusterfs mount, (ie, on every node which wants to run benchmark)
+
+ifilename="/dev/zero"
+ofilename="testdir/testfile.$(hostname)"
+result="output/output.$(hostname)"
+blocksize=128k
+count=8
+
+mkdir -p testdir;
+mkdir -p output;
+echo > ${result}
+while [ ! -e start-test ]; do
+ sleep 1;
+done;
+
+
+for i in $(seq 1 5); do
+ # write
+ dd if=${ifilename} of=${ofilename} bs=${blocksize} count=${count} 2>&1 | tail -n 1 | cut -f 8,9 -d ' ' >> ${result} ;
+ # read
+ #dd if=${ofilename} of=/dev/null bs=${blocksize} count=${count} 2>&1 | tail -n 1 | cut -f 8,9 -d ' ' >> ${result} ;
+done
+
+rm -f start-test