Last active
March 9, 2021 17:13
-
-
Save rothgar/0d7e3a9c11f2cb85f247b0a9eacf2541 to your computer and use it in GitHub Desktop.
This file contains 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
# ping once per minute. Every minute for a day | |
ping -i 60 -c 1440 google.com | grep loss | awk -F ',' '{print $3}' | |
# print avg latency (ms) per hour. One ping per minute | |
ping -i 60 -c 60 google.com | awk '{print $8}' | sed -n '/^time/p' | awk -F '=' '{print $2}' | awk '{ sum += $1 } END { if (NR > 0) print sum / NR }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment