ddn-ime-evaluation/benchmark/ior_wrapper.sh

27 lines
535 B
Bash
Raw Normal View History

2018-11-13 11:36:15 +00:00
#!/bin/bash
. ./config.sh
IOR_PARAMS=$1
BENCHFILE=$2
HOST="$hostname"
PID=$$
NETOUTDIR="${BENCHFILE}_network"
NETOUTFILE="$NETOUTDIR/HOST:$HOST#PID:$PID.txt"
[[ ! -d $NETOUTDIR ]] && mkdir $NETOUTDIR || rm $NETOUTDIR/HOST*PID*.txt
function capture_network_state {
label=$1
echo "LABEL $label"
echo "TIMESTAMP $(date +%s)"
perfquery -x
cat /proc/net/dev
}
echo "" > $NETOUTFILE
echo "$( capture_network_state "START" )" &>> $NETOUTFILE
$IOR $IOR_PARAMS
echo "$( capture_network_state "STOP" )" &>> $NETOUTFILE