这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Conversation

@pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented Sep 14, 2018

No description provided.

@pgarg66 pgarg66 requested a review from mvines September 14, 2018 20:26
Copy link
Contributor

@mvines mvines left a 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

@pgarg66 pgarg66 merged commit d12537b into solana-labs:master Sep 14, 2018
@pgarg66 pgarg66 deleted the net-stats branch September 14, 2018 20:32
net_stat=$(netstat -suna)

declare stats
stats=$(echo "$net_stat" | awk 'BEGIN {tmp_var = 0} /packets sent/ {tmp_var = $1} END { print tmp_var }')
Copy link
Contributor

@rob-solana rob-solana Sep 14, 2018

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.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants