[systemd-devel] net stats per app

Daniel Wagner wagi at monom.org
Wed Aug 24 08:02:31 PDT 2011


Hi Lennart,

On 08/24/2011 03:42 PM, Lennart Poettering wrote:
> On Tue, 02.08.11 15:51, Daniel Wagner (wagi at monom.org) wrote:
>
>> So my thinking is, instead of using the uid driver trick, I could use
>> cgroups for collecting the network traffic. At least from the sub module
>> description it seems to be the right spot to add a new statistic
>> interface.
>
> Yupp, that makes a lot of sense I'd say. For CPU accounting there's
> already cpuacct. Adding a netacct cgroup controller would make a lot of
> sense to me. (a hackish way to achieve this with existing tools might be
> to use net_cls for this or so. dunno, might already be enough if ip
> rules allows accounting.)

By coincidence I meet Glauber at LinuxCon. He told me he is writing a 
new cgroup for controlling sockets. Adding tx/rx stats wouldn't be a big 
deal. Hope those patches are making good progress :)

net_cls wont work since we could only track tx traffic not rx traffic. 
So the only place to collect the stats is between the network stack and 
the userspace.

cheers,
daniel


More information about the systemd-devel mailing list