Changes

Jump to: navigation, search

Monitoring bandwidth of containers

37 bytes added, 12:11, 18 March 2010
m
no need for displaytitle
{{DISPLAYTITLE:Monitoring bandwith of containers}} Use the /proc/net/dev/net inside a container, dump stats into a round robin database (rrd)
<pre>
BWDIR=var/rrd/vz
 
## Default folder for containers
VE_PRIVATE=/var/lib/vz/private
# Define the full path to the bandwidth VE directory and the storage dir.
CBWDIR=/vz/private$VE_PRIVATE/$BWVE/$BWDIR
# Test and make sure that directory is there, if not create it.
# Delete the .rrd file because its obviously not needed anymore.
if ! test -d /vz/private$VE_PRIVATE/$VES; then
echo $i will be deleted
rm -rf $CBWDIR/vps-$VES.rrd
[[Category: HOWTO]]
 
[[Category: Monitoring]]
[[Category: Networking]]

Navigation menu