< Home

packet-capture startup

Function

The packet-capture startup command starts the packet capture process.

The undo packet-capture startup command stops the packet capture process.

Format

packet-capture [ hardware ] startup [ packet-len packet-len ] [ sample-rate sample-rate ] [ packet-num packet-num ]

undo packet-capture [ hardware ] startup

Parameters

Parameter Description Value

hardware

Indicates packet capture based on the hardware chip.

FW packets first pass through the NP chip and then are sent to the MPU CPU. After the hardware fast forwarding function is enabled by default, only some traffic is sent to the CPU. Therefore, the packets captured based on the hardware chip are more comprehensive. In addition, it helps reduce the CPU usage and is therefore recommended.

-

packet-len packet-len

Indicates the length of a captured packet.

The value ranges from 40 to 1500, in bytes. The default value is 40.

sample-rate sample-rate

Indicates the sample rate.

The value ranges from 1 to 10000. The default value is 100. That is, one packet from 100 packets is captured.

packet-num packet-num

Indicates the number of packets to be captured.

the value ranges from 1 to 1000 and default value is 1000.

Views

ALL view

Default Level

3: Management level

Usage Guidelines

The command is used for locating and rectifying network faults.

In a scenario where the 5-tuple packet capture function is enabled, if the configured packet capture length is larger than the actual packet length, information about the entire packet is captured, which may disclose user data. Exercise caution when you use this function.

Example

# Start the packet capture process and sets the number of packets to be captured to 800.

<sysname> system-view
[sysname] packet-capture startup packet-num 800
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >