6,534
edits
Changes
m
{{DISPLAYTITLE:Monitoring bandwith of containers}} Use the /proc/net/dev/net inside a container, dump stats into a round robin database (rrd)
no need for displaytitle
<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]]