blob: 99954f3f5eff1cca2eb70185e87fb533c7eb5730 [file] [log] [blame]
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source ../multi-host.conf
LOGPREFIX=$1
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 ]]