network bitrate of a poll of processes

Marc Spitzer mspitzer at gmail.com
Mon May 26 20:03:25 UTC 2008


On Mon, May 26, 2008 at 12:14 PM, Mathieu Prevot
<mathieu.prevot at gmail.com> wrote:
> 2008/5/26 Dan Nelson <dnelson at allantgroup.com>:
>> In the last episode (May 26), Mathieu Prevot said:
>>> Hi,
>>>
>>> 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 ?
>>
>> If you can segregate them to their own UID, you can use an ipfw "count
>> ip from any to any uid 6666" rule to count the packets.  Another option
>> would be to jail them to a dedicated IP address and count traffic on
>> that IP.
>
> Both are nice... thank you. And don't you have something more portable
> ie. that could run on "any" posix os - like a sh script that use
> standard tools -  and that doesn't need root user intervention ?
>
> Mathieu

I do not think so, firewall for example is controlled by root.  And
users do not generally have detailed access to other users
information.  You can look into the BASM framework to track what your
apps are doing and if you know the behavior to expect you can use
netflow/argus/tcpdump to track that and post process the logs in each
case into something useful.

What are you trying to do, details do help?


Thanks,

marc
-- 
Freedom is nothing but a chance to be better.
Albert Camus


More information about the freebsd-hackers mailing list