File: flow-stat.sgml

package info (click to toggle)
flow-tools 1%3A0.68-10
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 5,120 kB
  • ctags: 5,259
  • sloc: ansic: 43,197; sh: 1,611; perl: 661; python: 629; yacc: 303; makefile: 206; lex: 49
file content (277 lines) | stat: -rw-r--r-- 5,986 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
<refentry>

<refmeta>
<refentrytitle>
<application>flow-stat</application>
</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>

<refnamediv>
<refname>
<application>flow-stat</application>
</refname>
<refpurpose>
Generate reports with flow data.
</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>flow-stat</command>
<arg>-hnpPw</arg>
<arg>-d<replaceable> debug_level</replaceable></arg>
<arg>-f<replaceable> format</replaceable></arg>
<arg>-S<replaceable> sort_field</replaceable></arg>
<arg>-s<replaceable> sort_field</replaceable></arg>
<arg>-t<replaceable> tally_lines</replaceable></arg>
<arg>-T<replaceable> title</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>


<refsect1>
<title>DESCRIPTION</title>
<para>
The <command>flow-stat</command> utility generates usage reports for flow
data sets by IP address, IP address pairs, ports, packets, bytes,
interfaces, next hops, autonomous systems, ToS bits, exporters, and tags.
</para>
</refsect1>

<refsect1>
<title>OPTIONS</title>
<variablelist>

<varlistentry>
<term>-d<replaceable> debug_level</replaceable></term>
<listitem>
<para>
Enable debugging.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>-f<replaceable> format</replaceable></term>
<listitem>
<para>
<literallayout>
Report format.  Choose from the following:

    0  Overall Summary
    1  Average packet size distribution
    2  Packets per flow distribution
    3  Octets per flow distribution
    4  Bandwidth per flow distribution
    5  UDP/TCP destination port
    6  UDP/TCP source port
    7  UDP/TCP port
    8  Destination IP
    9  Source IP
    10 Source/Destination IP
    11 Source or Destination IP
    12 IP protocol
    13 octets for flow duration plot data
    14 packets for flow duration plot data
    15 short summary
    16 IP Next Hop
    17 Input interface
    18 Output interface
    19 Source AS
    20 Destination AS
    21 Source/Destination AS
    22 IP ToS
    23 Input/Output Interface
    24 Source Prefix
    25 Destination Prefix
    26 Source/Destination Prefix
    27 Exporter IP
    28 Engine Id
    29 Engine Type
    30 Source Tag
    31 Destination Tag
    32 Source/Destination Tag
</literallayout>
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>-h</term>
<listitem>
<para>
Display help.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>-n</term>
<listitem>
<para>
Use symbolic names where appropriate.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>-p</term>
<listitem>
<para>
Display header information.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>-P</term>
<listitem>
<para>
Report as percent total.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>-s<replaceable> sort_field</replaceable></term>
<listitem>
<para>
Sort ascending on field <replaceable>sort_field</replaceable>.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>-S<replaceable> sort_field</replaceable></term>
<listitem>
<para>
Sort descending on field <replaceable>sort_field</replaceable>.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>-t<replaceable> tally_lines</replaceable></term>
<listitem>
<para>
Tally totals every <replaceable>tally_lines</replaceable>lines.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>-T<replaceable> title</replaceable></term>
<listitem>
<para>
Set report title to <replaceable>title</replaceable>.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>-w</term>
<listitem>
<para>
Wide output.
</para>
</listitem>
</varlistentry>

</variablelist>
</refsect1>

<refsect1>
<title>EXAMPLES</title>
<informalexample>
<para>
Provide a report on top source/destination IP pairs sorted by octets, report
in percent total form for the flows in <filename>/flows/krc4</filename>.
Use the preload option to flow-cat to preserve meta information and 
display it with flow-stat.
</para>
<para>
  <command>flow-cat -p /flows/krc4 | flow-stat -f10 -P -p -S4</command>
</para>
</informalexample>
</refsect1>

<refsect1>
<title>EXAMPLES</title>
<informalexample>
<para>
Many times a campus network will have a single border router which has
one interface pointing to the internal side and many interfaces pointing
to other providers.  These interfaces each have a unique numerical id
known in SNMP terms as an ifIndex.  The ifIndex to interface name mappings
can be determined by using a tool such as <application>snmpwalk</application>
or using show commands in recent versions of IOS with the
'show snmp mib ifmib ifindex' or JunOS 'show interfaces'.  Once the ifIndex
for each interface is known flow-filter can be combined with flow-stat to
provide reports such as inbound vs outbound top src/destination IP
addresses.

Provide a top source IP address report by outbound traffic, ie the top
senders of traffic on the campus network.  Assume the ifIndex of the
campus interface is 5.
</para>
<para>
  flow-cat -p /flows/krc4 | flow-filter -i5 | flow-stat -f9 -P -p -S3 
</para>
</informalexample>
</refsect1>

<refsect1>
<title>EXAMPLES</title>
<informalexample>
<para>
Provide a top destination IP address report by outbound traffic, ie the top
sinks of traffic on the campus network.  Assume the ifIndex of the
campus interface is 5.
</para>
<para>
  flow-cat -p /flows/krc4 | flow-filter -I5 | flow-stat -f8 -P -p -S3 
</para>
</informalexample>
</refsect1>

<refsect1>
<title>EXAMPLES</title>
<informalexample>
<para>
Provide a top source/destination AS report.  Use symbolic names.
</para>
<para>
  flow-cat -p /flows/krc4 | flow-stat -f20 -n -P -p -S4 
</para>
</informalexample>
</refsect1>


<refsect1>
<title>BUGS</title>
<para>
None known.
</para>
</refsect1>

<refsect1>
<title>AUTHOR</title>
<para>
<author>
<firstname>Mark</firstname>
<surname>Fullmer</surname>
</author>
<email>maf@splintered.net</email>
</para>
</refsect1>

<refsect1>
<title>SEE ALSO</title>
<para>
<application>flow-tools</application>(1)
</para>
</refsect1>

</refentry>