FLOW-CAPTURE(1)
π¦ FLOW-CAPTURE(1) π¦
okay bestie, sit down, hydrate, because we're about to talk about flow-capture β the flow-tools manual page, section 1 (general commands, iykyk). it's giving network admin main character energy and honestly? iconic. π
β¨ NAME β¨
flow-capture β manage storage of flow file archives by expiring old data.
π SYNOPSIS π
flow-capture [ -hu ] [ -b big|little ] [ -C comment ] [ -c
flow_clients ] [ -d debug_level ] [ -D daemonize ] [ -e expire_count
] [ -f filter_fname ] [ -F filter_definition ] [ -E expire_size ] [
-n rotations ] [ -N nesting_level ] [ -p pidfile ] [ -R
rotate_program ] [ -S stat_interval ] [ -t tag_fname ] [ -T
active_def|active_def,active_def... ] [ -V pdu_version ] [ -z z_level
] -w workdir [ -x xlate_fname ] [ -X xlate_definition ]
localip/remoteip/port
like, yes, that's a lot of brackets. breathe. we'll get through them together π«Ά
π DESCRIPTION π
the flow-capture utility will receive and store NetFlow exports to disk. the flow files get rotated rotations times per day, and expiration of old flow files can be configured by number of files or total space utilization. files are stored in workdir and can optionally be stored in additional levels of directories. active files created by flow-capture begin with tmp. files that are complete begin with ft. slay, consistent naming conventions, we love to see it β¨
when the remoteip is configured, only flows from that exporter will be processed β this is the most secure and recommended configuration, no cap. when the localip is configured, flow-capture will only process flows sent to the localip IP address. if remoteip is 0 (not configured) flows from any source IP address are accepted. multiple non aggregated PDU versions may be accepted at once to support Cisco's Catalyst 6500 NetFlow implementation, which exports from both the supervisor and MSFC with the same IP address and same port but different export versions. in this case the exports will be stored in the format specified by pdu_version, or whichever export type is received first. first come first served, literally π
NetFlow exports are UDP and do not employ congestion control or a retransmission mechanism. if the server flow-capture is configured on is too busy, or the network is congested or lossy, NetFlow exports will be lost. an estimate of lost flows is recorded in the flow files, and logged via syslog. most servers will provide a count of dropped packets due to full socket buffers via the netstat utility. for example netstat -s | grep full will provide a count of UDP packets dropped due to full socket buffers. if this is a persistent occurrence, either flow-capture will need a larger server or the compression level should be decreased with -z. π
a SIGHUP signal will cause flow-capture to close the current file and create a new one. fresh start, new me, etc πΈ
a SIGQUIT or SIGTERM signal will cause flow-capture to close the current file and exit. bye bestie π
π OPTIONS π
-b big|littleβ byte order of output.-c flow_clientsβ enable flow_clients TCP clients. when libwrap is available the client must be in a permit list for the serviceflow-capture-client.-C Commentβ add a comment.-d debug_levelβ enable debugging.-e expire_countβ retain the maximum number of files so that the total file count is less than expire_count. defaults to0(do not expire).-E expire_sizeβ retain the maximum number of files so that the total storage is less than expire_size. the lettersb,K,M,Gcan be used as multipliers, ie 16 Megabytes is16M. default to0(do not expire).-f filter_fnameβ filter list filename. defaults to/etc/flow-tools/cfg/filter.-F filter_definitionβ select the active definition. defaults todefault.-hβ display help.-n rotationsβ configure the number of timesflow-capturewill create a new file per day. the default is95, or every 15 minutes.-N nesting_levelβ configure the nesting level for storing flow files. the default is0.-3YYYY/YYYY-MM/YYYY-MM-DD/flow-file-2YYYY-MM/YYYY-MM-DD/flow-file-1YYYY-MM-DD/flow-file0flow-file1YYYY/flow-file2YYYY/YYYY-MM/flow-file3YYYY/YYYY-MM/YYYY-MM-DD/flow-file
-p pidfileβ configure the process ID file. use-to disable pid file creation.-R rotate_programβ execute rotate_program with the first argument as the flow file name after rotating it.-S stat_intervalβ when configured,flow-capturewill log a timestamped message every stat_interval minutes indicating counters such as the number of flows received, packets processed, and lost flows.-t tag_fnameβ load tags from tag_name-T active_def|active_def,active_def...β use active_def as the active tag definition(s).-uβ preserve inherited umask. by default the umask will be set to0022.-V pdu_versionβ use pdu_version format output.1β NetFlow version 1 (No sequence numbers, AS, or mask)5β NetFlow version 56β NetFlow version 6 (5+ Encapsulation size)7β NetFlow version 7 (Catalyst switches)8.1β NetFlow AS Aggregation8.2β NetFlow Proto Port Aggregation8.3β NetFlow Source Prefix Aggregation8.4β NetFlow Destination Prefix Aggregation8.5β NetFlow Prefix Aggregation8.6β NetFlow Destination (Catalyst switches)8.7β NetFlow Source Destination (Catalyst switches)8.8β NetFlow Full Flow (Catalyst switches)8.9β NetFlow ToS AS Aggregation8.10β NetFlow ToS Proto Port Aggregation8.11β NetFlow ToS Source Prefix Aggregation8.12β NetFlow ToS Destination Prefix Aggregation8.13β NetFlow ToS Prefix Aggregation8.14β NetFlow ToS Prefix Port Aggregation1005β Flow-Tools tagged version 5
-w workdirβ work in workdir.-x xlate_fnameβ translation config file name. defaults to/etc/flow-tools/cfg/xlate.cfg-X xlate_definitionβ translation definition. defaults todefault.-z z_levelβ configure compression level to z_level.0is disabled (no compression),9is highest compression.
π EXAMPLES π
okay so scenario one: receive flows from the exporter at 10.0.0.1 port 9800. maintain 5 Gigabytes of flow files in /flows/krc4. mask the source and destination IP addresses contained in the flow exports with 255.255.248.0. π
flow-capture -w /flows/krc4 -m 255.255.248.0 -E5G 0/10.0.0.1/9800
scenario two, the chaotic one: receive flows from any exporter on port 9800. do not perform any flow file space management. store the exports in /flows/krc4. emit a stat log message every 5 minutes. lowkey unhinged but it's valid π
flow-capture -w /flows/krc4 0/0/9800 -S5
π BUGS π
empty directories are not removed. not me noticing the empty directories just vibing there forever π
π FILES π
configuration files: Tag β /etc/flow-tools/cfg/tag.cfg. Filter β /etc/flow-tools/cfg/filter.cfg. Xlate β /etc/flow-tools/cfg/xlate.cfg.
π AUTHOR π
Mark Fullmer <maf@splintered.net> β the icon, the moment, the legend π«Ά
β SEE ALSO β
and that's the whole page bestie, no notes, ate and left no crumbs β¨ this was FLOW-CAPTURE(1), dated 26 ΠΠ²Π³ΡΡΡ 2010, and that's the flow-tools flex πππ¦
π¦ 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