Linux – Network traffic accounting of Xen VMs

accountingdebianiptableslinuxxen

How do I monitor network traffic usage on Xen virtual machines running on Debian GNU/Linux Squeeze?

I have a number of Xen virtual machines (domUs) running on a few physical machines (dom0s). Each domU can be started on or live-migrated to one of the physical machines.

I would like to monitor and account how much network traffic is used on each domU. That is, how many bytes are being sent and received per month, week, day, hour.

I thought this would be a pretty common task for system administrators using virtual machines on Linux, however, I have not been able to find any easy way of doing it.

I am looking forward to hearing your approaches to this.

Best Answer

If you are using iptables, you can config something like this.

iptables traffic accounting

Related Topic