-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathruncputoolkit-single
39 lines (37 loc) · 1.58 KB
/
runcputoolkit-single
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
# saturate specific number of CPUs
# usage:
# ./runcputoolkit-single <num CPUs> <inst name>
# ./runcputoolkit-single 4 dw
echo "welcome1" | sudo -S ./turbostat 2> turbostat.txt &
collectl -scC --verbose -o T -o D >> collectl-cpuverbose.txt 2> /dev/null &
vmstat 2 100000000 | while read line; do echo "`date +%T`" "$line" ; done >> vmstat.txt &
mpstat -P ALL 2 100000000 | while read line; do echo "`date +%T`" "$line" ; done >> mpstat.txt &
./saturate $1 $2
./sql_detail &
./loadprof &
./gas &
./ash_detail &
./ash_workload &
#./snapper &
sleep 600
./kill_sessions.sh
kill -9 `ps -ef | grep -i "./sql_detail" | grep -v grep | awk '{print $2}'`
kill -9 `ps -ef | grep -i "./loadprof" | grep -v grep | awk '{print $2}'`
kill -9 `ps -ef | grep -i "./gas" | grep -v grep | awk '{print $2}'`
kill -9 `ps -ef | grep -i "./ash_detail" | grep -v grep | awk '{print $2}'`
kill -9 `ps -ef | grep -i "./ash_workload" | grep -v grep | awk '{print $2}'`
#kill -9 `ps -ef | grep -i "./snapper" | grep -v grep | awk '{print $2}'`
fuser -k vmstat.txt
fuser -k mpstat.txt
fuser -k collectl-cpuverbose.txt
echo "welcome1" | sudo -S kill -9 `ps -ef | grep -i "./turbostat" | grep -v grep | grep -v sudo | awk '{print $2}'`
mv sql_detail.txt $1-sess-sql_detail.txt
mv loadprof.txt $1-sess-loadprof.txt
mv gas.txt $1-sess-gas.txt
mv ash_detail.txt $1-sess-ash_detail.txt
mv ash_workload.txt $1-sess-ash_workload.txt
mv vmstat.txt $1-sess-vmstat.txt
mv mpstat.txt $1-sess-mpstat.txt
mv collectl-cpuverbose.txt $1-sess-collectl-cpuverbose.txt
mv turbostat.txt $1-sess-turbostat.txt
#mv snapper.txt $i-sess-snapper.txt