blob: a7e083f0e04d0203a27bbd1fc12adca9bf82c564 [file] [log] [blame]
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source ../multi-host.conf
LOGPREFIX=$1
STRATEGY=$2
ndnping -c 25 /B &> logs/${LOGPREFIX}_ping_A.log
LOSS=$(sed -n 's/.*nacked, \([^,]*\) lost.*/\1/p' logs/${LOGPREFIX}_ping_A.log)
MAXRTT=$(sed -n 's/rtt.* = .*\/\([^)]*\).*\/.*/\1/p' logs/${LOGPREFIX}_ping_A.log)
[[ $LOSS == '0%' ]] && [[ $(echo $MAXRTT | sed 's/\..*//') -le 100 ]]