This repository was archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Include UDP sent packet statistics in net stats #1225
Merged
Merged
Conversation
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
mvines
approved these changes
Sep 14, 2018
Contributor
mvines
left a comment
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
rob-solana
reviewed
Sep 14, 2018
| net_stat=$(netstat -suna) | ||
|
|
||
| declare stats | ||
| stats=$(echo "$net_stat" | awk 'BEGIN {tmp_var = 0} /packets sent/ {tmp_var = $1} END { print tmp_var }') |
Contributor
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))
vkomenda
pushed a commit
to vkomenda/solana
that referenced
this pull request
Aug 29, 2021
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
yihau
pushed a commit
that referenced
this pull request
May 14, 2024
… 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 <behzadnouri@gmail.com>
yihau
pushed a commit
to yihau/solana
that referenced
this pull request
May 15, 2024
… 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 <behzadnouri@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.