Re: network bitrate of a poll of processes



Hi Mathieu,

On Mon, May 26, 2008 at 04:52:04PM +0200, Mathieu Prevot wrote:
I would like to know the bitrate of a pool of child processes that use
a network connection, how can I have something like netstat -w1
provide but at the process level ?

One way to do it is to create a dynamic library providing a wrapper for
read/write/send/recv/whichever syscalls that counts the number of bytes.
Use gettimeofday(2) in a construtor and destructor to print the average
bitrage. At runtime, load the shared library with LD_PRELOAD.

If you want real time bitrate, I think you need an external
device or you may spoil the results.

Regards,
--
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • netstat programming with C in AIX 4.3
    ... network connection in the system. ... netstat -a | grep ... I couldn't figure out how to do it under AIX. ... I can run netstat from within ...
    (comp.unix.aix)
  • netstat programming with C in AIX 4.3
    ... network connection in the system. ... netstat -a | grep ... I couldn't figure out how to do it under AIX. ... I can run netstat from within ...
    (comp.unix.aix)
  • Re: Multicast and winCE
    ... That is, via what sort of ... Paul T. ... the netstat -e shows that the ...
    (microsoft.public.windowsce.app.development)
  • Netstat
    ... wer have an application which makes a network connection using TCP. ... but netstat shows different portnumbers. ...
    (microsoft.public.win32.programmer.networks)