3 cd /bottlenecks/rubbos/rubbos_scripts/1-1-1
4 source set_bottlenecks_rubbos_env.sh
7 # delay inbetween snapshots
11 # central host to send results to
12 analysis_host=$BENCHMARK_HOST
14 # monitoring start/end time in format YYYYmmddHHMMSS (20050920152059)
18 # data filename suffix
19 data_filename_suffix="`hostname`-${start_time}.data"
22 sar_filename=$RUBBOS_APP/sar-${data_filename_suffix}
25 iostat_filename=$RUBBOS_APP/iostat-${data_filename_suffix}
28 ps_filename=$RUBBOS_APP/ps-${data_filename_suffix}
30 # date command in predefined format
31 date_cmd="date +%Y%m%d%H%M%S"
34 # TEST MODE: start_time will be 2 seconds from launch, end time 5 seconds
35 #start_time=`expr $date \+ 2`
36 #end_time=`expr $date \+ 5`
39 #echo Current timestamp: $date
40 #echo Start timestamp: $start_time
41 #echo End timestamp: $end_time
44 # make sure they have all arguments
45 if [ "$end_time" = "" ]; then
46 echo usage: $0 \<delay\> \<analysis host\> \<start time\> \<end time\>
47 echo start_time and end_time are in YYYYmmddHHMMSS format
48 echo ie: 9/30/2005, 2:31:54pm = 20050930143154
53 # wait until start time
54 #echo -n Waiting until start time \(${start_time}\)..
56 while [ $date -lt $start_time ]; do
64 sudo nice -n -1 $SYSSTAT_HOME/bin/iostat -dxtk $delay > ${iostat_filename} &
68 # run test until end time
69 #echo -n Running test until end time \(${end_time}\)..
70 while [ $date -lt $end_time ]; do
79 sudo kill -9 $iostat_pid
84 sudo chmod g+w ${iostat_filename}
85 sudo chmod o+r ${iostat_filename}
88 # send data to analysis host
89 #echo Sending data to analysis host..
90 #scp -o StrictHostKeyChecking=no -o BatchMode=yes ${sar_filename} ${analysis_host}:/tmp/elba/rubbos
91 #scp -o StrictHostKeyChecking=no -o BatchMode=yes ${ps_filename} ${analysis_host}:/tmp/elba/rubbos