forked from gluster/gluster-performance-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
smallfile-test-for-fuse.sh
executable file
·51 lines (40 loc) · 1.84 KB
/
smallfile-test-for-fuse.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
LogFile="/var/log/PerfTestClient.log"
logger -s "The value of Varaible CLIENT is $CLIENT " 2>> $LogFile
if [ $# -ne 1 ]
then
echo; echo "Usage: $0 <Server node from where to collect the data>"
echo; echo "eg:"
echo; echo " # $0 server1.example.com output.txt output.txt"
exit
fi
ServerNode=$1
ssh root@$ServerNode "echo Smallfile TestStarts > /var/log/PerfTest.log 2>&1"
ssh root@$ServerNode "date >> /var/log/PerfTest.log 2>&1"
scp /root/collect-info.sh root@$ServerNode:/tmp/
ssh root@$ServerNode "/tmp/collect-info.sh >> /var/log/PerfTest.log 2>&1"
ssh root@$ServerNode "gluster volume info >> /var/log/PerfTest.log 2>&1"
cd /root/
Operations=( "create" "ls-l" "chmod" "stat" "read" "append" "rename" "delete-renamed" "mkdir" "rmdir" "cleanup" )
for((i=0; i<=4; i++))
do
logger -s "Small file test Iteration $i started" 2>> $LogFile
for ((j=0; j<${#Operations[@]} ; j++))
do
ansible-playbook -i hosts sync-and-drop-cache.yml > /dev/null
python /small-files/smallfile/smallfile_cli.py --operation ${Operations[$j]} --threads 8 --file-size 64 --files 5000 --top /gluster-mount --host-set "$(echo $CLIENT | tr -d "[] \'")"
ssh root@$ServerNode "gluster volume profile testvol info incremental >> /root/${Operations[$j]}-profile-fuse.txt"
done
done
mkdir -p /root/fuse-smallfile-profile
cd /root/
# Collect the Server logs
ssh root@$ServerNode "gluster volume info > /root/volume-info.txt"
scp root@$ServerNode:/root/*.txt /root/fuse-smallfile-profile/
tar cf fuse-smallfile-profile.tar fuse-smallfile-profile
ssh root@$ServerNode "echo Testover >> /var/log/PerfTest.log 2>&1"
ssh root@$ServerNode "date >> /var/log/PerfTest.log 2>&1"
scp root@$ServerNode:/var/log/PerfTest.log /root/
# Log the client config
echo "Client Data : " >> /root/PerfTest.log
/root/collect-info.sh >> /root/PerfTest.log