-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_zygos_silo.sh
executable file
·72 lines (65 loc) · 3.5 KB
/
run_zygos_silo.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
72
#! /bin/bash
export RXU=${RXU:='8'}
export RXQ=${RXQ:='512'}
export TXQ=${TXQ:='512'}
export NITERS=${NITERS:='1'}
export SERVER=${SERVER:=192.168.1.200}
export OUTFILE=${OUTFILE:=0}
currdate=`date +%m_%d_%Y_%H_%M_%S`
function run
{
if [ $OUTFILE -eq 1 ]; then
mkdir -p "mcd_data/$currdate"
echo "Running $1 RXU=$RXU NITERS=$NITERS" > "mcd_data/$currdate/command.txt"
fi
for iter in `seq 1 1 $NITERS`;
do
#for rxu in `seq 0 2 200`;
for rxu in `seq 0 2 1`;
do
#ssh $SERVER "ethtool -C enp4s0f1 rx-usecs $rxu"
#ssh $SERVER "pkill memcached"
#pkill mutilate
echo "**** ITER="$iter "RXU="$rxu
intrstart1=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-1" | tr -s ' ' | cut -d ' ' -f 4 )
intrstart3=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-3" | tr -s ' ' | cut -d ' ' -f 6 )
intrstart5=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-5" | tr -s ' ' | cut -d ' ' -f 8 )
intrstart7=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-7" | tr -s ' ' | cut -d ' ' -f 10 )
intrstart9=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-9" | tr -s ' ' | cut -d ' ' -f 12 )
intrstart11=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-11" | tr -s ' ' | cut -d ' ' -f 14 )
intrstart13=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-13" | tr -s ' ' | cut -d ' ' -f 16 )
intrstart15=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-15" | tr -s ' ' | cut -d ' ' -f 18 )
python -u zygos_silo.py
intrend1=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-1" | tr -s ' ' | cut -d ' ' -f 4 )
intrend3=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-3" | tr -s ' ' | cut -d ' ' -f 6 )
intrend5=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-5" | tr -s ' ' | cut -d ' ' -f 8 )
intrend7=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-7" | tr -s ' ' | cut -d ' ' -f 10 )
intrend9=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-9" | tr -s ' ' | cut -d ' ' -f 12 )
intrend11=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-11" | tr -s ' ' | cut -d ' ' -f 14 )
intrend13=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-13" | tr -s ' ' | cut -d ' ' -f 16 )
intrend15=$(ssh $SERVER cat /proc/interrupts | grep -m 1 "enp4s0f1-TxRx-15" | tr -s ' ' | cut -d ' ' -f 18 )
intrtot1=$((intrend1-intrstart1))
intrtot3=$((intrend3-intrstart3))
intrtot5=$((intrend5-intrstart5))
intrtot7=$((intrend7-intrstart7))
intrtot9=$((intrend9-intrstart9))
intrtot11=$((intrend11-intrstart11))
intrtot13=$((intrend13-intrstart13))
intrtot15=$((intrend15-intrstart15))
if [ $OUTFILE -eq 1 ]; then
cp mutilate.log "mcd_data/$currdate/zyg_"$rxu\_$iter".log"
scp $SERVER:~/perf.out "mcd_data/$currdate/zyg_"$rxu\_$iter".perf"
echo $intrtot1",itr1" >> "mcd_data/$currdate/zyg_"$rxu\_$iter".perf"
echo $intrtot3",itr3" >> "mcd_data/$currdate/zyg_"$rxu\_$iter".perf"
echo $intrtot5",itr5" >> "mcd_data/$currdate/zyg_"$rxu\_$iter".perf"
echo $intrtot7",itr7" >> "mcd_data/$currdate/zyg_"$rxu\_$iter".perf"
echo $intrtot9",itr9" >> "mcd_data/$currdate/zyg_"$rxu\_$iter".perf"
echo $intrtot11",itr11" >> "mcd_data/$currdate/zyg_"$rxu\_$iter".perf"
echo $intrtot13",itr13" >> "mcd_data/$currdate/zyg_"$rxu\_$iter".perf"
echo $intrtot15",itr15" >> "mcd_data/$currdate/zyg_"$rxu\_$iter".perf"
fi
sleep 1
done
done
}
$1