Alphabetical order, please.
[obnox/wireshark/wip.git] / doc / capinfos.pod
1
2 =head1 NAME
3
4 capinfos - Prints information about capture files
5
6 =head1 SYNOPSIS
7
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<-N> ]>
25 S<[ B<-o> ]>
26 S<[ B<-q> ]>
27 S<[ B<-Q> ]>
28 S<[ B<-r> ]>
29 S<[ B<-R> ]>
30 S<[ B<-s> ]>
31 S<[ B<-S> ]>
32 S<[ B<-t> ]>
33 S<[ B<-T> ]>
34 S<[ B<-u> ]>
35 S<[ B<-x> ]>
36 S<[ B<-y> ]>
37 S<[ B<-z> ]>
38 E<lt>I<infile>E<gt>
39 I<...>
40
41 =head1 DESCRIPTION
42
43 B<Capinfos> is a program that reads one or more capture files and
44 returns some or all available statistics (infos) of each E<lt>I<infile>E<gt>
45 in one of two types of output formats: long or table.
46
47 The long output is suitable for a human to read.  The table output
48 is useful for generating a report that can be easily imported into
49 a spreadsheet or database.
50
51 The user specifies what type of output (long or table) and which
52 statistics to display by specifying flags (options) that corresponding
53 to the report type and desired infos.  If no options are specified,
54 B<Capinfos> will report all statistics available in "long" format.
55
56 Options are processed from left to right order with later options
57 superseding or adding to earlier options.
58
59 B<Capinfos> is able to detect and read the same capture files that are
60 supported by B<Wireshark>.
61 The input files don't need a specific filename extension; the file
62 format and an optional gzip compression will be automatically detected.
63 Near the beginning of the DESCRIPTION section of wireshark(1) or
64 L<http://www.wireshark.org/docs/man-pages/wireshark.html>
65 is a detailed description of the way B<Wireshark> handles this, which is
66 the same way B<Capinfos> handles this.
67
68 =head1 OPTIONS
69
70 =over 4
71
72 =item -a
73
74 Displays the start time of the capture.  B<Capinfos> considers
75 the earliest timestamp seen to be the start time, so the
76 first packet in the capture is not necessarily the earliest -
77 if packets exist "out-of-order", time-wise, in the capture,
78 B<Capinfos> detects this.
79
80 =item -A
81
82 Generate all infos. By default capinfos will display
83 all infos values for each input file, but enabling
84 any of the individual display infos options will
85 disable the generate all option.
86
87 =item -b
88
89 Separate infos with ASCII SPACE (0x20) characters.
90 This option is only useful when generating a table
91 style report (-T).  The various info values will be
92 separated (delimited) from one another with a single
93 ASCII SPACE character.
94
95 NOTE: Since some of the header labels as well as some
96 of the value fields contain SPACE characters.  This
97 option is of limited value unless one of the quoting
98 options (-q or -Q) is also specified.
99
100 =item -B
101
102 Separate the infos with ASCII TAB characters.
103 This option is only useful when generating a table
104 style report (-T).  The various info values will be
105 separated (delimited) from one another with a single
106 ASCII TAB character.  The TAB character is the default
107 delimiter when -T style report is enabled.
108
109 =item -c
110
111 Displays the number of packets in the capture file.
112
113 =item -C
114
115 Cancel processing any additional files if and
116 when capinfos should fail to open an input file.
117 By default capinfos will attempt to open each and
118 every file name argument.
119
120 Note: An error message will be written to stderr
121 whenever capinfos fails to open a file regardless
122 of whether the -C option is specified or not.
123 Upon exit, capinfos will return an error status
124 if any errors occurred during processing.
125
126 =item -d
127
128 Displays the total length of all packets in the file, in
129 bytes.  This counts the size of the packets as they appeared
130 in their original form, not as they appear in this file.
131 For example, if a packet was originally 1514 bytes and only
132 256 of those bytes were saved to the capture file (if packets
133 were captured with a snaplen or other slicing option),
134 B<Capinfos> will consider the packet to have been 1514 bytes.
135
136 =item -e
137
138 Displays the end time of the capture.  B<Capinfos> considers
139 the latest timestamp seen to be the end time, so the
140 last packet in the capture is not necessarily the latest -
141 if packets exist "out-of-order", time-wise, in the capture,
142 B<Capinfos> detects this.
143
144 =item -E
145
146 Displays the per-file encapsulation of the capture file.
147
148 =item -h
149
150 Prints the help listing and exits.
151
152 =item -H
153
154 Displays the SHA1, RIPEMD160, and MD5 hashes for the file.
155
156 =item -i
157
158 Displays the average data rate, in bits/sec
159
160 =item -l
161
162 Display the snaplen (if any) for a file.
163 snaplen (if available) is determined from the capture file header
164 and by looking for truncated records in the capture file.
165
166 =item -o
167
168 Displays "True" if packets exist in strict chronological order
169 or "False" if one or more packets in the capture exists
170 "out-of-order" time-wise.
171
172 =item -L
173
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.
178
179 =item -m
180
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.
185
186 =item -N
187
188 Do not quote the infos.  This option is only useful
189 when generating a table style report (-T).  Excluding
190 any quoting characters around the various values and
191 using a TAB delimiter produces a very "clean" table
192 report that is easily parsed with CLI tools.  By
193 default infos are B<NOT> quoted.
194
195 =item -q
196
197 Quote infos with single quotes ('). This option is
198 only useful when generating a table style report (-T).
199 When this option is enabled, each value will be
200 encapsulated within a pair of single quote (')
201 characters.  This option (when used  with the -m
202 option) is useful for generating one type of CSV
203 style file report.
204
205 =item -Q
206
207 Quote infos with double quotes (").  This option is
208 only useful when generating a table style report (-T).
209 When this option is enabled, each value will be
210 encapsulated within a pair of double quote (")
211 characters.  This option (when used with the -m
212 option) is useful for generating the most common
213 type of CSV style file report.
214
215 =item -r
216
217 Do not generate header record.  This option is only
218 useful when generating a table style report (-T).
219 If this option is specified then B<no> header record will be
220 generated within the table report.
221
222 =item -R
223
224 Generate header record.  This option is only useful
225 when generating a table style report (-T).  A header
226 is generated by default.  A header record (if generated)
227 is the first line of data reported and includes labels
228 for all the columns included within the table report.
229
230 =item -s
231
232 Displays the size of the file, in bytes.  This reports
233 the size of the capture file itself.
234
235 =item -S
236
237 Display the start and end times as seconds since January
238 1, 1970. Handy for synchronizing dumps using B<editcap -t>.
239
240 =item -t
241
242 Displays the capture type of the capture file.
243
244 =item -T
245
246 Generate a table report. A table report is a text file
247 that is suitable for importing into a spreadsheet or
248 database.  Capinfos can build a tab delimited text file
249 (the default) or several variations on Comma-separated
250 values (CSV) files.
251
252 =item -u
253
254 Displays the capture duration, in seconds.  This is the
255 difference in time between the earliest packet seen and
256 latest packet seen.
257
258 =item -x
259
260 Displays the average packet rate, in packets/sec
261
262 =item -y
263
264 Displays the average data rate, in bytes/sec
265
266 =item -z
267
268 Displays the average packet size, in bytes
269
270 =back
271
272 =head1 EXAMPLES
273
274 To see a description of the capinfos options use:
275
276     capinfos -h
277
278 To generate a long form report for the capture file
279 mycapture.pcap use:
280
281     capinfos mycapture.pcap
282
283 To generate a TAB delimited table form report for the capture
284 file mycapture.pcap use:
285
286     capinfos -T mycapture.pcap
287
288 To generate a CSV style table form report for the capture
289 file mycapture.pcap use:
290
291     capinfos -T -m -Q mycapture.pcap
292
293 or
294
295     capinfos -TmQ mycapture.pcap
296
297
298 To generate a TAB delimited table style report with just the
299 filenames, capture type, capture encapsulation type and packet
300 count for all the pcap files in the current directory use:
301
302     capinfos -T -t -E -c *.pcap
303
304 or
305
306     capinfos -TtEs *.pcap
307
308 Note: The ability to use of filename globbing characters are
309 a feature of *nix style command shells.
310
311 To generate a CSV delimited table style report of all infos
312 for all pcap files in the current directory and write it to
313 a text file called mycaptures.csv use:
314
315     capinfos -TmQ *.pcap >mycaptures.csv
316
317 The resulting mycaptures.csv file can be easily imported
318 into spreadsheet applications.
319
320 =head1 SEE ALSO
321
322 tcpdump(8), pcap(3), wireshark(1), mergecap(1), editcap(1), tshark(1),
323 dumpcap(1)
324
325 =head1 NOTES
326
327 B<Capinfos> is part of the B<Wireshark> distribution.  The latest version
328 of B<Wireshark> can be found at L<http://www.wireshark.org>.
329
330 HTML versions of the Wireshark project man pages are available at:
331 L<http://www.wireshark.org/docs/man-pages>.
332
333 =head1 AUTHORS
334
335   Original Author
336   -------- ------
337   Ian Schorr           <ian[AT]ianschorr.com>
338
339
340   Contributors
341   ------------
342   Gerald Combs         <gerald[AT]wireshark.org>
343   Jim Young            <jyoung[AT]gsu.edu>