Last active
May 2, 2016 19:20
-
-
Save enriched/b61846e7dffc9dcdb2181c6ed0435d6c to your computer and use it in GitHub Desktop.
Ping with packet loss % and millisec output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usefulbashping() | |
{ | |
read loss rttavg <<< $(ping -q -c 100 -w 60 -A $1 | \ | |
awk 'BEGIN {FS="[/ ]"}; /loss/ {print substr($6,0,length($6))}; /rtt/ {print $9*1000}') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment