#!/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/.*received, \([^,]*\) 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 ]] | |