第 14 章 虚拟化工具

以下是在运行 Xen 的系统中有用的虚拟化管理工具和调试及联网工具。

系统管理工具

  • vmstat

  • iostat

  • lsof

    1. # lsof -i :5900
    2. xen-vncfb 10635 root 5u IPv4 218738 TCP grumble.boston.redhat.com:5900 (LISTEN)
  • qemu-img

高级调试工具

  • systemTap

  • crash

  • xen-gdbserver

  • sysrq

  • sysrq t

  • sysrq w

  • sysrq c

联网

brtcl

    1. # brctl show
    2. bridge name bridge id STP enabled interfaces
    3. xenbr0 8000.feffffffffff no vif13.0
    4. pdummy0
    5. vif0.0
    1. # brctl showmacs xenbr0
    2. port no mac addr is local? aging timer
    3. 1 fe:ff:ff:ff:ff:ff yes 0.00
    1. # brctl showstp xenbr0
    2. xenbr0
    3. bridge id 8000.feffffffffff
    4. designated root 8000.feffffffffff
    5. root port 0 path cost 0
    6. max age 20.00 bridge max age 20.00
    7. hello time 2.00 bridge hello time 2.00
    8. forward delay 0.00 bridge forward delay 0.00
    9. aging time 300.01
    10. hello timer 1.43 tcn timer 0.00
    11. topology change timer 0.00 gc timer 0.02
    12. flags
    13. vif13.0 (3)
    14. port id 8003 state forwarding
    15. designated root 8000.feffffffffff path cost 100
    16. designated bridge 8000.feffffffffff message age timer 0.00
    17. designated port 8003 forward delay timer 0.00
    18. designated cost 0 hold timer 0.43
    19. flags
    20. pdummy0 (2)
    21. port id 8002 state forwarding
    22. designated root 8000.feffffffffff path cost 100
    23. designated bridge 8000.feffffffffff message age timer 0.00
    24. designated port 8002 forward delay timer 0.00
    25. designated cost 0 hold timer 0.43
    26. flags
    27. vif0.0 (1)
    28. port id 8001 state forwarding
    29. designated root 8000.feffffffffff path cost 100
    30. designated bridge 8000.feffffffffff message age timer 0.00
    31. designated port 8001 forward delay timer 0.00
    32. designated cost 0 hold timer 0.43
    33. flags
  • ifconfig

  • tcpdump

KVM 工具

  • ps

  • pstree

  • top

  • kvmtrace

  • kvm_stat

Xen 工具

  • xentop

  • xm dmesg

  • xm log