netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* proc net statistics
@ 2014-04-07 10:39 Ken O'Brien
  2014-04-07 17:06 ` Cong Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Ken O'Brien @ 2014-04-07 10:39 UTC (permalink / raw)
  To: Network Development, linux-kernel@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

Hi,

I was under the impression that statistics reported
in /proc/{$pid}/net/dev were specific to that process, but the values
appear to be globals, i.e., identical for all processes.

Is this a bug?

Regards,

Ken

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: proc net statistics
  2014-04-07 10:39 proc net statistics Ken O'Brien
@ 2014-04-07 17:06 ` Cong Wang
       [not found]   ` <1396890659.3063.4.camel@mjolnir.site>
  0 siblings, 1 reply; 4+ messages in thread
From: Cong Wang @ 2014-04-07 17:06 UTC (permalink / raw)
  To: Ken O'Brien; +Cc: Network Development, linux-kernel@vger.kernel.org

On Mon, Apr 7, 2014 at 3:39 AM, Ken O'Brien <ken@kenobrien.org> wrote:
> Hi,
>
> I was under the impression that statistics reported
> in /proc/{$pid}/net/dev were specific to that process, but the values
> appear to be globals, i.e., identical for all processes.
>
> Is this a bug?

That is per network-namespace statistics, so it is
not a bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: proc net statistics
       [not found]   ` <1396890659.3063.4.camel@mjolnir.site>
@ 2014-04-07 17:19     ` Cong Wang
  2014-04-07 17:25       ` Daniel Borkmann
  0 siblings, 1 reply; 4+ messages in thread
From: Cong Wang @ 2014-04-07 17:19 UTC (permalink / raw)
  To: Ken O'Brien; +Cc: Network Development, linux-kernel@vger.kernel.org

On Mon, Apr 7, 2014 at 10:10 AM, Ken O'Brien <ken@kenobrien.org> wrote:
>
> Ok, so then, is there a way to read per process network statistics in the proc filesystem?
>

AFAIK, we only have per-socket and per-netdev statistics, there is no
per-process one, you probably want to try cgroup, or put these processes
into a namespace.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: proc net statistics
  2014-04-07 17:19     ` Cong Wang
@ 2014-04-07 17:25       ` Daniel Borkmann
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Borkmann @ 2014-04-07 17:25 UTC (permalink / raw)
  To: Cong Wang
  Cc: Ken O'Brien, Network Development,
	linux-kernel@vger.kernel.org

On 04/07/2014 07:19 PM, Cong Wang wrote:
> On Mon, Apr 7, 2014 at 10:10 AM, Ken O'Brien <ken@kenobrien.org> wrote:
>>
>> Ok, so then, is there a way to read per process network statistics in the proc filesystem?
>
> AFAIK, we only have per-socket and per-netdev statistics, there is no
> per-process one, you probably want to try cgroup, or put these processes
> into a namespace.

You can do that with cgroups, e.g. xt_cgroup. Samsung/Tizen OS seems to make
use of this ...

https://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=a00e76349f3564bb8129fc0510dfd93248c3084d

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-07 17:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-07 10:39 proc net statistics Ken O'Brien
2014-04-07 17:06 ` Cong Wang
     [not found]   ` <1396890659.3063.4.camel@mjolnir.site>
2014-04-07 17:19     ` Cong Wang
2014-04-07 17:25       ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).