4 capinfos - Prints information about capture files
38 B<Capinfos> is a program that reads one or more capture files and
39 returns some or all available statistics (infos) of each E<lt>I<infile>E<gt>
40 in one of two types of output formats: long or table.
42 The long output is suitable for a human to read. The table output
43 is useful for generating a report that can be easily imported into
44 a spreadsheet or database.
46 The user specifies what type of output (long or table) and which
47 statistics to display by specifying flags (options) that corresponding
48 to the report type and desired infos. If no options are specified,
49 B<Capinfos> will report all statistics available in "long" format.
51 Options are processed from left to right order with later options
52 superceeding or adding to earlier options.
54 B<Capinfos> is able to detect and read the same capture files that are
55 supported by B<Wireshark>.
56 The input files don't need a specific filename extension; the file
57 format and an optional gzip compression will be automatically detected.
58 Near the beginning of the DESCRIPTION section of wireshark(1) or
59 L<http://www.wireshark.org/docs/man-pages/wireshark.html>
60 is a detailed description of the way B<Wireshark> handles this, which is
61 the same way B<Capinfos> handles this.
69 Displays the capture type of the capture file.
73 Displays the per-file encapsulation of the capture file.
77 Displays the number of packets in the capture file.
81 Displays the size of the file, in bytes. This reports
82 the size of the capture file itself.
86 Displays the total length of all packets in the file, in
87 bytes. This counts the size of the packets as they appeared
88 in their original form, not as they appear in this file.
89 For example, if a packet was originally 1514 bytes and only
90 256 of those bytes were saved to the capture file (if packets
91 were captured with a snaplen or other slicing option),
92 B<Capinfos> will consider the packet to have been 1514 bytes.
96 Displays the capture duration, in seconds. This is the
97 difference in time between the earliest packet seen and
102 Displays the start time of the capture. B<Capinfos> considers
103 the earliest timestamp seen to be the start time, so the
104 first packet in the capture is not necessarily the earliest -
105 if packets exist "out-of-order", time-wise, in the capture,
106 B<Capinfos> detects this.
110 Displays the end time of the capture. B<Capinfos> considers
111 the latest timestamp seen to be the end time, so the
112 last packet in the capture is not necessarily the latest -
113 if packets exist "out-of-order", time-wise, in the capture,
114 B<Capinfos> detects this.
118 Displays the average data rate, in bytes/sec
122 Displays the average data rate, in bits/sec
126 displays the average packet size, in bytes
130 displays the average packet rate, in packets/sec
134 Generate long report. Capinfos can generate two
135 different styles of reports. The "long" report is
136 the default style of output and is suitable for a
141 Generate a table report. A table report is a text file
142 that is suitable for importing into a spreadsheet or
143 database. Capinfos can build a tab delimited text file
144 (the default) or several variations on Comma-separated
149 Generate header record. This option is only useful
150 when generating a table style report (-T). A header
151 is generated by default. A header record (if generated)
152 is the first line of data reported and includes labels
153 for all the columns included within the table report.
158 Do not generate header record. This option is only
159 useful when generating a table style report (-T).
160 If this option is specified then B<no> header record will be
161 generated within the table report.
166 Separate the infos with ASCII TAB characters.
167 This option is only useful when generating a table
168 style report (-T). The various info values will be
169 separated (delimited) from one another with a single
170 ASCII TAB character. The TAB character is the default
171 delimiter when -T style report is enabled.
175 Separate the infos with comma (,) characters. This option
176 is only useful when generating a table style report (-T).
177 The various info values will be separated (delimited)
178 from one another with a single comma "," character.
182 Separate infos with ASCII SPACE (0x20) characters.
183 This option is only useful when generating a table
184 style report (-T). The various info values will be
185 separated (delimited) from one another with a single
186 ASCII SPACE character.
188 NOTE: Since some of the header labels as well as some
189 of the value fields contain SPACE characters. This
190 option is of limited value unless one of the quoting
191 options (-q or -Q) is also specified.
195 Do not quote the infos. This option is only useful
196 when generating a table style report (-T). Excluding
197 any quoting characters around the various values and
198 using a TAB delimiter produces a very "clean" table
199 report that is easily parsed with CLI tools. By
200 default infos are B<NOT> quoted.
205 Quote infos with single quotes ('). This option is
206 only useful when generating a table style report (-T).
207 When this option is enabled, each value will be
208 encapsulated within a pair of single quote (')
209 characters. This option (when used with the -m
210 option) is useful for generating one type of CSV
215 Quote infos with double quotes ("). This option is
216 only useful when generating a table style report (-T).
217 When this option is enabled, each value will be
218 encapsulated within a pair of double quote (")
219 characters. This option (when used with the -m
220 option) is useful for generating the most common
221 type of CSV style file report.
225 Prints the help listing and exits.
229 Cancel processing any additional files if and
230 when capinfos should fail to open an input file.
231 By default capinfos will attempt to open each and
232 every file name argument.
234 Note: An error message will be written to stderr
235 whenever capinfos fails to open a file regardless
236 of whether the -C option is specified or not.
240 Generate all infos. By default capinfos will display
241 all infos values for each input file, but enabling
242 any of the individual display infos options will
243 disable the generate all option.
250 To see a description of the capinfos options use:
254 To generate a long form report for the capture file
257 capinfos mycapture.pcap
259 To generate a TAB delimited table form report for the capture
260 file mycapture.pcap use:
262 capinfos -T mycapture.pcap
264 To generate a CSV style table form report for the capture
265 file mycapture.pcap use:
267 capinfos -T -m -Q mycapture.pcap
271 capinfos -TmQ mycapture.pcap
274 To generate a TAB delimited table style report with just the
275 filenames, capture type, capture encapsulation type and packet
276 count for all the pcap files in the current directory use:
278 capinfos -T -t -E -c *.pcap
282 capinfos -TtEs *.pcap
284 Note: The ability to use of filename globbing characters are
285 a feature of *nix style command shells.
287 To generate a CSV delimited table style report of all infos
288 for all pcap files in the current directory and write it to
289 a text file called mycaptures.csv use:
291 capinfos -TmQ *.pcap >mycaptures.csv
293 The resulting mycaptures.csv file can be easily imported
294 into spreadsheet applications.
298 tcpdump(8), pcap(3), wireshark(1), mergecap(1), editcap(1), tshark(1),
303 B<Capinfos> is part of the B<Wireshark> distribution. The latest version
304 of B<Wireshark> can be found at L<http://www.wireshark.org>.
306 HTML versions of the Wireshark project man pages are available at:
307 L<http://www.wireshark.org/docs/man-pages>.
313 Ian Schorr <ian[AT]ianschorr.com>
318 Gerald Combs <gerald[AT]wireshark.org>
319 Jim Young <jyoung[AT]gsu.edu>