Bitcoin Forum
November 19, 2024, 04:55:32 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Measuring bandwidth between two full nodes  (Read 90 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)?
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1708
Merit: 8354


Fiatheist


View Profile WWW
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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1666
Merit: 1901

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
*
Online Online

Activity: 2604
Merit: 6424


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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!