FLOW-IMPORT(1)
π FLOW-IMPORT(1) π
okay bestie, welcome to flow-import β it's a lil command from the flow-tools squad (section 1 of the manual, if you're keeping score) and it is literally the glow-up station for your flow data. let's get into it π«Ά
β¨ NAME β¨
flow-import β bestie, this one imports flows into flow-tools from other NetFlow packages. it's giving translator, it's giving exchange student, it's giving "i speak cflowd, i speak CSV, i speak flow-tools." π
πΈ SYNOPSIS πΈ
flow-import [ -h ] [ -b big|little ] [ -d debug_level ] [ -f format ]
[ -m mask_fields ] [ -V pdu_version ] [ -z z_level ]
π¦ DESCRIPTION π¦
so like. the flow-import utility converts data from cflowd and ASCII CSV files into flow-tools format. that's it, that's the whole job, and it does it flawlessly. main character energy fr fr β¨
π OPTIONS π
-b big|littleβ the byte order of the output. big or little, pick your fighter, no in-between π-d debug_levelβ turn on debugging. yes queen, spill the tea π-f formatβ the export format. supported formats are:
0 cflowd
2 ASCII CSV
3 Cisco NFCollector
-hβ display help. when in doubt, ask for help, that's self-care π§-m mask_fieldsβ select fields for cflowd and ASCII formats. themask_fieldsis built from a bitwise OR of the following (copy these exactly bestie, no typos, they're hex and they know it):
UNIX_SECS 0x0000000000000001LL
UNIX_NSECS 0x0000000000000002LL
SYSUPTIME 0x0000000000000004LL
EXADDR 0x0000000000000008LL
DFLOWS 0x0000000000000010LL
DPKTS 0x0000000000000020LL
DOCTETS 0x0000000000000040LL
FIRST 0x0000000000000080LL
LAST 0x0000000000000100LL
ENGINE_TYPE 0x0000000000000200LL
ENGINE_ID 0x0000000000000400LL
SRCADDR 0x0000000000001000LL
DSTADDR 0x0000000000002000LL
SRC_PREFIX 0x0000000000004000LL
DST_PREFIX 0x0000000000008000LL
NEXTHOP 0x0000000000010000LL
INPUT 0x0000000000020000LL
OUTPUT 0x0000000000040000LL
SRCPORT 0x0000000000080000LL
DSTPORT 0x0000000000100000LL
PROT 0x0000000000200000LL
TOS 0x0000000000400000LL
TCP_FLAGS 0x0000000000800000LL
SRC_MASK 0x0000000001000000LL
DST_MASK 0x0000000002000000LL
SRC_AS 0x0000000004000000LL
DST_AS 0x0000000008000000LL
IN_ENCAPS 0x0000000010000000LL
OUT_ENCAPS 0x0000000020000000LL
PEER_NEXTHOP 0x0000000040000000LL
ROUTER_SC 0x0000000080000000LL
EXTRA_PKTS 0x0000000100000000LL
MARKED_TOS 0x0000000200000000LL
the default value is all fields applicable to the pdu_version. so if you don't pick, you get everything and honestly? iconic. π
-V pdu_versionβ usepdu_versionformat output. here's the whole menu, no skips:
1 NetFlow version 1 (No sequence numbers, AS, or mask)
5 NetFlow version 5
6 NetFlow version 6 (5+ Encapsulation size)
7 NetFlow version 7 (Catalyst switches)
8.1 NetFlow AS Aggregation
8.2 NetFlow Proto Port Aggregation
8.3 NetFlow Source Prefix Aggregation
8.4 NetFlow Destination Prefix Aggregation
8.5 NetFlow Prefix Aggregation
8.6 NetFlow Destination (Catalyst switches)
8.7 NetFlow Source Destination (Catalyst switches)
8.8 NetFlow Full Flow (Catalyst switches)
8.9 NetFlow ToS AS Aggregation
8.10 NetFlow ToS Proto Port Aggregation
8.11 NetFlow ToS Source Prefix Aggregation
8.12 NetFlow ToS Destination Prefix Aggregation
8.13 NetFlow ToS Prefix Aggregation
8.14 NetFlow ToS Prefix Port Aggregation
1005 Flow-Tools tagged version 5
-z z_levelβ configure compression level toz_level.0is disabled (no compression),9is highest compression. glow up your disk space, bestie π
π EXAMPLES π
π« example one π«
convert the cflowd file flows.cflowd to the flow-tools file flows. store as Version 5 with compression level 5.
flow-import -V5 -z5 -f0 < flows.cflowd > flows
π« example two π«
convert the ASCII CSV data in flows.ascii to flow-tools format. the ASCII data must include all fields represented by 0xFF31EF in the order listed above. store as Version 5 with no compression.
flow-import -z0 -f2 -m0xFF31EF < flows.ascii > flows
note bestie: "in the order listed above" is doing a LOT of heavy lifting there. respect the order. the order is sacred. π
π BUGS π
the pcap format is a hack. that's it, that's the bug note, we're not elaborating, the manpage said it and we're just the messenger π
π AUTHOR π
Mark Fullmer <maf@splintered.net> β legend behaviour, fr fr π«Ά
β SEE ALSO β
flow-tools(1) β go read it, it's the whole squad π
and that's a wrap babes π
this was the flow-import page, straight out of the flow-tools collection, dated 26 ΠΠ²Π³ΡΡΡ 2010. slay, go convert something. πΈβ¨π¦
π¦ where this page comes from
- fedora 43: flow-tools 0.68.5.1-45.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: flow-tools 0.68.5.1-45.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: flow-tools 0.68.5.1-46.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: flow-tools 0.68.5.1-46.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms