raboof / nethogs

Linux 'net top' tool
GNU General Public License v2.0
3.13k stars 286 forks source link

Difference between nethogs and monitor measures #196

Open orwa-te opened 4 years ago

orwa-te commented 4 years ago

I use nethogs to measure the bandwidth in a distributed system where I have a cluster of multi nodes working together to execute a task. What I notice at the end of the execution is that there is a noticeable and big difference between values measured in nethogs and values measure in default System monitor for all nodes, the values below measure all the bandwidth used by all processes on a single node (there were only 3 processes consume the bandwidth):

Some nodes have measures that are almost identical in System monitr and nethogs in sent bandwidth. What causes this difference? Is it better to rely on the system monitor? I suppose System monitor seems to be much more accurate for the work.

raboof commented 4 years ago

What causes this difference?

Is there any UDP traffic? Nethogs only tracks TCP traffic (#62).

Is it better to rely on the system monitor?

It depends what you want. Nethogs is unique in that it breaks down the traffic per process. If you don't need that, I would recommend using a different tool.

orwa-te commented 4 years ago

No, the process depends completely on TCP for transferring data. What makes that strange is the big difference between the system monitor and nethogs which is in GigaBytes as mentioned above, even if I sum the traffic of all processes and compare it to the value in the monitor there is a significant variance! My purpose is to measure the traffic for a specific process and nethogs offers this as described.