FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
src/plugins/dispatch-trace

pcap dispatch trace

Summary/usage

pcap dispatch trace [on|off] [max <nn>] [file <name>] [status]
          [buffer-trace <input-node-name> <nn>][post-mortem].

Description

This command is used to start or stop pcap dispatch trace capture, or show the capture status.

This command has the following optional parameters:

  • <b>on|off</b> - Used to start or stop capture.
  • <b>max <nn></b> - Depth of local buffer. Once &#39;<em>nn</em>&#39; number of packets have been received, buffer is flushed to file. Once another &#39;<em>nn</em>&#39; number of packets have been received, buffer is flushed to file, overwriting previous write. If not entered, value defaults to 100. Can only be updated if packet capture is off.
  • <b>file <name></b> - Used to specify the output filename. The file will be placed in the &#39;<em>/tmp</em>&#39; directory, so only the filename is supported. Directory should not be entered. If file already exists, file will be overwritten. If no filename is provided, &#39;<em>/tmp/vpe.pcap</em>&#39; will be used. Can only be updated if packet capture is off.
  • <b>status</b> - Displays the current status and configured attributes associated with a packet capture. If packet capture is in progress, &#39;<em>status</em>&#39; also will return the number of packets currently in the local buffer. All additional attributes entered on command line with &#39;<em>status</em>&#39; will be ignored and not applied.
Example usage
Example of how to display the status of capture when off:
vpp# pcap dispatch trace status
max is 100, for any interface to file /tmp/vpe.pcap
pcap dispatch capture is off...
Example of how to start a dispatch trace capture:
vpp# pcap dispatch trace on max 35 file dispatchTrace.pcap
pcap dispatch capture on...
Example of how to start a dispatch trace capture with buffer tracing
vpp# pcap dispatch trace on max 10000 file dispatchTrace.pcap
  buffer-trace dpdk-input 1000
pcap dispatch capture on...
Example of how to display the status of a tx packet capture in progress:
vpp# pcap tx trace status
max is 35, dispatch trace to file /tmp/vppTest.pcap
pcap tx capture is on: 20 of 35 pkts...
Example of how to stop a tx packet capture:
vpp# vppctl pcap dispatch trace off
captured 21 pkts...
saved to /tmp/dispatchTrace.pcap...
Example of how to start a post-mortem dispatch trace:
pcap dispatch trace on max 20000 buffer-trace
    dpdk-input 3000000000 post-mortem

Declaration and implementation

Declaration: pcap_dispatch_trace_command (src/plugins/dispatch-trace/main.c line 497)

Implementation: dispatch_trace_command_fn.