I have a server with OpenVZ installed and open IPv4 virtual machines for each machine. I need to get the bandwidth usage of each individual virtual machine (mbps or kbps) with PHP. My idea is to install iftop on the host machine and start it from the PHP exec () function, the command "iftop -n -F AA.BB.CC.DD / 32". The problem is that this is an iftop "top" application, and it runs on a real terminal and updates with new data. I canβt install anything on virtual machines, it must be clean. There is also no network interface for each virtual machine, and I cannot change it. I wonder what other options I have and how to realize my idea. sorry for my English
source share