XPost: alt.os.linux.mint
Mrde wrote:
How can I find network usage and bandwidth for any software?
For example, how many firefox use, chrome, any software?
And is it possible for monitoring in realtime?
An example would be "nethogs".
https://unix.stackexchange.com/questions/261036/collecting-network-information
When you look at a number of web articles on the topic,
some people do not get good PID resolution on their
distro, making the displayed result almost useless.
This is just a guess on my part, but because some
lines are "unknown", the implication is that there
isn't a performance counter "sliced" the right way to
do this for the developer. Consequently, you can see
in the display, that some "grunting" is going on.
They're working too hard, to get a result.
The program shows a "rate", and does not total
the bytes in all the packets.
*******
As an example of a pretty good program, there is Wireshark,
which is a promiscuous receiver. A Wireshark trace has all
the information necessary to total up bytes of usage. *But*,
it cares not a fig where the traffic came from. It works at
the network spigot level, not at the process PID level.
Wireshark is a good program. I've used it on multiple
platforms, to debug network related issues. I even keep
track of situations on my USENET client with it at times
(server down). But... it just isn't the right program
for the job in this case. Sure, human operators can tell,
from the fact only one browser is running, and some traffic
is going to port 80, and the protocol looks like HTTP, then
yes, that's probably a browser. Or, maybe not. But based
on knowledge the operator has, the operator can kinda guess
which packets belong where.
This is not good enough, when writing programs.
In the Google pages I looked at so far, I'm not seeing
a slicing that way. Total traffic per pid.
*******
OK, this is getting a bit better.
"Nethogs" is mentioned again, but there are others.
https://askubuntu.com/questions/2411/how-do-i-find-out-which-process-is-eating-up-my-bandwidth
sudo apt-get install ntop
http://packages.ntop.org/
*******
$ sudo apt install dstat
then
$ dstat --net --top-io-adv <=== does it need sudo to ID all PIDs ???
You'll have to try some of those out, then report back
which one worked for you, so future users will know
this answer :-)
The jumbo articles actually missed some in this case.
Lots of programs do the easy stuff, only a few do
the hard stuff.
Paul
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)