OpenVZ Forum


Home » General » Support » Get the bandwidth limit of a container from within it? (How to get the bandwidth limit of a container from within it?)
Get the bandwidth limit of a container from within it? [message #50699] Mon, 14 October 2013 16:05 Go to next message
droidzone is currently offline  droidzone
Messages: 1
Registered: October 2013
Junior Member
I have designed a script to monitor multiple openvz containers and report data to a central server for monitoring purpose. As a part of it, I am using the data from /proc/net/dev to report the bandwidth already used. To report data of usage as a percent, I need to get the total alloted bandwidth limit of a container from within it. Is there a way to get this data?

Currently I use the data inbound from:

grep venet0 /proc/net/dev | cut -f2 -d: | awk '{printf"%s",$1}'
Re: Get the bandwidth limit of a container from within it? [message #50702 is a reply to message #50699] Tue, 15 October 2013 22:31 Go to previous messageGo to next message
devonblzx is currently offline  devonblzx
Messages: 127
Registered: December 2006
Senior Member
OpenVZ doesn't have a bandwidth limit option. You would need to consult a database or use an external service.

http://static.openvz.org/userbars/openvz-user-2.png
ByteOnSite President
Re: Get the bandwidth limit of a container from within it? [message #50827 is a reply to message #50699] Mon, 11 November 2013 00:25 Go to previous message
pavel.odintsov is currently offline  pavel.odintsov
Messages: 24
Registered: February 2010
Junior Member
Hello!

You can use my custom script for shaping network speed into CT's - https://github.com/FastVPSEestiOu/openvz-network-shaper Smile

If you need any help, I will be very glad to provide it.


Previous Topic: NUMAD daemon and OpenVZ
Next Topic: Host and Guest connected, but guest has no LAN access.
Goto Forum:
  


Current Time: Sun Sep 01 00:16:31 GMT 2024

Total time taken to generate the page: 0.05792 seconds