forked from jharriga/GCrate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunIOworkload.sh
71 lines (57 loc) · 1.95 KB
/
runIOworkload.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
#
#####################################################################
# Bring in other script files
myPath="${BASH_SOURCE%/*}"
if [[ ! -d "$myPath" ]]; then
myPath="$PWD"
fi
# Variables
source "$myPath/vars.shinc"
# Functions
source "$myPath/Utils/functions.shinc"
# Create log file - named in vars.shinc
if [ ! -d $RESULTSDIR ]; then
mkdir -p $RESULTSDIR || \
error_exit "$LINENO: Unable to create RESULTSDIR."
fi
touch $LOGFILE || error_exit "$LINENO: Unable to create LOGFILE."
updatelog "${PROGNAME} - Created logfile: $LOGFILE" $LOGFILE
# Record STARTING cluster capacity stats
var1=`echo; ceph df | head -n 5`
var2=`echo; ceph df | grep rgw.buckets.data`
updatelog "$var1$var2" $LOGFILE
# Record GC stats
var3=`radosgw-admin gc list --include-all | wc -l`
updatelog "Pending GC's == $var3" $LOGFILE
updatelog "START: pollGC backgrd process" $LOGFILE
# Poll ceph RGW GC status (in a bkrgd process)
Utils/pollGC.sh "${pollinterval}" "${LOGFILE}" &
PIDpollGC=$!
# VERIFY it successfully started
sleep 2
if ! ps -p $PIDpollGC > /dev/null; then
error_exit "pollGC.sh FAILED. Exiting"
fi
updatelog "pollGC backgrd processID $PIDpollGC" $LOGFILE
updatelog "START: cosbench launched" $LOGFILE
# Start the COSbench I/O workload
./Utils/cos.sh ${myPath}/${RUNTESTxml} $LOGFILE
updatelog "END: cosbench done" $LOGFILE
# Now kill off the POLLCEPH background process
kill $PIDpollGC; kill $PIDpollGC
updatelog "Stopped POLLGC bkgrd process" $LOGFILE
# Record ENDING cluster capacity stats
var1=`echo; ceph df | head -n 5`
var2=`echo; ceph df | grep rgw.buckets.data`
updatelog "$var1$var2" $LOGFILE
# Record GC stats
var3=`radosgw-admin gc list --include-all | wc -l`
updatelog "Pending GC's == $var3" $LOGFILE
# waits for number of pending GCs to reach 1
Utils/completedGC.sh "${pollinterval}" "${LOGFILE}"
# Record FINAL cluster capacity stats
var1=`echo; ceph df | head -n 5`
var2=`echo; ceph df | grep rgw.buckets.data`
updatelog "$var1$var2" $LOGFILE
# END