blob: 6b741ebf863e1884d5dee24bf3bcd94543da848e [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/.*Packet Loss=\([^,]*\).*/\1/p' logs/${LOGPREFIX}_ping_A.log)
MAXRTT=$(sed -n 's/Round Trip Time.* = (\([^)]*\).*/\1/p' logs/${LOGPREFIX}_ping_A.log | cut -d/ -f2)
[[ $LOSS == '0%' ]] && [[ $(echo $MAXRTT | sed 's/\..*//') -le 100 ]]