520
packet-capture read (on wired devices)
IMPORTANT:
To use the packet capture feature, you must install the feature image by using the boot-loader or
install command. For more information about the commands, see Fundamentals Command
Reference.
Use packet-capture read to display the contents in a packet file.
Syntax
packet-capture read filepath [ display-filter disp-expression ] [ raw | { brief | verbose } ] *
Views
User view
Predefined user roles
network-admin
Parameters
filepath: Specifies the full path of the packet file to store captured packet data. The path must be a
case-sensitive string of up to 64 characters. The filename extension must be .pcap or .pcapng. For
more information about setting a file path, see file system management in Fundamentals
Configuration Guide.
display-filter disp-expression: Specifies an expression to match packets to be displayed, a
case-sensitive string of 1 to 256 characters. If you do not specify a display filter expression, this
command displays all file contents.
raw: Displays file contents in hexadecimal notation. If you do not specify this keyword, the capture
displays packet data in a human-readable format.
brief: Displays brief information about captured packets in the file.
verbose: Displays detailed information about captured packets in the file.
Usage guidelines
If you do not specify the raw, brief, or verbose keyword, this command displays brief information
about captured packets in the file.
To stop displaying the file contents, press Ctrl+C.
Examples
# Display the contents in the file flash:/test/aaaa.pcap.
<Sysname> packet-capture read flash:/test/aaaa.pcap
Related commands
packet-capture