NSX CLI Guide
Associated Commands:
CLI Description | Command | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete all packet capture sessionsDelete all packet capture sessions. |
del all capture sessions
|
||||||||||||||||||||||||||||||||||||||
Delete packet capture sessionDelete a packet capture session configuration. |
del capture session <dpd-number-session-id-arg>
|
||||||||||||||||||||||||||||||||||||||
Delete a configured packet capture sessionDelete a packet capture session configuration. |
del capture session <dpd-number-session-id-arg>
|
||||||||||||||||||||||||||||||||||||||
Delete an interface from a packet capture sessionDelete the specified interface from a packet capture session configuration. If you are only monitoring one interface, this deletes the monitoring session configuration. |
del capture session <dpd-number-session-id-arg> interface <dpd-uuid-name-port-arg>
|
||||||||||||||||||||||||||||||||||||||
Delete an interface from a packet capture sessionDelete the specified interface from a packet capture session configuration. If you are only monitoring one interface, this deletes the monitoring session configuration. |
del capture session <dpd-number-session-id-arg> interface <variable-interface-name>
|
||||||||||||||||||||||||||||||||||||||
Delete a configured packet capture sessionDelete a packet capture session configuration. |
del capture session <esx-session-id-arg>
|
||||||||||||||||||||||||||||||||||||||
Delete packet capture sessionDelete the specified packet capture session. |
del capture session <session-id-arg>
|
||||||||||||||||||||||||||||||||||||||
Display packet capture resultDisplay the result of the specified packet capture session with the tcpdump command. |
display capture session <session-id-arg>
|
||||||||||||||||||||||||||||||||||||||
Display packet capture resultDisplay packet capture result with command tcpdump. |
display capture session <session-id-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Query all packet capture sessionsDisplay information for all packet capture sessions. |
get all capture sessions
|
||||||||||||||||||||||||||||||||||||||
Display a packet capture sessionDisplay information about the specified packet capture session. |
get capture session <dpd-number-session-id-arg>
|
||||||||||||||||||||||||||||||||||||||
Display a packet capture sessionDisplay information about the specified packet capture session. |
get capture session <esx-session-id-arg>
|
||||||||||||||||||||||||||||||||||||||
Query packet capture sessionDisplay information for the specified packet capture session. |
get capture session <session-id-arg>
|
||||||||||||||||||||||||||||||||||||||
Display packet capture sessionsDisplay configured packet capture sessions. Session 0 is reserved for captures started with the start capture interface <interface-name> command. |
get capture sessions
|
||||||||||||||||||||||||||||||||||||||
Display packet capture sessionsDisplay configured packet capture sessions. |
get capture sessions
|
||||||||||||||||||||||||||||||||||||||
Display specified counter's detailed description.Display specified counter's detailed description. |
get livetrace datapath-stats module <mod_name_arg_esx> counter <ctr_name_arg_esx> description verbose
|
||||||||||||||||||||||||||||||||||||||
List all the counters with brief description for the specified module.List all the counters with brief description for the specified module. |
get livetrace datapath-stats module <mod_name_arg_esx> counters list
|
||||||||||||||||||||||||||||||||||||||
Display specified kernel module's detailed description.Display specified kernel module's detailed description. |
get livetrace datapath-stats module <mod_name_arg_esx> description verbose
|
||||||||||||||||||||||||||||||||||||||
List all the observability enabled kernel modules.List all the observability enabled kernel modules with. |
get livetrace datapath-stats modules list
|
||||||||||||||||||||||||||||||||||||||
Display all the counters for the specified livetrace session.Display all the counters for the specified livetrace session. |
get livetrace datapath-stats session <session-id> all
|
||||||||||||||||||||||||||||||||||||||
Display all drop counters of all modules for the specified livetrace session.Display all drop counters of all modules for the specified livetrace session. |
get livetrace datapath-stats session <session-id> drops
|
||||||||||||||||||||||||||||||||||||||
Display new drop counters for the specified livetrace session.Display new drop counters of all modules for the specified livetrace session. |
get livetrace datapath-stats session <session-id> drops new
|
||||||||||||||||||||||||||||||||||||||
Display all the counters for the specified livetrace session and module.Display all the counters for the specified livetrace session and module. |
get livetrace datapath-stats session <session-id> module <mod_name_arg_esx> all
|
||||||||||||||||||||||||||||||||||||||
Display all new counters for the specified livetrace session and module.Display all new counters for the specified livetrace session and module. |
get livetrace datapath-stats session <session-id> module <mod_name_arg_esx> all new
|
||||||||||||||||||||||||||||||||||||||
Display drop counters for the specified livetrace session and module.Display drop counters for the specified livetrace session and module. |
get livetrace datapath-stats session <session-id> module <mod_name_arg_esx> drops
|
||||||||||||||||||||||||||||||||||||||
Display new drop counters for the specified livetrace session and module.Display new drop counters for the specified livetrace session and module. |
get livetrace datapath-stats session <session-id> module <mod_name_arg_esx> drops new
|
||||||||||||||||||||||||||||||||||||||
List all the datapath-stats enabled livetrace sessions.List all the datapath-stats enabled livetrace sessions. |
get livetrace datapath-stats sessions list
|
||||||||||||||||||||||||||||||||||||||
Display help information on runbook usageDisplay help information on runbook usage. |
get runbook <runbook-id-arg> help
|
||||||||||||||||||||||||||||||||||||||
Display runbook informationDisplay information of available runbooks on the current node. |
get runbooks
|
||||||||||||||||||||||||||||||||||||||
Configure livetrace session.Configure livetrace session. |
livetrace config <action-type> <dpd-uuid-name-port-arg> protocol <proto-num> source-ip <network46-address> <l4-port-range-arg> dest-ip <network46-address> <l4-port-range-arg> timeout <time-out>
|
||||||||||||||||||||||||||||||||||||||
Configure livetrace session for ESP protocol with IP.Configure livetrace session for ESP protocol with IP.. |
livetrace config <action-type> <dpd-uuid-name-port-arg> protocol <proto-num> source-ip <network46-address> dest-ip <network46-address> timeout <time-out>
|
||||||||||||||||||||||||||||||||||||||
Configure livetrace session for ESP protocol with SPI.Configure livetrace session for ESP protocol with SPI.. |
livetrace config <action-type> <dpd-uuid-name-port-arg> protocol <proto-num> spi <spi-value> timeout <time-out>
|
||||||||||||||||||||||||||||||||||||||
Configure livetrace session for all packets.Configure livetrace session for all packets. |
livetrace config <action-type> <dpd-uuid-name-port-arg> protocol <proto-num> timeout <time-out>
|
||||||||||||||||||||||||||||||||||||||
Get live trace session information.Retrieve live trace session information. |
livetrace show
|
||||||||||||||||||||||||||||||||||||||
Display packet capture on sessionStart a packet capture. You must have already configured the packet capture with the set capture session <session-number> interface <port-uuid-name> direction <direction> command in basic mode, or with the set capture session <session-number> direction <direction> command in path mode. Use the |
set capture session <dpd-number-session-id-arg>
|
||||||||||||||||||||||||||||||||||||||
Monitor current port in a packet capture sessionConfigure a packet capture using the current interface in the path. You can change the current interface and run this command again to configure multiple interfaces on the same packet capture session. Start the packet capture with the Use the |
set capture session <dpd-number-session-id-arg> direction <capture-direction-arg>
|
||||||||||||||||||||||||||||||||||||||
Monitor a port in a packet capture sessionConfigure a packet capture using the specified interface. You can run this command multiple times to configure multiple interfaces on the same packet capture session. To run the packet capture using this configuration, use the
If you need to capture packets from only one interface, you
can configure and run the packet capture with a single command:
Use the |
set capture session <dpd-number-session-id-arg> interface <variable-interface-name> direction <capture-direction-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture for the specified sessionStart a packet capture. You must have already configured the packet capture with the set capture session
<session-number> interface <port-uuid-name>
direction <direction> command.
If you don't specify a file, the output displays on the terminal. Type Control-C to end the packet capture. You can filter the capture using tcpdump expressions. The expression must be the last argument of the command. Use the |
set capture session <session-number> [file <filename>] [count <packet-count>] [expression <expression>]
|
||||||||||||||||||||||||||||||||||||||
Start packet capture for the specified sessionStart a packet capture. You must have already configured the packet capture with the set capture session
<session-number> interface <port-uuid-name>
direction <direction> command.
If you don't specify a file, the output displays on the terminal. If file is specified, the file count can be specified to enable rotating capture files, where each file will be of size 100MB. Multiple files will be bundled into single tarfile. Type Control-C to end the packet capture. You can filter the capture using tcpdump expressions. The expression must be the last argument of the command. Use the |
set capture session <session-number> [file <filename>] [file-count <file-count>] [count <packet-count>] [expression <expression>]
|
||||||||||||||||||||||||||||||||||||||
Monitor a port on a certain core in a packet capture sessionConfigure a packet capture using the specified interface. You can run this command multiple times to configure multiple interfaces on the same packet capture session. On a LAG interface, LACP packets will also be captured when the direction of packet capture is ingress or dual. To run the packet capture using this configuration, use the
If you need to capture packets from only one interface, you
can configure and run the packet capture with a single command:
Use the |
set capture session <session-number> interface <port-uuid-name> direction <capture-direction> [core <core-id>]
|
||||||||||||||||||||||||||||||||||||||
Show packet capture on dvfilterDisplay a packet capture on a given dvfilter. To get a list of dvfilter names, enter start capture dvfilter followed by a space and the Tab key. |
start capture dvfilter <esx-dvfilter-name-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on given interface with multiple options and save to fileStart a packet capture on the specified interface in the given direction and core. If you do not specify a file, the output is displayed on the terminal. If file is specified, the file count can be specified to enable rotating capture files, where each file will be of size 100MB. Multiple files will be bundled into single tarfile. Type Control-C to end the packet capture. You can filter the capture using tcpdump expressions. The expression must be the last argument of the command. The expression is a keyword followed by a value. You can specify multiple keyword-value pairs. |
start capture interface <interface-name> [direction <direction>] [core <core-id>] [snaplen <capture-snaplen-arg] [file <filename>] [file-count <file-count>] [expression <expression>]
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on given interface with multiple options and save to fileStart a packet capture on the specified interface in the given direction. If you do not specify a file, the output is displayed on the terminal. Type Control-C to end the packet capture. You can filter the capture using tcpdump expressions. The expression must be the last argument of the command. The expression is a keyword followed by a value. You can specify multiple keyword-value pairs. The list of keywords and acceptable values are:
|
start capture interface <interface-name> [direction <direction>] [file <filename>] [count <packet-count>] [expression <expression>]
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in standalone mode with given fcport. |
start capture node <cap-node-id-arg> fcport <fcport-id-arg> direction <capture-direction-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in standalone mode with given fcport. |
start capture node <cap-node-id-arg> fcport <fcport-id-arg> direction <capture-direction-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in steam mode with given fcport. |
start capture node <cap-node-id-arg> fcport <fcport-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in steam mode with given fcport. |
start capture node <cap-node-id-arg> fcport <fcport-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given filterStart packet capture in standalone mode with given filter. |
start capture node <cap-node-id-arg> filter <filter-name-arg> stage <stage-type-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given filterStart packet capture in standalone mode with given filter. |
start capture node <cap-node-id-arg> filter <filter-name-arg> stage <stage-type-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given filterStart packet capture in stream mode with given filter. |
start capture node <cap-node-id-arg> filter <filter-name-arg> stage <stage-type-arg> stream-to <receiver-address-arg> port <receiver-port-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given filterStart packet capture in stream mode with given filter. |
start capture node <cap-node-id-arg> filter <filter-name-arg> stage <stage-type-arg> stream-to <receiver-address-arg> port <receiver-port-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in standalone mode with given interface. |
start capture node <cap-node-id-arg> interface <cap-interface-id-arg> direction <capture-direction-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in standalone mode with given interface. |
start capture node <cap-node-id-arg> interface <cap-interface-id-arg> direction <capture-direction-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in stream mode with given interface. |
start capture node <cap-node-id-arg> interface <cap-interface-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in stream mode with given interface. |
start capture node <cap-node-id-arg> interface <cap-interface-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in standalone mode with given pnic. |
start capture node <cap-node-id-arg> pnic <pnic-value-arg> direction <capture-direction-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in standalone mode with given pnic. |
start capture node <cap-node-id-arg> pnic <pnic-value-arg> direction <capture-direction-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in steam mode with given pnic. |
start capture node <cap-node-id-arg> pnic <pnic-value-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in steam mode with given pnic. |
start capture node <cap-node-id-arg> pnic <pnic-value-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given parametersStart packet capture in standalone mode with given parameters. |
start capture node <cap-node-id-arg> vdrport <vdrport-id-arg> direction <capture-direction-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given parametersStart packet capture in standalone mode with given parameters. |
start capture node <cap-node-id-arg> vdrport <vdrport-id-arg> direction <capture-direction-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given parametersStart packet capture on ESXi node with given parameters. |
start capture node <cap-node-id-arg> vdrport <vdrport-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given parametersStart packet capture on ESXi node with given parameters. |
start capture node <cap-node-id-arg> vdrport <vdrport-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in standalone mode with given vif. |
start capture node <cap-node-id-arg> vif <vif-id-arg> direction <capture-direction-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in standalone mode with given vif. |
start capture node <cap-node-id-arg> vif <vif-id-arg> direction <capture-direction-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in stream mode with given vif. |
start capture node <cap-node-id-arg> vif <vif-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on node with given parametersStart packet capture in stream mode with given vif. |
start capture node <cap-node-id-arg> vif <vif-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given vmknicStart packet capture in standalone mode on ESXi node with given vmknic. |
start capture node <cap-node-id-arg> vmknic <vmknic-id-arg> direction <capture-direction-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given parametersStart packet capture in standalone mode with given parameters. |
start capture node <cap-node-id-arg> vmknic <vmknic-id-arg> direction <capture-direction-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given vmknicStart packet capture on ESXi node with given vmknic. |
start capture node <cap-node-id-arg> vmknic <vmknic-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given vmknicStart packet capture on ESXi node with given vmknic. |
start capture node <cap-node-id-arg> vmknic <vmknic-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given vmnicStart packet capture in standalone mode on ESXi node with given vmnic. |
start capture node <cap-node-id-arg> vmnic <vmnic-id-arg> direction <capture-direction-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given parametersStart packet capture in standalone mode with given parameters. |
start capture node <cap-node-id-arg> vmnic <vmnic-id-arg> direction <capture-direction-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given vmnicStart packet capture on ESXi node with given vmnic. |
start capture node <cap-node-id-arg> vmnic <vmnic-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given vmnicStart packet capture on ESXi node with given vmnic. |
start capture node <cap-node-id-arg> vmnic <vmnic-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given vnicStart packet capture in standalone mode on ESXi node with given vnic. |
start capture node <cap-node-id-arg> vnic <vnic-id-arg> direction <capture-direction-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given parametersStart packet capture in standalone mode with given parameters. |
start capture node <cap-node-id-arg> vnic <vnic-id-arg> direction <capture-direction-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given vnicStart packet capture on ESXi node with given vnic. |
start capture node <cap-node-id-arg> vnic <vnic-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg>
|
||||||||||||||||||||||||||||||||||||||
Start packet capture on ESXi node with given vnicStart packet capture on ESXi node with given vnic. |
start capture node <cap-node-id-arg> vnic <vnic-id-arg> direction <capture-direction-arg> stream-to <receiver-address-arg> port <receiver-port-arg> parameters <capture-options-arg>
|
||||||||||||||||||||||||||||||||||||||
Show packet capture on all interfacesDisplay a packet capture on all available interfaces. |
start capture trace
|
||||||||||||||||||||||||||||||||||||||
Start a runbook invocation with multiple arguments specifiedStart an invocation of a specified runbook. You can also pass arguments for the certain invocation. The specification of runbook parameters can vary as per individual runbook and can be found by command `get runbook |
start invocation runbook <runbook-id> [runbook-arg <runbook-param>]
|
||||||||||||||||||||||||||||||||||||||
Stop packet captureStop packet capture by session id. |
stop capture session <session-id-arg>
|
||||||||||||||||||||||||||||||||||||||
Trace an injected packetTrace the specified packet. |
traceflow <dpd-uuid-name-port-arg> <dpd-string-base64-arg>
|