Get the current bandwidth use in Linux with PHP
I have a server with OpenVZ installed and virtual machines with a public IPv4 for every machine. I need to get the bandwidth usage of each separate virtual machine (mbps or kbps) from PHP. My idea is to install iftop on the host machine and run it from PHP function exec(), the command "iftop -n -F AA.BB.CC.DD/32". The problem is that is an application iftop "top" style, and is made to run on a real terminal and is updated with new data. I can not install anything on the VMs, should be clean. Nor has a network interface each VM and I can not change it. I wonder what other options I have or how