mirror of
https://gitlab.com/manzerbredes/paper-lowrate-iot.git
synced 2025-04-17 11:23:00 +00:00
24 lines
696 B
Bash
Executable file
24 lines
696 B
Bash
Executable file
#!/bin/bash
|
|
|
|
|
|
logFile="$(dirname $(readlink -f $0))"/simLogs.txt
|
|
|
|
|
|
getValue () {
|
|
line=$(echo "$1" | grep "Simulation para"|sed "s/Simulation parameters: //g")
|
|
key=$2
|
|
echo "$line"|awk 'BEGIN{RS=" ";FS=":"}"'$key'"==$1{gsub("\n","",$0);print $2}'
|
|
}
|
|
|
|
IFS=$'\n'
|
|
for cmd in $(cat $logFile|grep "Simulation parameters")
|
|
do
|
|
nodeName=$(getValue $cmd serverNodeName)
|
|
from=$(getValue $cmd startSim)
|
|
to=$(getValue $cmd endSim)
|
|
vmSize=$(getValue $cmd vmSize)
|
|
nbSensors=$(getValue $cmd nbSensors)
|
|
simKey=$(getValue $cmd simKey)
|
|
./recordEnergy.sh nova $nodeName $from $to nova $nodeName $from $to "${simKey}_${vmSize}VMSIZE_${nbSensors}NBSENSORS_${from}${to}.csv"
|
|
done
|
|
|