#show dpdk buffer
(查看dpdk的mbuf 的使用情况。长期观察可以看到dpdk的mbuf是否在泄露)
yazhou# show dpdk buffer
name="dpdk_mbuf_pool_socket0" available = 7597 allocated = 8785 total = 16382
#show memory
(查看vpp的内存占用情况。包括每个线程的使用情况)
yazhou# show memory
Thread 0 vpp_main
virtual memory start 0x7fb788e6b000, size 1048640k, 262160 pages, page size 4k
numa 0: 6142 pages, 24568k
not mapped: 256018 pages, 1024072k
total: 1.00G, used: 25.53M, free: 998.53M, trimmable: 994.48M
no traced allocations
Thread 1 vpp_wk_0
virtual memory start 0x7fb788e6b000, size 1048640k, 262160 pages, page size 4k
numa 0: 6142 pages, 24568k
not mapped: 256018 pages, 1024072k
total: 1.00G, used: 25.53M, free: 998.53M, trimmable: 994.48M
no traced allocations
Thread 2 vpp_wk_1
virtual memory start 0x7fb788e6b000, size 1048640k, 262160 pages, page size 4k
numa 0: 6142 pages, 24568k
not mapped: 256018 pages, 1024072k
total: 1.00G, used: 25.53M, free: 998.53M, trimmable: 994.48M
no traced allocations
#show runtime
(看到每个node节点的收发包情况, 也可以定位多线程的收发包个数,放一个报文流,就可以看到报文到底走到哪个线程去了)
yazhou# show runtime
---------------
Thread 1 vpp_wk_0 (lcore 0)
Time 55750.9, average vectors/node 1.00, last 128 main loops 0.00 per node 0.00
vector rates in 7.5387e4, out 7.5387e4, drop 7.5387e4, punt 0.0000e0
Name State Calls Vectors Suspends Clocks Vectors/Call
GigabitEthernet2/0/0-output active 4183297452 4202894968 0 6.86e2 1.00
GigabitEthernet2/0/0-tx active 4183297452 4202886171 0 1.68e3 1.00
huya-input active 4183297452 4202894968 0 1.09e3 1.00
dpdk-input polling 35309300276 4202894968 0 7.74e3 .12
error-drop active 4183297452 4202894968 0 1.11e3 1.00
ethernet-input active 8366594904 8405789936 0 7.75e2 1.00
ip4-input active 4183297452 4202894968 0 9.48e2 1.00
ip4-local active 4183297452 4202894968 0 8.73e2 1.00
ip4-lookup active 4183297452 4202894968 0 7.13e2 1.00
l2-flood active 4183297452 4202894968 0 2.36e3 1.00
l2-fwd active 8366594904 8405789936 0 7.37e2 1.00
l2-input active 8366594904 8405789936 0 7.07e2 1.00
l2-input-vtr active 4183297452 4202894968 0 6.58e2 1.00
l2-learn active 8366594904 8405789936 0 6.54e2 1.00
l2-output active 4183297452 4202894968 0 7.79e2 1.00
tap-inject-tx active 4183297452 4202894968 0 7.57e2 1.00
---------------
Thread 2 vpp_wk_1 (lcore 2)
Time 55750.9, average vectors/node 1.00, last 128 main loops 0.00 per node 0.00
vector rates in 7.9499e3, out 7.9499e3, drop 7.9499e3, punt 0.0000e0
Name State Calls Vectors Suspends Clocks Vectors/Call
GigabitEthernet2/0/0-output active 443191359 443214663 0 7.14e2 1.00
GigabitEthernet2/0/0-tx active 443191359 443214663 0 2.04e3 1.00
huya-input active 443191359 443214663 0 1.18e3 1.00
dpdk-input polling 145597979087 443214663 0 1.85e5 0.00
error-drop active 443191359 443214663 0 1.38e3 1.00
ethernet-input active 886382718 886429326 0 7.98e2 1.00
ip4-input active 443191359 443214663 0 1.01e3 1.00
ip4-local active 443191359 443214663 0 9.29e2 1.00
ip4-lookup active 443191359 443214663 0 7.42e2 1.00
l2-flood active 443191359 443214663 0 3.28e3 1.00
l2-fwd active 886382718 886429326 0 7.69e2 1.00
l2-input active 886382718 886429326 0 7.14e2 1.00
l2-input-vtr active 443191359 443214663 0 6.41e2 1.00
l2-learn active 886382718 886429326 0 7.01e2 1.00
l2-output active 443191359 443214663 0 8.44e2 1.00
tap-inject-tx active 443191359 443214663 0 8.02e2 1.00
unix-epoll-input polling 8368 0 0 5.13e5 0.00
#show hardware-interface
(查看每个接口的队列数,rx,tx,包括rss等都是有用的信息,思科的工程师在回复的邮件中用的最多的就是这个命令)
yazhou# show hardware-interfaces
Name Idx Link Hardware
GigabitEthernet1/0/0 1 up GigabitEthernet1/0/0
Ethernet address 70:65:82:00:18:48
Intel e1000
carrier up full duplex speed 1000 mtu 9202 promisc
flags: admin-up promisc pmd maybe-multiseg tx-offload intel-phdr-cksum
rx: queues 2 (max 2), desc 1024 (min 32 max 4096 align 8)
tx: queues 2 (max 2), desc 1024 (min 32 max 4096 align 8)
pci: device 8086:1539 subsystem 8086:0000 address 0000:01:00.00 numa 0
module: unknown
max rx packet len: 16383
promiscuous: unicast on all-multicast on
vlan offload: strip off filter off qinq off
rx offload avail: vlan-strip ipv4-cksum udp-cksum tcp-cksum vlan-filter
jumbo-frame crc-strip scatter
rx offload active: jumbo-frame scatter
tx offload avail: vlan-insert ipv4-cksum udp-cksum tcp-cksum sctp-cksum
tcp-tso
tx offload active: udp-cksum tcp-cksum
rss avail: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-tcp-ex
ipv6-udp-ex ipv6-ex ipv6-tcp-ex ipv6-udp-ex
rss active: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-tcp-ex
ipv6-udp-ex ipv6-ex ipv6-tcp-ex ipv6-udp-ex
tx burst function: eth_igb_xmit_pkts
rx burst function: eth_igb_recv_scattered_pkts
yazhou# show interface rx-placement
(查看线程在接口上的分布情况)
yazhou# show interface rx-placement
Thread 1 (vpp_wk_0):
node dpdk-input:
GigabitEthernet1/0/0 queue 0 (polling)
GigabitEthernet2/0/0 queue 0 (polling)
GigabitEthernet3/0/0 queue 0 (polling)
Thread 2 (vpp_wk_1):
node dpdk-input:
GigabitEthernet1/0/0 queue 1 (polling)
GigabitEthernet2/0/0 queue 1 (polling)
GigabitEthernet3/0/0 queue 1 (polling)
邮箱:[email protected] 欢迎交流