Re: network bitrate of a poll of processes
- From: Jeremie Le Hen <jeremie@xxxxxxxxxx>
- Date: Sat, 7 Jun 2008 23:29:20 +0200
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"
- Prev by Date: number of /dev/usb nodes
- Next by Date: Increasing KVM on amd64
- Previous by thread: number of /dev/usb nodes
- Next by thread: Increasing KVM on amd64
- Index(es):
Relevant Pages
|