Xen 虚拟机网卡信息查询

2015-04-22 12:09:17 +08:00
 flewover

想查看 XenServer6.2 下边的虚拟机 Ubuntu14.04 的网卡速率等信息,使用 ethtoolmii-tool 等工具都不能返回与普通物理网卡相同的信息。有什么其他的办法么?
例如使用 ethtool:

➜  sudo ethtool eth0
Settings for eth0:
Link detected: yes

➜  sudo ethtool -i eth0
driver: vif
version:
firmware-version:
bus-info: vif-0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no

driver "vif" means it's a Xen Virtual Interface paravirtualized driver.

普通物理网卡返回

[apple@localhost ~]$ sudo ethtool em1
Settings for em1:
    Supported ports: [ FIBRE ]
    Supported link modes:   1000baseT/Full
                            10000baseT/Full
    Supports auto-negotiation: No
    Advertised link modes:  10000baseT/Full
    Advertised pause frame use: No
    Advertised auto-negotiation: No
    Speed: 10000Mb/s
    Duplex: Full
    Port: Direct Attach Copper
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: off
    Supports Wake-on: g
    Wake-on: d
    Current message level: 0x00000000 (0)
    Link detected: yes

使用 mii-tool

➜  sudo mii-tool eth0
 SIOCGMIIPHY on 'eth0' failed: Operation not supported
2359 次点击
所在节点    问与答
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/185447

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX