[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [BUG] libxenstat and xentop confused by renamed VIF interfaces



On 05/21/14 12:29, Ian Campbell wrote:
> On Wed, 2014-05-21 at 09:52 +0200, Jacek Konieczny wrote:
> libxenstore under Linux parses /proc/net/dev to extract 'vif.${domid}.*'
> interfaces, which won't be there, when the interfaces have been renamed.
> I suppose it is trying to exclude non-vif network devices (xenbr0, eth0
> etc).

That is one reason. The more important reason is to match interface with
a domid. Also, the /proc/net/dev file is the source of the interface
usage statistics collected by libxenstat.

>> I think the solution would be to look-up the actual interface name or
>> index in sysfs, e.g. under /sys/devices/vif-${domind}-*.
> 
> Sounds plausible.
> 
> Or perhaps check that /sys/class/net/${dev}/device/devtype contains
> "vif"? Might want to handle tap devices too. Perhaps parse the content
> of /sys/class/net/vif1.0/device/nodename to get the domid and devid?

Yes, that could work and would probably require less changes in the
code â this can be done while iterating /proc/net/dev.

Another approach would be to use the data from the xenstore, but I guess
that would be more expensive.

Greets,
        Jacek

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.