FLOW-STAT(1)

๐Ÿ“ฆ version 0.68.5.1, in fedora 43, fedora 44

๐Ÿ’– FLOW-STAT โ€” the flow-stat(1) page, but make it cute ๐Ÿ’–

okay bestie, pull up a chair ๐Ÿช‘โœจ this is flow-stat from section 1 of the manual, and she is literally the girl who turns your boring flow data into a whole report. no cap.


๐ŸŒธ NAME ๐ŸŒธ

flow-stat โ€” Generate reports with flow data. that's it, that's the job, and she ate ๐Ÿ’…


โœจ SYNOPSIS โœจ

flow-stat [ -hnpPw ]  [ -d debug_level ]  [ -f format ]  [ -S sort_field
]  [ -s sort_field ]  [ -t tally_lines ]  [ -T title ]

likeโ€ฆ look at those brackets. so many little optional besties. pick and choose, queen ๐Ÿ‘‘


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

The flow-stat utility generates usage reports for flow data sets. and when I say reports I mean it โ€” she will report on you by IP address, IP address pairs, ports, packets, bytes, interfaces, next hops, autonomous systems, ToS bits, exporters, and tags. the range?? unmatched. she's giving main character energy in every single category fr fr ๐Ÿ˜ญ๐Ÿ’–


๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -d debug_level โ€” Enable debugging. turn the lights on, bestie ๐Ÿ”ฆ
  • -f format โ€” Report format. Choose from the following, and yes there are THIRTY-TWO of them, we are not skipping a single one, periodt:
    • 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
  • -h โ€” Display help. she'll explain herself, iconically ๐Ÿ’โ™€๏ธ
  • -n โ€” Use symbolic names where appropriate. names > numbers, it's giving โœจaestheticโœจ
  • -p โ€” Display header information. show me the receipts ๐Ÿ“‹
  • -P โ€” Report as percent total. math but make it cute ๐Ÿงฎ๐Ÿ’…
  • -s sort_field โ€” Sort ascending on field sort_field. smallest to biggest, humble and organized ๐Ÿ“
  • -S sort_field โ€” Sort descending on field sort_field. biggest to smallest, main character first ๐Ÿ‘‘
  • -t tally_lines โ€” Tally totals every tally_lines lines. lil running count moment ๐Ÿงš
  • -T title โ€” Set report title to title. name your child, you're the parent now ๐ŸŽ€
  • -w โ€” Wide output. she's spreading out, taking up space, as she should ๐ŸŒˆ

๐Ÿ’œ EXAMPLES ๐Ÿ’œ

Provide a report on top source/destination IP pairs sorted by octets, report in percent total form for the flows in /flows/krc4. Use the preload option to flow-cat to preserve meta information and display it with flow-stat.

flow-cat -p /flows/krc4 | flow-stat -f10 -P -p -S4

๐Ÿ”ฅ EXAMPLES ๐Ÿ”ฅ

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 snmpwalk 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.

flow-cat -p /flows/krc4 | flow-filter -i5 | flow-stat -f9 -P -p -S3

like yes bestie, we're doing campus networking now, keep up ๐ŸŒธ


๐Ÿซถ EXAMPLES ๐Ÿซถ

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.

flow-cat -p /flows/krc4 | flow-filter -I5 | flow-stat -f8 -P -p -S3

(sinks >>> senders, both valid, no judgement ๐Ÿ’–)


โญ EXAMPLES โญ

Provide a top source/destination AS report. Use symbolic names.

flow-cat -p /flows/krc4 | flow-stat -f20 -n -P -p -S4

๐Ÿ˜ญ BUGS ๐Ÿ˜ญ

None known. not a single one. she's flawless, we don't know her ๐Ÿ’€โœจ


๐Ÿ’… AUTHOR ๐Ÿ’…

Mark Fullmer <maf@splintered.net>


๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

flow-tools(1)


k that's the whole page bestie, every flag accounted for, nothing dropped, we do not skip content in this house ๐Ÿ ๐Ÿ’–

okay and for the lil sign-off moment: this whole thing is the flow-stat(1) manual page, dated 26 ะะฒะณัƒัั‚ 2010 โ€” yes the date is in Russian, and yes she still ate. go generate some reports, queen ๐Ÿ‘‘๐ŸŒˆ๐Ÿ’–

๐Ÿ“ฆ where this page comes from