Networking > Troubleshooting & Monitoring > Packet Capture

set capture session <session-number> interface <port-uuid-name> direction <capture-direction> [core <core-id>]

Configure 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 set capture session <session-number> [file <filename>] [count <packet-count>] [expression <expression>] command.

If you need to capture packets from only one interface, you can configure and run the packet capture with a single command: start capture interface <interface-name> [direction <direction>] [file <filename>] [count <packet-count>] [expression <expression>].

Use the get capture sessions command to see all configured capture sessions.

Parameters:

Option Description
<session-number> Session ID argument in numbers
<port-uuid-name> Datapath String argument
<capture-direction> Packet capture direction parameter
Allowed values: input, output, dual
<core-id> Core id for packet capture session
Allowed pattern: ^[0-9]+$


Example:

nsx-edge-1> set capture session 1 interface fp-eth0 direction dual core 1 nsx-edge-1> set capture session 1 interface fp-eth1 direction dual core 1 nsx-edge-1> get capture session 1 Packet Capture Session ID : 1 PORTS : ['fp-eth0', 'fp-eth1']

Mode:

Basic

Availability: