1CAPINFOS(1) The Wireshark Network Analyzer CAPINFOS(1)
2
3
4
6 capinfos - Prints information about capture files
7
9 capinfos [ -a ] [ -A ] [ -b ] [ -B ] [ -c ] [ -C ] [ -d ] [ -e ] [ -E ]
10 [ -F ] [ -h ] [ -H ] [ -i ] [ -I ] [ -k ] [ -K ] [ -l ] [ -L ] [ -m ]
11 [ -M ] [ -N ] [ -o ] [ -q ] [ -Q ] [ -r ] [ -R ] [ -s ] [ -S ] [ -t ]
12 [ -T ] [ -u ] [ -v ] [ -x ] [ -y ] [ -z ] <infile> ...
13
15 Capinfos is a program that reads one or more capture files and returns
16 some or all available statistics (infos) of each <infile> in one of two
17 types of output formats: long or table.
18
19 The long output is suitable for a human to read. The table output is
20 useful for generating a report that can be easily imported into a
21 spreadsheet or database.
22
23 The user specifies what type of output (long or table) and which
24 statistics to display by specifying flags (options) that corresponding
25 to the report type and desired infos. If no options are specified,
26 Capinfos will report all statistics available in "long" format.
27
28 Options are processed from left to right order with later options
29 superseding or adding to earlier options.
30
31 Capinfos is able to detect and read the same capture files that are
32 supported by Wireshark. The input files don't need a specific filename
33 extension; the file format and an optional gzip compression will be
34 automatically detected. Near the beginning of the DESCRIPTION section
35 of wireshark(1) or
36 <https://www.wireshark.org/docs/man-pages/wireshark.html> is a detailed
37 description of the way Wireshark handles this, which is the same way
38 Capinfos handles this.
39
41 -a Displays the start time of the capture. Capinfos considers the
42 earliest timestamp seen to be the start time, so the first packet
43 in the capture is not necessarily the earliest - if packets exist
44 "out-of-order", time-wise, in the capture, Capinfos detects this.
45
46 -A Generate all infos. By default capinfos will display all infos
47 values for each input file, but enabling any of the individual
48 display infos options will disable the generate all option.
49
50 -b Separate infos with ASCII SPACE (0x20) characters. This option is
51 only useful when generating a table style report (-T). The various
52 info values will be separated (delimited) from one another with a
53 single ASCII SPACE character.
54
55 NOTE: Since some of the header labels as well as some of the value
56 fields contain SPACE characters. This option is of limited value
57 unless one of the quoting options (-q or -Q) is also specified.
58
59 -B Separate the infos with ASCII TAB characters. This option is only
60 useful when generating a table style report (-T). The various info
61 values will be separated (delimited) from one another with a single
62 ASCII TAB character. The TAB character is the default delimiter
63 when -T style report is enabled.
64
65 -c Displays the number of packets in the capture file.
66
67 -C Cancel processing any additional files if and when capinfos should
68 fail to open an input file. By default capinfos will attempt to
69 open each and every file name argument.
70
71 Note: An error message will be written to stderr whenever capinfos
72 fails to open a file regardless of whether the -C option is
73 specified or not. Upon exit, capinfos will return an error status
74 if any errors occurred during processing.
75
76 -d Displays the total length of all packets in the file, in bytes.
77 This counts the size of the packets as they appeared in their
78 original form, not as they appear in this file. For example, if a
79 packet was originally 1514 bytes and only 256 of those bytes were
80 saved to the capture file (if packets were captured with a snaplen
81 or other slicing option), Capinfos will consider the packet to have
82 been 1514 bytes.
83
84 -e Displays the end time of the capture. Capinfos considers the
85 latest timestamp seen to be the end time, so the last packet in the
86 capture is not necessarily the latest - if packets exist "out-of-
87 order", time-wise, in the capture, Capinfos detects this.
88
89 -E Displays the per-file encapsulation of the capture file.
90
91 -F Displays additional capture file information.
92
93 -h Prints the help listing and exits.
94
95 -H Displays the SHA256, RIPEMD160, and SHA1 hashes for the file. SHA1
96 output may be removed in the future.
97
98 -i Displays the average data rate, in bits/sec
99
100 -I Displays detailed capture file interface information. This
101 information is not available in table format.
102
103 -k Displays the capture comment. For pcapng files, this is the comment
104 from the section header block.
105
106 -K Use this option to suppress printing capture comments. By default
107 capture comments are enabled. Capture comments are relatively
108 freeform and might contain embedded new-line characters and/or
109 other delimiting characters making it harder for a human or machine
110 to easily parse the capinfos output. Excluding capture comments
111 can aid in post-processing of output.
112
113 -l Display the snaplen (if any) for a file. snaplen (if available) is
114 determined from the capture file header and by looking for
115 truncated records in the capture file.
116
117 -L Generate long report. Capinfos can generate two different styles
118 of reports. The "long" report is the default style of output and
119 is suitable for a human to use.
120
121 -m Separate the infos with comma (,) characters. This option is only
122 useful when generating a table style report (-T). The various info
123 values will be separated (delimited) from one another with a single
124 comma "," character.
125
126 -M Print raw (machine readable) numeric values in long reports. By
127 default capinfos prints human-readable values with SI suffixes.
128 Table reports (-T) always print raw values.
129
130 -N Do not quote the infos. This option is only useful when generating
131 a table style report (-T). Excluding any quoting characters around
132 the various values and using a TAB delimiter produces a very
133 "clean" table report that is easily parsed with CLI tools. By
134 default infos are NOT quoted.
135
136 -o Displays "True" if packets exist in strict chronological order or
137 "False" if one or more packets in the capture exists "out-of-order"
138 time-wise.
139
140 -q Quote infos with single quotes ('). This option is only useful when
141 generating a table style report (-T). When this option is enabled,
142 each value will be encapsulated within a pair of single quote (')
143 characters. This option (when used with the -m option) is useful
144 for generating one type of CSV style file report.
145
146 -Q Quote infos with double quotes ("). This option is only useful
147 when generating a table style report (-T). When this option is
148 enabled, each value will be encapsulated within a pair of double
149 quote (") characters. This option (when used with the -m option)
150 is useful for generating the most common type of CSV style file
151 report.
152
153 -r Do not generate header record. This option is only useful when
154 generating a table style report (-T). If this option is specified
155 then no header record will be generated within the table report.
156
157 -R Generate header record. This option is only useful when generating
158 a table style report (-T). A header is generated by default. A
159 header record (if generated) is the first line of data reported and
160 includes labels for all the columns included within the table
161 report.
162
163 -s Displays the size of the file, in bytes. This reports the size of
164 the capture file itself.
165
166 -S Display the start and end times as seconds since January 1, 1970.
167 Handy for synchronizing dumps using editcap -t.
168
169 -t Displays the capture type of the capture file.
170
171 -T Generate a table report. A table report is a text file that is
172 suitable for importing into a spreadsheet or database. Capinfos
173 can build a tab delimited text file (the default) or several
174 variations on Comma-separated values (CSV) files.
175
176 -u Displays the capture duration, in seconds. This is the difference
177 in time between the earliest packet seen and latest packet seen.
178
179 -v Displays the tool's version and exits.
180
181 -x Displays the average packet rate, in packets/sec
182
183 -y Displays the average data rate, in bytes/sec
184
185 -z Displays the average packet size, in bytes
186
188 To see a description of the capinfos options use:
189
190 capinfos -h
191
192 To generate a long form report for the capture file mycapture.pcap use:
193
194 capinfos mycapture.pcap
195
196 To generate a TAB delimited table form report for the capture file
197 mycapture.pcap use:
198
199 capinfos -T mycapture.pcap
200
201 To generate a CSV style table form report for the capture file
202 mycapture.pcap use:
203
204 capinfos -T -m -Q mycapture.pcap
205
206 or
207
208 capinfos -TmQ mycapture.pcap
209
210 To generate a TAB delimited table style report with just the filenames,
211 capture type, capture encapsulation type and packet count for all the
212 pcap files in the current directory use:
213
214 capinfos -T -t -E -c *.pcap
215
216 or
217
218 capinfos -TtEs *.pcap
219
220 Note: The ability to use of filename globbing characters are a feature
221 of *nix style command shells.
222
223 To generate a CSV delimited table style report of all infos for all
224 pcap files in the current directory and write it to a text file called
225 mycaptures.csv use:
226
227 capinfos -TmQ *.pcap >mycaptures.csv
228
229 The resulting mycaptures.csv file can be easily imported into
230 spreadsheet applications.
231
233 pcap(3), wireshark(1), mergecap(1), editcap(1), tshark(1), dumpcap(1),
234 pcap-filter(7) or tcpdump(8)
235
237 Capinfos is part of the Wireshark distribution. The latest version of
238 Wireshark can be found at <https://www.wireshark.org>.
239
240 HTML versions of the Wireshark project man pages are available at:
241 <https://www.wireshark.org/docs/man-pages>.
242
244 Original Author
245 -------- ------
246 Ian Schorr <ian[AT]ianschorr.com>
247
248
249 Contributors
250 ------------
251 Gerald Combs <gerald[AT]wireshark.org>
252 Jim Young <jyoung[AT]gsu.edu>
253
254
255
2562.6.2 2018-07-18 CAPINFOS(1)