mirror of
https://github.com/masonr/yet-another-bench-script.git
synced 2025-04-19 00:45:22 +00:00
fix ping permission error (#61)
This commit is contained in:
parent
3791aa84d2
commit
f275b27f34
3
yabs.sh
3
yabs.sh
@ -730,7 +730,8 @@ function iperf_test {
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Run a latency test via ping -c1 command -> will return "xx.x ms"
|
# Run a latency test via ping -c1 command -> will return "xx.x ms"
|
||||||
[[ ! -z $LOCAL_PING ]] && LATENCY_RUN="$(ping -c1 $URL | grep -Po 'time=.*' | sed s/'time='//)" || LATENCY_RUN="--"
|
[[ ! -z $LOCAL_PING ]] && LATENCY_RUN="$(ping -c1 $URL 2>/dev/null | grep -Po 'time=.*' | sed s/'time='//)"
|
||||||
|
[[ -z $LATENCY_RUN ]] && LATENCY_RUN="--"
|
||||||
|
|
||||||
# parse the resulting send and receive speed results
|
# parse the resulting send and receive speed results
|
||||||
IPERF_SENDRESULT="$(echo "${IPERF_RUN_SEND}" | grep SUM | grep receiver)"
|
IPERF_SENDRESULT="$(echo "${IPERF_RUN_SEND}" | grep SUM | grep receiver)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user