1

Some user launches a set of programs. I need to get statistic about traffic for the programs executed by these user. But not summary for this user, but for each program executed by it separately.

Tell me please, how I can implement the task?

OS: ubuntu-server, centos

Thanks.

4
  • Are these programs requesting same services/IP/ports, etc? Are these programs executed on the same machine for all users? Do you want to do the calculations on the same machine or a different one like gateway?
    – Khaled
    Sep 3, 2012 at 11:51
  • It is allowed to user to create only TCP/UPD sockets, and will be connected anywhere. Yes, programs are executed by one machine, and only one user. Yes, by the same machine.
    – niXman
    Sep 3, 2012 at 11:57
  • What OS will these users be using?
    – Bart B
    Sep 3, 2012 at 13:45
  • ubuntu-server, centos.
    – niXman
    Sep 3, 2012 at 19:58

3 Answers 3

0

You don't say what OS the computer in question is running, but if it's OS X then Rubbernet will do what you need, and it's available in the Mac app store.

2
  • In tags 'linux' is specified. I supposed, from this it is possible to understand about what OS is told...
    – niXman
    Sep 3, 2012 at 20:00
  • Sorry - I just read the question. Surely it wouldn't hurt to be explicit?
    – Bart B
    Sep 4, 2012 at 11:30
0

Linux makes it really hard getting per-process network usage, but it can be done by capturing each packet individually and summing up the packet lengths assuming you have super user privileges. nethogs does this.

0

I use iftop(8) for this.
It should be in the Dries/Dags/RPM Forge repositories for CentOS.

2
  • Unfortunately iftop can't do this for each process separately.
    – scai
    Sep 4, 2012 at 6:26
  • I re-read the question and I see how iftop wouldn't work for this. Sorry for the noise. :(
    – Gazzonyx
    Sep 4, 2012 at 6:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .