1CAPINFOS(1) CAPINFOS(1)
2
3
4
6 capinfos - Prints information about capture files
7
9 capinfos [ -a ] [ -A ] [ -b ] [ -B ] [ -c ] [ -C ] [ -d ] [ -D ] [ -e ]
10 [ -E ] [ -F ] [ -h ] [ -H ] [ -i ] [ -I ] [ -k ] [ -K ] [ -l ] [ -L ]
11 [ -m ] [ -M ] [ -n ] [ -N ] [ -o ] [ -q ] [ -Q ] [ -r ] [ -R ] [ -s ]
12 [ -S ] [ -t ] [ -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, zstd or lz4
34 compression will be automatically detected. Near the beginning of the
35 DESCRIPTION section 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
42
43 Displays the start time of the capture. Capinfos considers the
44 earliest timestamp seen to be the start time, so the first packet
45 in the capture is not necessarily the earliest - if packets exist
46 "out-of-order", time-wise, in the capture, Capinfos detects this.
47
48 -A
49
50 Generate all infos. By default Capinfos will display all infos
51 values for each input file, but enabling any of the individual
52 display infos options will disable the generate all option.
53
54 -b
55
56 Separate infos with ASCII SPACE (0x20) characters. This option is
57 only useful when generating a table style report (-T). The various
58 info values will be separated (delimited) from one another with a
59 single ASCII SPACE character.
60
61 Note
62 Since some of the header labels as well as some of the value
63 fields contain SPACE characters. This option is of limited
64 value unless one of the quoting options (-q or -Q) is also
65 specified.
66
67 -B
68
69 Separate the infos with ASCII TAB characters. This option is only
70 useful when generating a table style report (-T). The various info
71 values will be separated (delimited) from one another with a single
72 ASCII TAB character. The TAB character is the default delimiter
73 when -T style report is enabled.
74
75 -c
76
77 Displays the number of packets in the capture file.
78
79 -C
80
81 Cancel processing any additional files if and when Capinfos fails
82 to open an input file or gets an error reading an input file. By
83 default Capinfos will continue processing files even if it gets an
84 error opening or reading a file.
85
86 Note: An error message will be written to stderr whenever Capinfos
87 fails to open a file or gets an error reading from a file
88 regardless whether the -C option is specified or not. Upon exit,
89 Capinfos will return an error status if any errors occurred during
90 processing.
91
92 -d
93
94 Displays the total length of all packets in the file, in bytes.
95 This counts the size of the packets as they appeared in their
96 original form, not as they appear in this file. For example, if a
97 packet was originally 1514 bytes and only 256 of those bytes were
98 saved to the capture file (if packets were captured with a snaplen
99 or other slicing option), Capinfos will consider the packet to have
100 been 1514 bytes.
101
102 -D
103
104 Displays a count of the number of decryption secrets in the file.
105 This information is not available in table format.
106
107 -e
108
109 Displays the end time of the capture. Capinfos considers the latest
110 timestamp seen to be the end time, so the last packet in the
111 capture is not necessarily the latest - if packets exist
112 "out-of-order", time-wise, in the capture, Capinfos detects this.
113
114 -E
115
116 Displays the per-file encapsulation of the capture file.
117
118 -F
119
120 Displays additional capture file information.
121
122 -h|--help
123
124 Prints the help listing and exits.
125
126 -H
127
128 Displays the SHA256 and SHA1 hashes for the file. SHA1 output may
129 be removed in the future.
130
131 -i
132
133 Displays the average data rate, in bits/sec
134
135 -I
136
137 Displays detailed capture file interface information. This
138 information is not available in table format.
139
140 -k
141
142 Displays the capture comment. For pcapng files, this is the comment
143 from the section header block.
144
145 -K
146
147 Use this option to suppress printing capture comments. By default
148 capture comments are enabled. Capture comments are relatively
149 freeform and might contain embedded new-line characters and/or
150 other delimiting characters making it harder for a human or machine
151 to easily parse the Capinfos output. Excluding capture comments can
152 aid in post-processing of output.
153
154 -l
155
156 Display the snaplen (if any) for a file. snaplen (if available) is
157 determined from the capture file header and by looking for
158 truncated records in the capture file.
159
160 -L
161
162 Generate long report. Capinfos can generate two different styles of
163 reports. The "long" report is the default style of output and is
164 suitable for a human to use.
165
166 -m
167
168 Separate the infos with comma (,) characters. This option is only
169 useful when generating a table style report (-T). The various info
170 values will be separated (delimited) from one another with a single
171 comma "," character.
172
173 -M
174
175 Print raw (machine readable) values in long reports. By default
176 Capinfos prints numeric values with human-readable SI suffixes, and
177 shows human-readable file type and encapsulation. Table reports
178 (-T) always print raw values.
179
180 -n
181
182 Displays a count of the number of resolved IPv4 addresses and a
183 count of the number of resolved IPv6 addresses in the file. This
184 information is not available in table format.
185
186 -N
187
188 Do not quote the infos. This option is only useful when generating
189 a table style report (-T). Excluding any quoting characters around
190 the various values and using a TAB delimiter produces a very
191 "clean" table report that is easily parsed with CLI tools. By
192 default infos are NOT quoted.
193
194 -o
195
196 Displays "True" if packets exist in strict chronological order or
197 "False" if one or more packets in the capture exists "out-of-order"
198 time-wise.
199
200 -q
201
202 Quote infos with single quotes ('). This option is only useful when
203 generating a table style report (-T). When this option is enabled,
204 each value will be encapsulated within a pair of single quote (')
205 characters. This option (when used with the -m option) is useful
206 for generating one type of CSV style file report.
207
208 -Q
209
210 Quote infos with double quotes ("). This option is only useful when
211 generating a table style report (-T). When this option is enabled,
212 each value will be encapsulated within a pair of double quote (")
213 characters. This option (when used with the -m option) is useful
214 for generating the most common type of CSV style file report.
215
216 -r
217
218 Do not generate header record. This option is only useful when
219 generating a table style report (-T). If this option is specified
220 then no header record will be generated within the table report.
221
222 -R
223
224 Generate header record. This option is only useful when generating
225 a table style report (-T). A header is generated by default. A
226 header record (if generated) is the first line of data reported and
227 includes labels for all the columns included within the table
228 report.
229
230 -s
231
232 Displays the size of the file, in bytes. This reports the size of
233 the capture file itself.
234
235 -S
236
237 Display the start and end times as seconds since January 1, 1970.
238 Handy for synchronizing dumps using editcap -t.
239
240 -t
241
242 Displays the capture type of the capture file.
243
244 -T
245
246 Generate a table report. A table report is a text file that is
247 suitable for importing into a spreadsheet or database. Capinfos can
248 build a tab delimited text file (the default) or several variations
249 on Comma-separated values (CSV) files.
250
251 -u
252
253 Displays the capture duration, in seconds. This is the difference
254 in time between the earliest packet seen and latest packet seen.
255
256 -v|--version
257
258 Displays the tool’s version and exits.
259
260 -x
261
262 Displays the average packet rate, in packets/sec
263
264 -y
265
266 Displays the average data rate, in bytes/sec
267
268 -z
269
270 Displays the average packet size, in bytes
271
273 --log-level <level>
274 Set the active log level. Supported levels in lowest to highest
275 order are "noisy", "debug", "info", "message", "warning",
276 "critical", and "error". Messages at each level and higher will be
277 printed, for example "warning" prints "warning", "critical", and
278 "error" messages and "noisy" prints all messages. Levels are case
279 insensitive.
280
281 --log-fatal <level>
282 Abort the program if any messages are logged at the specified level
283 or higher. For example, "warning" aborts on any "warning",
284 "critical", or "error" messages.
285
286 --log-domains <list>
287 Only print messages for the specified log domains, e.g.
288 "GUI,Epan,sshdump". List of domains must be comma-separated.
289
290 --log-debug <list>
291 Force the specified domains to log at the "debug" level. List of
292 domains must be comma-separated.
293
294 --log-noisy <list>
295 Force the specified domains to log at the "noisy" level. List of
296 domains must be comma-separated.
297
298 --log-file <path>
299 Write log messages and stderr output to the specified file.
300
302 To see a description of the options use:
303
304 capinfos -h
305
306 To generate a long form report for the capture file mycapture.pcap use:
307
308 capinfos mycapture.pcap
309
310 To generate a TAB delimited table form report for the capture file
311 mycapture.pcap use:
312
313 capinfos -T mycapture.pcap
314
315 To generate a CSV style table form report for the capture file
316 mycapture.pcap use:
317
318 capinfos -T -m -Q mycapture.pcap
319
320 or
321
322 capinfos -TmQ mycapture.pcap
323
324 To generate a TAB delimited table style report with just the filenames,
325 capture type, capture encapsulation type and packet count for all the
326 pcap files in the current directory use:
327
328 capinfos -T -t -E -c *.pcap
329
330 or
331
332 capinfos -TtEc *.pcap
333
334 Note: The ability to use of filename globbing characters are a feature
335 of *nix style command shells.
336
337 To generate a CSV delimited table style report of all infos for all
338 pcap files in the current directory and write it to a text file called
339 mycaptures.csv use:
340
341 capinfos -TmQ *.pcap >mycaptures.csv
342
343 The resulting mycaptures.csv file can be easily imported into
344 spreadsheet applications.
345
347 pcap(3), wireshark(1), mergecap(1), editcap(1), tshark(1), dumpcap(1),
348 captype(1), pcap-filter(7) or tcpdump(8)
349
351 This is the manual page for Capinfos 4.0.8. Capinfos is part of the
352 Wireshark distribution. The latest version of Wireshark can be found at
353 https://www.wireshark.org.
354
355 HTML versions of the Wireshark project man pages are available at
356 https://www.wireshark.org/docs/man-pages.
357
359 Original Author
360 Ian Schorr <ian[AT]ianschorr.com>
361
362 Contributors
363 Gerald Combs <gerald[AT]wireshark.org>
364 Jim Young <jyoung[AT]gsu.edu>
365
366
367
368 2023-08-31 CAPINFOS(1)