Score:2

How to calculate the size of data transferred between two machines Ubuntu?

ru flag

Updated

I have two computers.

The first one is as a workstation. It runs the deep learning code and connects an AP by a wired.

The second one is as a robot's computer. It sends the video and other information from other sensors and connects an AP by a LAN card.

I'd like to know the data size that exchanges between them in real-time using the command in the terminal.

How do I measure data they transfer to each other via the Network for a specific Network?

Here, I meant by the specific Network (the robot's computer)

Can I know how much the robot's computer sends data to the workstation? Meanwhile, how much data the workstation sends to the robot's computer (in two directions)

Note: I am using the wireless and the wired without internet (no internet)

in flag
Do any of the tools [in this answer](https://askubuntu.com/a/257302/1222991) give you what you need?
Score:0
in flag

The simplest (and oldest) tool to do this would be netstat -i but this lists only total traffic on each interface, not trafic to specific hosts.

The link provided in comments above points to an answer in this question; the answers there include a fairly comprehensive list of tools to view network traffic in real time.

However, one answer more specific to your question is not there. It is possible using iptables to set up a firewall rule whose sole purpose is to search for specific traffic, such as traffic between the current host and another host, and count it in bytes and packets. So if the above tools give answers that are too general, iptables is where you want to look next.

REDHWAN avatar
ru flag
It is not working for each other, in and out.
user10489 avatar
in flag
Sorry, I was unable to extract any meaning from that statement.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.