From Jim Young:
[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<-t> ]>
10 S<[ B<-E> ]>
11 S<[ B<-c> ]>
12 S<[ B<-s> ]>
13 S<[ B<-d> ]>
14 S<[ B<-u> ]>
15 S<[ B<-a> ]>
16 S<[ B<-e> ]>
17 S<[ B<-y> ]>
18 S<[ B<-i> ]>
19 S<[ B<-z> ]>
20 S<[ B<-L> ]>
21 S<[ B<-T> ]>
22 S<[ B<-R> ]>
23 S<[ B<-r> ]>
24 S<[ B<-B> ]>
25 S<[ B<-m> ]>
26 S<[ B<-b> ]>
27 S<[ B<-N> ]>
28 S<[ B<-q> ]>
29 S<[ B<-Q> ]>
30 S<[ B<-h> ]>
31 S<[ B<-C> ]>
32 S<[ B<-A> ]>
33 E<lt>I<infile>E<gt>
34 I<...>
35
36 =head1 DESCRIPTION
37
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.
41
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.
45
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.
50
51 Options are processed from left to right order with later options 
52 superceeding or adding to earlier options.
53
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.
62
63 =head1 OPTIONS
64
65 =over 4
66
67 =item -t
68
69 Displays the capture type of the capture file.
70
71 =item -E
72
73 Displays the per-file encapsulation of the capture file.
74
75 =item -c
76
77 Displays the number of packets in the capture file.
78
79 =item -s
80
81 Displays the size of the file, in bytes.  This reports
82 the size of the capture file itself.
83
84 =item -d
85
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.
93
94 =item -u
95
96 Displays the capture duration, in seconds.  This is the
97 difference in time between the earliest packet seen and
98 latest packet seen.
99
100 =item -a
101
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.
107
108 =item -e
109
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.
115
116 =item -y
117
118 Displays the average data rate, in bytes/sec
119
120 =item -i
121
122 Displays the average data rate, in bits/sec
123
124 =item -z
125
126 displays the average packet size, in bytes
127
128 =item -x
129
130 displays the average packet rate, in packets/sec
131
132 =item -L 
133
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 
137 human to use.
138
139 =item -T 
140
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 
145 values (CSV) files.
146
147 =item -R 
148
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.  
154
155
156 =item -r 
157
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.
162
163
164 =item -B 
165
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.
172
173 =item -m 
174
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.
179
180 =item -b 
181
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.  
187
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.
192
193 =item -N 
194
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.
201
202
203 =item -q 
204
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 
211 style file report.
212
213 =item -Q 
214
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.
222
223 =item -h
224
225 Prints the help listing and exits.
226
227 =item -C 
228
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.  
233
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.
237
238 =item -A 
239
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.  
244
245
246 =back
247
248 =head1 EXAMPLES
249
250 To see a description of the capinfos options use:
251
252     capinfos -h
253
254 To generate a long form report for the capture file 
255 mycapture.pcap use:
256
257     capinfos mycapture.pcap 
258
259 To generate a TAB delimited table form report for the capture 
260 file mycapture.pcap use:
261
262     capinfos -T mycapture.pcap 
263
264 To generate a CSV style table form report for the capture 
265 file mycapture.pcap use:
266
267     capinfos -T -m -Q mycapture.pcap 
268
269 or
270
271     capinfos -TmQ mycapture.pcap 
272
273
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:
277
278     capinfos -T -t -E -c *.pcap
279
280 or 
281   
282     capinfos -TtEs *.pcap
283
284 Note: The ability to use of filename globbing characters are 
285 a feature of *nix style command shells.  
286
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:
290
291     capinfos -TmQ *.pcap >mycaptures.csv
292
293 The resulting mycaptures.csv file can be easily imported 
294 into spreadsheet applications.
295
296 =head1 SEE ALSO
297
298 tcpdump(8), pcap(3), wireshark(1), mergecap(1), editcap(1), tshark(1),
299 dumpcap(1)
300
301 =head1 NOTES
302
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>.
305
306 HTML versions of the Wireshark project man pages are available at:
307 L<http://www.wireshark.org/docs/man-pages>.
308
309 =head1 AUTHORS
310
311   Original Author
312   -------- ------
313   Ian Schorr           <ian[AT]ianschorr.com>
314
315
316   Contributors
317   ------------
318   Gerald Combs         <gerald[AT]wireshark.org>
319   Jim Young            <jyoung[AT]gsu.edu>