1CAPINFOS(1)             The Wireshark Network Analyzer             CAPINFOS(1)
2
3
4

NAME

6       capinfos - Prints information about capture files
7

SYNOPSIS

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

DESCRIPTION

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

OPTIONS

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 fails
68           to open an input file or gets an error reading an input file.  By
69           default capinfos will continue processing files even if it gets an
70           error opening or reading a file.
71
72           Note: An error message will be written to stderr whenever capinfos
73           fails to open a file or gets an error reading from a file
74           regardless whether the -C option is specified or not.  Upon exit,
75           capinfos will return an error status if any errors occurred during
76           processing.
77
78       -d  Displays the total length of all packets in the file, in bytes.
79           This counts the size of the packets as they appeared in their
80           original form, not as they appear in this file.  For example, if a
81           packet was originally 1514 bytes and only 256 of those bytes were
82           saved to the capture file (if packets were captured with a snaplen
83           or other slicing option), Capinfos will consider the packet to have
84           been 1514 bytes.
85
86       -D  Displays a count of the number of decryption secrets in the file.
87
88       -e  Displays the end time of the capture.  Capinfos considers the
89           latest timestamp seen to be the end time, so the last packet in the
90           capture is not necessarily the latest - if packets exist "out-of-
91           order", time-wise, in the capture, Capinfos detects this.
92
93       -E  Displays the per-file encapsulation of the capture file.
94
95       -F  Displays additional capture file information.
96
97       -h  Prints the help listing and exits.
98
99       -H  Displays the SHA256, RIPEMD160, and SHA1 hashes for the file.  SHA1
100           output may be removed in the future.
101
102       -i  Displays the average data rate, in bits/sec
103
104       -I  Displays detailed capture file interface information. This
105           information is not available in table format.
106
107       -k  Displays the capture comment. For pcapng files, this is the comment
108           from the section header block.
109
110       -K  Use this option to suppress printing capture comments.  By default
111           capture comments are enabled.  Capture comments are relatively
112           freeform and might contain embedded new-line characters and/or
113           other delimiting characters making it harder for a human or machine
114           to easily parse the capinfos output.  Excluding capture comments
115           can aid in post-processing of output.
116
117       -l  Display the snaplen (if any) for a file.  snaplen (if available) is
118           determined from the capture file header and by looking for
119           truncated records in the capture file.
120
121       -L  Generate long report.  Capinfos can generate two different styles
122           of reports.  The "long" report is the default style of output and
123           is suitable for a human to use.
124
125       -m  Separate the infos with comma (,) characters.  This option is only
126           useful when generating a table style report (-T).  The various info
127           values will be separated (delimited) from one another with a single
128           comma "," character.
129
130       -M  Print raw (machine readable) numeric values in long reports.  By
131           default capinfos prints human-readable values with SI suffixes.
132           Table reports (-T) always print raw values.
133
134       -n  Displays a count of the number of resolved IPv4 addresses and a
135           count of the number of resolved IPv6 addresses in the file.
136
137       -N  Do not quote the infos.  This option is only useful when generating
138           a table style report (-T).  Excluding any quoting characters around
139           the various values and using a TAB delimiter produces a very
140           "clean" table report that is easily parsed with CLI tools.  By
141           default infos are NOT quoted.
142
143       -o  Displays "True" if packets exist in strict chronological order or
144           "False" if one or more packets in the capture exists "out-of-order"
145           time-wise.
146
147       -q  Quote infos with single quotes ('). This option is only useful when
148           generating a table style report (-T).  When this option is enabled,
149           each value will be encapsulated within a pair of single quote (')
150           characters.  This option (when used  with the -m option) is useful
151           for generating one type of CSV style file report.
152
153       -Q  Quote infos with double quotes (").  This option is only useful
154           when generating a table style report (-T).  When this option is
155           enabled, each value will be encapsulated within a pair of double
156           quote (") characters.  This option (when used with the -m option)
157           is useful for generating the most common type of CSV style file
158           report.
159
160       -r  Do not generate header record.  This option is only useful when
161           generating a table style report (-T).  If this option is specified
162           then no header record will be generated within the table report.
163
164       -R  Generate header record.  This option is only useful when generating
165           a table style report (-T).  A header is generated by default.  A
166           header record (if generated) is the first line of data reported and
167           includes labels for all the columns included within the table
168           report.
169
170       -s  Displays the size of the file, in bytes.  This reports the size of
171           the capture file itself.
172
173       -S  Display the start and end times as seconds since January 1, 1970.
174           Handy for synchronizing dumps using editcap -t.
175
176       -t  Displays the capture type of the capture file.
177
178       -T  Generate a table report. A table report is a text file that is
179           suitable for importing into a spreadsheet or database.  Capinfos
180           can build a tab delimited text file (the default) or several
181           variations on Comma-separated values (CSV) files.
182
183       -u  Displays the capture duration, in seconds.  This is the difference
184           in time between the earliest packet seen and latest packet seen.
185
186       -v  Displays the tool's version and exits.
187
188       -x  Displays the average packet rate, in packets/sec
189
190       -y  Displays the average data rate, in bytes/sec
191
192       -z  Displays the average packet size, in bytes
193

EXAMPLES

195       To see a description of the capinfos options use:
196
197           capinfos -h
198
199       To generate a long form report for the capture file mycapture.pcap use:
200
201           capinfos mycapture.pcap
202
203       To generate a TAB delimited table form report for the capture file
204       mycapture.pcap use:
205
206           capinfos -T mycapture.pcap
207
208       To generate a CSV style table form report for the capture file
209       mycapture.pcap use:
210
211           capinfos -T -m -Q mycapture.pcap
212
213       or
214
215           capinfos -TmQ mycapture.pcap
216
217       To generate a TAB delimited table style report with just the filenames,
218       capture type, capture encapsulation type and packet count for all the
219       pcap files in the current directory use:
220
221           capinfos -T -t -E -c *.pcap
222
223       or
224
225           capinfos -TtEs *.pcap
226
227       Note: The ability to use of filename globbing characters are a feature
228       of *nix style command shells.
229
230       To generate a CSV delimited table style report of all infos for all
231       pcap files in the current directory and write it to a text file called
232       mycaptures.csv use:
233
234           capinfos -TmQ *.pcap >mycaptures.csv
235
236       The resulting mycaptures.csv file can be easily imported into
237       spreadsheet applications.
238

SEE ALSO

240       pcap(3), wireshark(1), mergecap(1), editcap(1), tshark(1), dumpcap(1),
241       pcap-filter(7) or tcpdump(8)
242

NOTES

244       Capinfos is part of the Wireshark distribution.  The latest version of
245       Wireshark can be found at <https://www.wireshark.org>.
246
247       HTML versions of the Wireshark project man pages are available at:
248       <https://www.wireshark.org/docs/man-pages>.
249

AUTHORS

251         Original Author
252         -------- ------
253         Ian Schorr           <ian[AT]ianschorr.com>
254
255
256         Contributors
257         ------------
258         Gerald Combs         <gerald[AT]wireshark.org>
259         Jim Young            <jyoung[AT]gsu.edu>
260
261
262
2633.0.1                             2019-04-08                       CAPINFOS(1)
Impressum