OpenVZ Forum


Home » Mailing lists » Users » Logging traffic stats for VEs
Re: Logging traffic stats for VEs [message #12808 is a reply to message #12795] Thu, 10 May 2007 10:09 Go to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Ian P. Christian wrote:
> Thorsten Schifferdecker wrote:
>
>>Hi Ian,
>>
>>a) use the /proc/net/dev of your VE:
>>
>># vzctl exec <VEID> grep venet0 /proc/net/dev | cut -d":" -f2 | awk
>>'{print $1"\n"$9}'
>>
>>xxx
>>xxx
>>
>>b) or, VE has enabled sysfs:
>>
>># vzctl exec <VEID> cat /sys/class/net/venet0/statistics/{r,t}x_bytes
>
>
> These would both be reset on a customer rebooting their VE wouldn't
> they? Is there any way a user of a VE could manipulate the figures in
> either of these places?
yep. if you want non-resetable counters then add iptables rules
in VE0 for VE IP addresses. And then read these statistics via iptables -L -v

Thanks,
Kirill
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: VEs and rebooting
Next Topic: About many connections in SMTP
Goto Forum:
  


Current Time: Thu Oct 17 07:49:34 GMT 2024

Total time taken to generate the page: 0.05177 seconds