-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include UDP sent packet statistics in net stats #1225
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm starting to get a little worried about the N awk processes we're creating every second. Won't scale as N gets larger but fine until proven otherwise I guess
@@ -22,6 +24,10 @@ update_netstat() { | |||
net_stat=$(netstat -suna) | |||
|
|||
declare stats | |||
stats=$(echo "$net_stat" | awk 'BEGIN {tmp_var = 0} /packets sent/ {tmp_var = $1} END { print tmp_var }') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
netsnmp()
{
# $1: section name, e.g. "udp"
# $2-....: field names to query, e.g. "udp"
# outputs field values in order
declare -a names=( )
declare -a values=( )
declare section=$1
shift
while read -r -a line; do
[[ ${line[0]} == "${section}:" ]] || continue
names=( "${line[@]:1}" )
read -r -a line
values=( "${line[@]:1}" )
done < /proc/net/snmp
while [[ -n $1 ]]; do
for ((i=0; i<${#names[*]}; i++)); do
[[ ${names[i]} == "$1" ]] && echo "${values[i]}" && break
done
shift
done
}
for your purposes:
packets_sent_diff=$(($(netsnmp Udp OutDatagrams) - packets_sent))
Bumps [@babel/node](https://github.com/babel/babel/tree/HEAD/packages/babel-node) from 7.12.13 to 7.12.16. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.12.16/packages/babel-node) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… of #1106) (#1225) reverts back in SocketAddr dedup in retransmit stage (#1106) This was erronously deemed as unnecessary and removed in: anza-xyz#864 The commit partially reverts #864 and adds back socket-addr dedup. (cherry picked from commit fbe1dbc) Co-authored-by: behzad nouri <[email protected]>
… of solana-labs#1106) (solana-labs#1225) reverts back in SocketAddr dedup in retransmit stage (solana-labs#1106) This was erronously deemed as unnecessary and removed in: anza-xyz#864 The commit partially reverts solana-labs#864 and adds back socket-addr dedup. (cherry picked from commit fbe1dbc) Co-authored-by: behzad nouri <[email protected]>
No description provided.