Skip to content

Instantly share code, notes, and snippets.

@cspinetta
Last active December 13, 2019 14:27
Show Gist options
  • Save cspinetta/3f82105b1d6313418b8654eadc7fd505 to your computer and use it in GitHub Desktop.
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 )
#!/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