mirror of
https://github.com/masonr/yet-another-bench-script.git
synced 2025-11-06 07:41:30 +05:30
fix ping permission error (#61)
This commit is contained in:
parent
3791aa84d2
commit
f275b27f34
1 changed files with 2 additions and 1 deletions
3
yabs.sh
3
yabs.sh
|
|
@ -730,7 +730,8 @@ function iperf_test {
|
|||
done
|
||||
|
||||
# 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
|
||||
IPERF_SENDRESULT="$(echo "${IPERF_RUN_SEND}" | grep SUM | grep receiver)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue