edge-appctl -t /var/run/vmware/edge/dpd.ctl kni/show | json_pp
"dev_name" : "span-0", --------------------------!!!
"ifuid" : 390,
"ifuuid" : "###-###-###-###-###",
"lcore" : 0,
"mac" : "##:##:##:##:##:##",
"mbuf_alloc_errors" : 0,
"stats" : {
"rx_bytes" : 0,
"rx_drops" : 0,
"rx_pkts" : 0,
"tx_bytes" : 61327396472069,
"tx_drops" : 35654560, ----------------------!!!
"tx_pkts" : 93852422480
},
"type" : 0
"dev_name" : "kni-lrport-0",
"ifuid" : 259,
"ifuuid" : "###-###-###-###-###",
"lcore" : 0,
"mac" : "##:##:##:##:##:##",
"mbuf_alloc_errors" : 0,
"stats" : {
"rx_bytes" : 196906306406,
"rx_drops" : 0,
"rx_pkts" : 2745172567,
"tx_bytes" : 143400350519,
"tx_drops" : 0,
"tx_pkts" : 1570210353
},
"type" : 0
VMware NSX 4.1.0
L7 LB packets are forwarded to the TCP/IP stack via the KNI sub-interface, so in most cases, the "kni_single" thread is utilized when L7 virtual servers experience high network traffic.
However, in this scenario, the "span-#" interface is created when the command "set capture session #" is executed to capture packets on the edge node.
Even if your environment only uses L4 TCP LB services, the CPU usage of the "kni_single" thread can increase during packet capture.
nsxcli.log
<TIME_STAMP> 2657104 cli.server.cli_command_service INFO {10000} CMD: set capture session 0 interface ###-###-###-###-### direction dual
<TIME_STAMP> 2657104 cli.audit INFO CMD: set capture session 0 interface ###-###-###-###-### direction dual (duration: 0.016s), Operation status: CMD_EXECUTED
<TIME_STAMP> 2657104 cli.server.cli_command_service INFO {10000} CMD: exit
<TIME_STAMP> 2657104 cli.audit INFO CMD: exit (duration: 0.000s), Operation status: CMD_EXECUTED_REQUESTED_EXIT
<TIME_STAMP> 2657104 cli INFO NSX CLI stopped for user: admin
<TIME_STAMP> 2658768 cli INFO NSX CLI started (Edge) for user: admin
kern.log
<TIME_STAMP> ### kernel - - - [6955178.452519] getrandom: Device open
<TIME_STAMP> ### kernel - - - [6955178.452529] getrandom: Device close
<TIME_STAMP> ### kernel - - - [6955179.089387] rte_kni: Creating kni..
edge> get capture session
<TIME_STAMP>
Packet Capture Session
ID : 0
PORTS : ['fp-eth0']
edge> del capture session 0