[CentOS-virt] Need info on vnet mapping to guests

Sun Oct 25 07:30:40 UTC 2009
Christopher G. Stach II <cgs at ldsys.net>

----- "Neil Aggarwal" <neil at JAMMConsulting.com> wrote:

> I am trying to figure out if there is a way to
> use snmpd on the host to measure the traffic
> usage of the guests.  I do not want to require
> anything running on the guests since I do not
> control them.
[...]
> Is there a better way to determine which vnet is connected to
> which guest?

You can put ``virsh domname <domid>'' or just ``virsh list'' with some awk into an snmpd exec script to enumerate the vifs with their domain names.

> Also, does the mapping change when I stop and start guests
> or reboot the host?

Domain IDs do change between guest reboots so you will have to key your graphs with the domain name and not the vif name.

-- 
Christopher G. Stach II