summaryrefslogtreecommitdiffstats
path: root/legacy/performance/performance_nfs_sanity.sh
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrambk@gmail.com>2011-07-13 18:24:31 +0530
committerRaghavendra Bhat <raghavendrambk@gmail.com>2011-07-13 18:24:31 +0530
commitd8ba6881617e9abc01e0fa13bb7e88037fb35315 (patch)
treebd384eff4e68e4129342b6c741d3c58febdf508f /legacy/performance/performance_nfs_sanity.sh
parentcedf827e511a41f6335fbf3e66ce111eb01bd1d0 (diff)
legacy performance scripts
Diffstat (limited to 'legacy/performance/performance_nfs_sanity.sh')
-rwxr-xr-xlegacy/performance/performance_nfs_sanity.sh85
1 files changed, 85 insertions, 0 deletions
diff --git a/legacy/performance/performance_nfs_sanity.sh b/legacy/performance/performance_nfs_sanity.sh
new file mode 100755
index 0000000..103f578
--- /dev/null
+++ b/legacy/performance/performance_nfs_sanity.sh
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+#GIT_DIR="/opt/users/nfs_performance/glusterfs.git"
+GIT_DIR="/root/sanity/glusterfs.git"
+GIT_FILE="/tmp/git_head_`date +%F`"
+
+rm /tmp/git_head*
+
+function update_git ()
+{
+
+ cd $GIT_DIR
+ echo $PWD >> $GIT_FILE
+ echo "preveious head is at:"
+ /usr/bin/git show >> $GIT_FILE
+ if [ $? -ne 0 ]; then
+ echo "git show failed. Exiting"
+ return 11;
+ fi
+
+ echo "Doing git reset:"
+ /usr/bin/git reset --hard >> $GIT_FILE
+ if [ $? -ne 0 ]; then
+ echo "git reset failed. Exiting."
+ return 11;
+ fi
+
+ echo "Doing git pull:"
+ /usr/bin/git pull >> $GIT_FILE
+ if [ $? -ne 0 ]; then
+ echo "git pull failed"
+ return 11;
+ else
+ echo "git pull succeeded"
+ fi
+
+ echo "Current head is at:"
+ /usr/bin/git show >> $GIT_FILE
+ if [ $? -ne 0 ]; then
+ echo "git show failed, but continuing"
+ return 0;
+ else
+ return 0;
+ fi
+}
+
+function dht_sanity ()
+{
+ echo "DHT testing"
+ sleep 1
+ /opt/users/nightly_performance/nightly_performance.sh -t dht -c 1 -m fuse 2>&1 | tee /mnt/runlog.dht
+ echo "DHT done"
+ sleep 1
+ return 0;
+}
+
+function afr_sanity ()
+{
+ echo "AFR testing"
+ sleep 1
+ /opt/users/nightly_performance/nightly_performance.sh -t afr -c 1 -m fuse 2>&1 | tee /mnt/runlog.afr
+ echo "AFR done"
+ sleep 1
+}
+
+function stripe_sanity ()
+{
+ echo "stripe testing"
+ sleep 1
+ /opt/users/nightly_performance/nightly_performance.sh -t stripe -c 1 -m fuse 2>&1 | tee /mnt/runlog.stripe
+ echo "stripe done"
+ sleep 1
+}
+
+function main ()
+{
+
+ update_git;
+ dht_sanity;
+ afr_sanity;
+ stripe_sanity;
+ return 0;
+}
+
+main "$@" \ No newline at end of file