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.

niXman
  • 127
  • 1
  • 6
  • 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 03 '12 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 03 '12 at 11:57
  • What OS will these users be using? – Bart B Sep 03 '12 at 13:45
  • ubuntu-server, centos. – niXman Sep 03 '12 at 19:58

3 Answers3

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.

Bart B
  • 3,419
  • 6
  • 30
  • 42
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.

scai
  • 2,199
  • 1
  • 12
  • 16
0

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

Gazzonyx
  • 258
  • 1
  • 7