Last active
December 13, 2019 14:27
-
-
Save cspinetta/3f82105b1d6313418b8654eadc7fd505 to your computer and use it in GitHub Desktop.
Average retransmitted packets on TCP connections (Took from: https://github.com/munin-monitoring/contrib/blob/master/plugins/tcp/tcp-retransmissions )
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
#!/usr/bin/env bash | |
cat /proc/net/tcp* | awk ' | |
{ | |
TOTAL += $7; | |
COUNT++; | |
} | |
END { | |
printf "rate_retr %.3f\n", TOTAL/COUNT | |
} | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment