OpenVZ - Bandwidth Accounting + Graphing Based in Debian Lenny x64

I just update this excellent script for Debian Lenny x64 on both (HN and CT) and with the 1.3.1 version of rrdtool, I also did some minor changes in the script.

1. You must have installed Debian Lenny x64 + OpenVZ + rrdtool on your HN:
apt-get install rrdtool

2. Download and create a container using this template:


mv Debian-Lenny-x64_bandwidth.tar.gz /vz/template/cache/
vzctl create 101 --ostemplate Debian-Lenny-x64_bandwidth --config vps.basic --hostname --ipadd --name graphs
vzctl set 101 --onboot yes --nameserver --userpasswd root:xxxxxxx --save
vzctl start 101

2.1. You can errase my old rrd data:
vzctl exec 101 rm /home/bandwidth/*

3. Download the script (Bash) to collecting data:

** You can open it and change the container number in the BWVE variable. **

4. You can make an crontab to run this script every 5 min:
crontab -e
*/5 * * * * /root/ 1>/var/log/vz-bandwidth.log 2>&1

5. Wait 5 min then visit: and happy graphing !