Last active
August 11, 2020 06:43
-
-
Save justdoit0823/a035aafdce0b9fda58822f16a54be655 to your computer and use it in GitHub Desktop.
Show highest rtt within remote tcp server port from local.
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
# replace 10.73 with your own network and 15138 with port | |
ss -ti|grep -E '10.73.[[:digit:]]{2,3}.[[:digit:]]{2,3}:15138' -A 1|grep 'ESTAB' -A 1|grep -v -- --|awk '{if(index($0, "ESTAB")) {h = $5} if(index($0, "rtt")) {split($4, a, "rtt:"); split(a[2], b, "/"); if(b[1] > r[h]) {r[h] = b[1]}}} END {for(h in r) print h, r[h]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment