blob: 6d4779ce7a8dfa7ba8c7f454e47bb41c2e2b1b2b [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, \([^,]*\) packet loss.*/\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 ]]