OpenVZ Forum


Home » General » Support » Best way to retrieve container network usage / counters
Best way to retrieve container network usage / counters [message #49150] Tue, 02 April 2013 14:10 Go to next message
nostalgeek is currently offline  nostalgeek
Messages: 3
Registered: April 2013
Location: Canada
Junior Member
Hi,

I'm trying to read CT network usage / counters for reporting purposes.

Something like:

vzctl exec CTID cat /proc/net/dev

But independent from the CT, something that runs from the HN/Host/ hardware node.

The problem with "vzctl exec" is that the binary (cat in this example) is read from the CT area. A user could cheat the reporting by replacing /bin/cat inside his container.

I could not find anything looking at the various OpenVZ /proc entries on the HN.

Thanks

Simon
Re: Best way to retrieve container network usage / counters [message #49184 is a reply to message #49150] Sat, 06 April 2013 19:05 Go to previous message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
I don't know if it will solve your problem, but you may get some ideas: http://wiki.openvz.org/Traffic_accounting_with_iptables
Previous Topic: vzquota incompatibility between RHEL5 028stab101.3 & 028stab106.2?
Next Topic: Container's Public IP displaying Host's IP, not it's own
Goto Forum:
  


Current Time: Thu Jul 18 18:19:30 GMT 2024

Total time taken to generate the page: 0.02561 seconds