MSWSP: * add parse_lcid()
[wireshark-wip.git] / doc / capinfos.pod
blob9359cf79ee3251ac3f6855e72b91520ac3470d8e
2 =head1 NAME
4 capinfos - Prints information about capture files
6 =head1 SYNOPSIS
8 B<capinfos>
9 S<[ B<-a> ]>
10 S<[ B<-A> ]>
11 S<[ B<-b> ]>
12 S<[ B<-B> ]>
13 S<[ B<-c> ]>
14 S<[ B<-C> ]>
15 S<[ B<-d> ]>
16 S<[ B<-e> ]>
17 S<[ B<-E> ]>
18 S<[ B<-h> ]>
19 S<[ B<-H> ]>
20 S<[ B<-i> ]>
21 S<[ B<-l> ]>
22 S<[ B<-L> ]>
23 S<[ B<-m> ]>
24 S<[ B<-M> ]>
25 S<[ B<-N> ]>
26 S<[ B<-o> ]>
27 S<[ B<-q> ]>
28 S<[ B<-Q> ]>
29 S<[ B<-r> ]>
30 S<[ B<-R> ]>
31 S<[ B<-s> ]>
32 S<[ B<-S> ]>
33 S<[ B<-t> ]>
34 S<[ B<-T> ]>
35 S<[ B<-u> ]>
36 S<[ B<-x> ]>
37 S<[ B<-y> ]>
38 S<[ B<-z> ]>
39 E<lt>I<infile>E<gt>
40 I<...>
42 =head1 DESCRIPTION
44 B<Capinfos> is a program that reads one or more capture files and
45 returns some or all available statistics (infos) of each E<lt>I<infile>E<gt>
46 in one of two types of output formats: long or table.
48 The long output is suitable for a human to read.  The table output
49 is useful for generating a report that can be easily imported into
50 a spreadsheet or database.
52 The user specifies what type of output (long or table) and which
53 statistics to display by specifying flags (options) that corresponding
54 to the report type and desired infos.  If no options are specified,
55 B<Capinfos> will report all statistics available in "long" format.
57 Options are processed from left to right order with later options
58 superseding or adding to earlier options.
60 B<Capinfos> is able to detect and read the same capture files that are
61 supported by B<Wireshark>.
62 The input files don't need a specific filename extension; the file
63 format and an optional gzip compression will be automatically detected.
64 Near the beginning of the DESCRIPTION section of wireshark(1) or
65 L<http://www.wireshark.org/docs/man-pages/wireshark.html>
66 is a detailed description of the way B<Wireshark> handles this, which is
67 the same way B<Capinfos> handles this.
69 =head1 OPTIONS
71 =over 4
73 =item -a
75 Displays the start time of the capture.  B<Capinfos> considers
76 the earliest timestamp seen to be the start time, so the
77 first packet in the capture is not necessarily the earliest -
78 if packets exist "out-of-order", time-wise, in the capture,
79 B<Capinfos> detects this.
81 =item -A
83 Generate all infos. By default capinfos will display
84 all infos values for each input file, but enabling
85 any of the individual display infos options will
86 disable the generate all option.
88 =item -b
90 Separate infos with ASCII SPACE (0x20) characters.
91 This option is only useful when generating a table
92 style report (-T).  The various info values will be
93 separated (delimited) from one another with a single
94 ASCII SPACE character.
96 NOTE: Since some of the header labels as well as some
97 of the value fields contain SPACE characters.  This
98 option is of limited value unless one of the quoting
99 options (-q or -Q) is also specified.
101 =item -B
103 Separate the infos with ASCII TAB characters.
104 This option is only useful when generating a table
105 style report (-T).  The various info values will be
106 separated (delimited) from one another with a single
107 ASCII TAB character.  The TAB character is the default
108 delimiter when -T style report is enabled.
110 =item -c
112 Displays the number of packets in the capture file.
114 =item -C
116 Cancel processing any additional files if and
117 when capinfos should fail to open an input file.
118 By default capinfos will attempt to open each and
119 every file name argument.
121 Note: An error message will be written to stderr
122 whenever capinfos fails to open a file regardless
123 of whether the -C option is specified or not.
124 Upon exit, capinfos will return an error status
125 if any errors occurred during processing.
127 =item -d
129 Displays the total length of all packets in the file, in
130 bytes.  This counts the size of the packets as they appeared
131 in their original form, not as they appear in this file.
132 For example, if a packet was originally 1514 bytes and only
133 256 of those bytes were saved to the capture file (if packets
134 were captured with a snaplen or other slicing option),
135 B<Capinfos> will consider the packet to have been 1514 bytes.
137 =item -e
139 Displays the end time of the capture.  B<Capinfos> considers
140 the latest timestamp seen to be the end time, so the
141 last packet in the capture is not necessarily the latest -
142 if packets exist "out-of-order", time-wise, in the capture,
143 B<Capinfos> detects this.
145 =item -E
147 Displays the per-file encapsulation of the capture file.
149 =item -h
151 Prints the help listing and exits.
153 =item -H
155 Displays the SHA1, RIPEMD160, and MD5 hashes for the file.
157 =item -i
159 Displays the average data rate, in bits/sec
161 =item -k
163 Displays the capture comment. For pcapng files, this is the comment from the
164 section header block.
166 =item -l
168 Display the snaplen (if any) for a file.
169 snaplen (if available) is determined from the capture file header
170 and by looking for truncated records in the capture file.
172 =item -L
174 Generate long report.  Capinfos can generate two
175 different styles of reports.  The "long" report is
176 the default style of output and is suitable for a
177 human to use.
179 =item -m
181 Separate the infos with comma (,) characters.  This option
182 is only useful when generating a table style report (-T).
183 The various info values will be separated (delimited)
184 from one another with a single comma "," character.
186 =item -M
188 Print raw (machine readable) numeric values in long reports.
189 By default capinfos prints human-readable values with SI
190 suffixes. Table reports (-T) always print raw values.
192 =item -N
194 Do not quote the infos.  This option is only useful
195 when generating a table style report (-T).  Excluding
196 any quoting characters around the various values and
197 using a TAB delimiter produces a very "clean" table
198 report that is easily parsed with CLI tools.  By
199 default infos are B<NOT> quoted.
201 =item -o
203 Displays "True" if packets exist in strict chronological order
204 or "False" if one or more packets in the capture exists
205 "out-of-order" time-wise.
207 =item -q
209 Quote infos with single quotes ('). This option is
210 only useful when generating a table style report (-T).
211 When this option is enabled, each value will be
212 encapsulated within a pair of single quote (')
213 characters.  This option (when used  with the -m
214 option) is useful for generating one type of CSV
215 style file report.
217 =item -Q
219 Quote infos with double quotes (").  This option is
220 only useful when generating a table style report (-T).
221 When this option is enabled, each value will be
222 encapsulated within a pair of double quote (")
223 characters.  This option (when used with the -m
224 option) is useful for generating the most common
225 type of CSV style file report.
227 =item -r
229 Do not generate header record.  This option is only
230 useful when generating a table style report (-T).
231 If this option is specified then B<no> header record will be
232 generated within the table report.
234 =item -R
236 Generate header record.  This option is only useful
237 when generating a table style report (-T).  A header
238 is generated by default.  A header record (if generated)
239 is the first line of data reported and includes labels
240 for all the columns included within the table report.
242 =item -s
244 Displays the size of the file, in bytes.  This reports
245 the size of the capture file itself.
247 =item -S
249 Display the start and end times as seconds since January
250 1, 1970. Handy for synchronizing dumps using B<editcap -t>.
252 =item -t
254 Displays the capture type of the capture file.
256 =item -T
258 Generate a table report. A table report is a text file
259 that is suitable for importing into a spreadsheet or
260 database.  Capinfos can build a tab delimited text file
261 (the default) or several variations on Comma-separated
262 values (CSV) files.
264 =item -u
266 Displays the capture duration, in seconds.  This is the
267 difference in time between the earliest packet seen and
268 latest packet seen.
270 =item -x
272 Displays the average packet rate, in packets/sec
274 =item -y
276 Displays the average data rate, in bytes/sec
278 =item -z
280 Displays the average packet size, in bytes
282 =back
284 =head1 EXAMPLES
286 To see a description of the capinfos options use:
288     capinfos -h
290 To generate a long form report for the capture file
291 mycapture.pcap use:
293     capinfos mycapture.pcap
295 To generate a TAB delimited table form report for the capture
296 file mycapture.pcap use:
298     capinfos -T mycapture.pcap
300 To generate a CSV style table form report for the capture
301 file mycapture.pcap use:
303     capinfos -T -m -Q mycapture.pcap
307     capinfos -TmQ mycapture.pcap
310 To generate a TAB delimited table style report with just the
311 filenames, capture type, capture encapsulation type and packet
312 count for all the pcap files in the current directory use:
314     capinfos -T -t -E -c *.pcap
318     capinfos -TtEs *.pcap
320 Note: The ability to use of filename globbing characters are
321 a feature of *nix style command shells.
323 To generate a CSV delimited table style report of all infos
324 for all pcap files in the current directory and write it to
325 a text file called mycaptures.csv use:
327     capinfos -TmQ *.pcap >mycaptures.csv
329 The resulting mycaptures.csv file can be easily imported
330 into spreadsheet applications.
332 =head1 SEE ALSO
334 pcap(3), wireshark(1), mergecap(1), editcap(1), tshark(1),
335 dumpcap(1), pcap-filter(7) or tcpdump(8)
337 =head1 NOTES
339 B<Capinfos> is part of the B<Wireshark> distribution.  The latest version
340 of B<Wireshark> can be found at L<http://www.wireshark.org>.
342 HTML versions of the Wireshark project man pages are available at:
343 L<http://www.wireshark.org/docs/man-pages>.
345 =head1 AUTHORS
347   Original Author
348   -------- ------
349   Ian Schorr           <ian[AT]ianschorr.com>
352   Contributors
353   ------------
354   Gerald Combs         <gerald[AT]wireshark.org>
355   Jim Young            <jyoung[AT]gsu.edu>