OpenVZ Forum


Home » Mailing lists » Users » Proc statistic interface for venet
Proc statistic interface for venet [message #43683] Thu, 06 October 2011 15:03 Go to next message
dietmar is currently offline  dietmar
Messages: 54
Registered: March 2007
Member
From: 192.168.2*
Is there some interface to get statistics for venet device? I found and old patch:

http://forum.openvz.org/index.php?t=msg&th=459&goto= 2581&#msg_2581

but seems that this is not included in current 2.6.32 kernel?

- Dietmar
Re: Proc statistic interface for venet [message #43684 is a reply to message #43683] Thu, 06 October 2011 15:30 Go to previous messageGo to next message
Gary Wallis is currently offline  Gary Wallis
Messages: 15
Registered: July 2011
Junior Member
From: *parallels.com
This is how I get traffic data...

[root@xc7 ubc]# grep venet0 /proc/net/dev
venet0:205043590448 1030583416 0 0 0 0 0 0
199946969183 1042842376 0 1452 0 0 0 0
[root@xc7 ubc]#

Dietmar Maurer wrote:
> Is there some interface to get statistics for venet device? I found and old patch:
>
> http://forum.openvz.org/index.php?t=msg&th=459&goto= 2581&#msg_2581
>
> but seems that this is not included in current 2.6.32 kernel?
>
> - Dietmar
RE: Proc statistic interface for venet [message #43685 is a reply to message #43684] Thu, 06 October 2011 15:43 Go to previous messageGo to next message
dietmar is currently offline  dietmar
Messages: 54
Registered: March 2007
Member
From: 192.168.2*
Well, I want statistics for each container. /proc/net/dev only shows overall traffic?

- Dietmar

> -----Original Message-----
> From: users-bounces@openvz.org [mailto:users-bounces@openvz.org] On
> Behalf Of Gary Wallis
> Sent: Donnerstag, 06. Oktober 2011 17:30
> To: users@openvz.org
> Subject: Re: [Users] Proc statistic interface for venet
>
> This is how I get traffic data...
>
> [root@xc7 ubc]# grep venet0 /proc/net/dev
> venet0:205043590448 1030583416 0 0 0 0 0 0
> 199946969183 1042842376 0 1452 0 0 0 0
> [root@xc7 ubc]#
>
> Dietmar Maurer wrote:
> > Is there some interface to get statistics for venet device? I found and old
> patch:
> >
> > http://forum.openvz.org/index.php?t=msg&th=459&goto= 2581&#msg_2581
> >
> > but seems that this is not included in current 2.6.32 kernel?
> >
> > - Dietmar
Re: Proc statistic interface for venet [message #43686 is a reply to message #43685] Thu, 06 October 2011 16:31 Go to previous messageGo to next message
Gary Wallis is currently offline  Gary Wallis
Messages: 15
Registered: July 2011
Junior Member
From: *parallels.com
Each container has one also...for example for VEID=17801

[root@xc7 ubc]# grep venet /vz/root/17801/proc/net/dev
venet0:205802061231 1034310182 0 0 0 0 0 0
200705808251 1046608527 0 1452

Dietmar Maurer wrote:
> Well, I want statistics for each container. /proc/net/dev only shows overall traffic?
>
> - Dietmar
RE: Proc statistic interface for venet [message #43688 is a reply to message #43686] Thu, 06 October 2011 18:06 Go to previous messageGo to next message
dietmar is currently offline  dietmar
Messages: 54
Registered: March 2007
Member
From: 192.168.2*
> Each container has one also...for example for VEID=17801

Oh, so I do not need to call 'vzctl exec' to get that data?

- Dietmar
Re: Proc statistic interface for venet [message #43692 is a reply to message #43688] Thu, 06 October 2011 22:22 Go to previous messageGo to next message
Gary Wallis is currently offline  Gary Wallis
Messages: 15
Registered: July 2011
Junior Member
From: *parallels.com
Dietmar Maurer wrote:
>> Each container has one also...for example for VEID=17801
>
> Oh, so I do not need to call 'vzctl exec' to get that data?
>
> - Dietmar
>
>
Why? Save time and effort just get it directly from the hardware node as
my example shows using /vz/root/VEID/proc/net/dev. We use fopen() in C
to read these files in the unxsVZ OpenVZ management system, but you can
read it from BASH or Perl with a little more overhead.
RE: Proc statistic interface for venet [message #43694 is a reply to message #43692] Fri, 07 October 2011 04:52 Go to previous message
dietmar is currently offline  dietmar
Messages: 54
Registered: March 2007
Member
From: 192.168.2*
> Why? Save time and effort just get it directly from the hardware node as my
> example shows using /vz/root/VEID/proc/net/dev.

Well, that file is simply not there on my system (latest openvz 2.6.32 kernel). I can only see it inside the VM.

So what kernel do you use exactly?

- Dietmar
Previous Topic: Kernel 028stab094.3 not in current
Next Topic: Checkpoint and restore on 64 bit Debian host.
Goto Forum:
  


Current Time: Sun Aug 19 23:14:27 GMT 2018