Bitcoin Forum
May 03, 2024, 02:35:20 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Measuring bandwidth between two full nodes  (Read 63 times)
babagindra (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
November 03, 2021, 08:30:45 PM
 #1

Can Bitcoin API measure the bandwidth between the full nodes?
For example, can I connect to some 8 peers and measure the bandwidth between myself and each of the peers (in some manner similar to iperf)?
1714703720
Hero Member
*
Offline Offline

Posts: 1714703720

View Profile Personal Message (Offline)

Ignore
1714703720
Reply with quote  #2

1714703720
Report to moderator
1714703720
Hero Member
*
Offline Offline

Posts: 1714703720

View Profile Personal Message (Offline)

Ignore
1714703720
Reply with quote  #2

1714703720
Report to moderator
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714703720
Hero Member
*
Offline Offline

Posts: 1714703720

View Profile Personal Message (Offline)

Ignore
1714703720
Reply with quote  #2

1714703720
Report to moderator
1714703720
Hero Member
*
Offline Offline

Posts: 1714703720

View Profile Personal Message (Offline)

Ignore
1714703720
Reply with quote  #2

1714703720
Report to moderator
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7340


Farewell, Leo


View Profile
November 03, 2021, 08:43:56 PM
 #2

Not sure if the Bitcoin API allows you to view this, but I highly doubt it. You can't obviously do this with softwares such as iperf, because the other nodes won't have them installed. So, it has to be written in the source code of Bitcoin Core.

Here's a disappointing API search: https://developer.bitcoin.org/search.html?q=bandwidth&check_keywords=yes&area=default

I hope another user knows more than I do.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
November 03, 2021, 09:29:40 PM
Merited by ABCbits (1), nc50lc (1)
 #3

You can use the getpeerinfo RPC command to get the IP address of each of the nodes you are connected to.

Once you have the above information, you can use a tool to monitor traffic between you and that IP address. There are a number of tools that can help you do this. a google search found one tool called wireshark, and another tool called utop. I have never used either of these tools, and have done no research on them beyond a basic google search looking for them, so use at your own risk. Note that this is measuring the actual amount of bandwidth being used, not necessarily the capacity to transfer data between your node and the nodes you are connected to.
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5581


Self-proclaimed Genius


View Profile
November 04, 2021, 07:38:25 AM
 #4

-snip-
For example, can I connect to some 8 peers and measure the bandwidth between myself and each of the peers (in some manner similar to iperf)?
Yes, you can use the suggested command above.
The "bytessent" and "bytesrecv" results of getpeerinfo already has the info you're looking for (but in total).

If you're looking for real-time result like in iperf, follow his suggestion.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!