Network flow analysis is essential for understanding traffic patterns, diagnosing bottlenecks, and detecting anomalies in your infrastructure. Flow-based monitoring captures metadata about network conversations — source and destination IPs, ports, protocols, byte counts — without storing full packet captures, making it scalable for high-throughput networks.
This guide compares three foundational open-source flow tools: pmacct, nfdump, and fprobe. Together they form a complete flow pipeline: export, collect, process, and analyze.
Understanding Network Flow Protocols
Before comparing tools, it helps to understand the flow protocols they support:
- NetFlow v5 — Cisco’s original flow export format (IPv4 only, fixed 7 fields)
- NetFlow v9 — Template-based, extensible, supports IPv6 and custom fields
- IPFIX (RFC 7012) — IETF standard based on NetFlow v9, the modern flow protocol
- sFlow — Packet sampling-based flow protocol, implemented in switches and routers
Flow tools fall into three categories:
- Flow exporters (probes) — Capture packets and export flow records to a collector
- Flow collectors — Receive and store flow records from exporters
- Flow analyzers — Query stored flow data and produce reports
pmacct and nfdump span all three categories; fprobe is primarily an exporter.
pmacct: The Multi-Purpose Flow Suite
pmacct (1,210 stars on GitHub) is a Swiss-army knife for network traffic accounting. It supports NetFlow, IPFIX, sFlow, BGP, BMP, and raw pcap capture — all in a single toolkit. pmacct can act as a collector, exporter, aggregator, and data publisher simultaneously.
Key Features
- Multiple daemons:
pmacctd(pcap),nfacctd(NetFlow/IPFIX),sfacctd(sFlow),pmbgpd(BGP) - Plugin architecture: output to SQL databases, Kafka, Redis, RabbitMQ, MongoDB, Prometheus
- Active flow aggregation and filtering with BPF expressions
- Historical data replay and accounting
- BGP route monitoring and BMP (BGP Monitoring Protocol) support
- NetFlow v5/v9 and IPFIX collector and exporter
Docker Deployment
pmacct provides official Docker images for each daemon:
| |
Sample pmacct-nfacctd.conf for NetFlow collection to SQLite:
| |
When to Use pmacct
- You need a unified tool for NetFlow, sFlow, and BGP monitoring
- Flow data must be exported to databases or message queues
- Active traffic accounting with real-time aggregation
- Multi-tenant environments requiring per-customer flow accounting
nfdump: The NetFlow Processing Toolkit
nfdump (898 stars) is a mature, high-performance NetFlow processing suite. It consists of nfcapd (flow capture daemon), nfdump (flow query tool), and nfreplay (flow replay utility). nfdump is designed for speed — it processes millions of flow records with minimal overhead.
Key Features
nfcapd: High-speed NetFlow v5/v9 and IPFIX collectornfdump: Rich filtering and reporting (top-N, time ranges, protocol breakdowns)nfreplay: Replay captured flows for testing and analysis- Binary flow file format for efficient storage
- Extension blocks for custom fields (NSEL, NAT tracking)
- Profile-based storage organization (daily, weekly, monthly rotations)
Docker Deployment
Community Docker images are available:
| |
Capture daemon configuration:
| |
Query examples:
| |
When to Use nfdump
- You need fast, reliable NetFlow/IPFIX collection with minimal setup
- Historical flow analysis with rich filtering capabilities
- Forensic traffic investigation (replay captured flows)
- Environments where simple file-based storage is preferred over databases
fprobe: The Lightweight Flow Exporter
fprobe is a libpcap-based NetFlow exporter that captures packets on a network interface and exports flow records to a collector. It is ideal for adding flow export capability to hosts that do not have built-in NetFlow support.
Key Features
- Captures packets via libpcap and exports as NetFlow v5/v9 or IPFIX
- Lightweight: single daemon, minimal resource usage
- Configurable flow timeout (active and inactive)
- Supports multiple collectors for redundancy
- BPF filter support for selective capture
- Works on any interface that libpcap can access
Docker Deployment
| |
Command-line usage:
| |
When to Use fprobe
- Adding flow export to servers or workstations without native NetFlow
- Monitoring traffic on specific interfaces or VLANs
- Lightweight flow generation for lab environments
- Capturing east-west traffic between containers or VMs
Comparison Table
| Feature | pmacct | nfdump | fprobe |
|---|---|---|---|
| Primary Role | Collector + processor + exporter | Collector + analyzer | Flow exporter (probe) |
| GitHub Stars | 1,210 | 898 | N/A |
| NetFlow v5 | Yes (collector/exporter) | Yes (collector) | Yes (exporter) |
| NetFlow v9 | Yes | Yes | Yes |
| IPFIX | Yes | Yes | Yes (v10) |
| sFlow | Yes | No | No |
| BGP/BMP | Yes | No | No |
| Database Output | SQL, Redis, Kafka, Mongo | File-based (binary) | N/A (export only) |
| Flow Filtering | BPF + plugin rules | Rich nfdump filter syntax | BPF capture filter |
| Flow Replay | No | Yes (nfreplay) | No |
| Multi-collector | Yes | Yes (nfcapd instances) | Yes |
| Docker Image | pmacct/* (official) | heywoodlh/nfdump (community) | Manual (apk install) |
| Best For | Unified flow + BGP suite | Fast collection + analysis | Adding flow export to hosts |
Installation Guide
Install pmacct (Debian/Ubuntu)
| |
Install nfdump (Debian/Ubuntu)
| |
Install fprobe (Debian/Ubuntu)
| |
Why Self-Host Network Flow Analysis?
Cloud-based network monitoring services charge per flow record, per interface, or per host — costs that grow linearly with your infrastructure. Self-hosted flow tools run on commodity hardware with no per-record fees, no data caps, and no vendor-imposed retention limits.
Running your own flow pipeline means you control data retention (keep flow records for months or years for compliance), customize aggregation and filtering rules to match your network topology, and integrate flow data with existing monitoring stacks like Prometheus, Grafana, or Elasticsearch. For multi-site organizations, self-hosted flow collectors at each site reduce WAN bandwidth by processing flows locally before forwarding summaries.
For network traffic visualization, see our network traffic analysis guide. If you need bandwidth monitoring at the host level, our bandwidth monitoring comparison covers per-interface traffic accounting tools. For complete network device monitoring, our network monitoring guide provides device-level coverage.
FAQ
What is the difference between NetFlow, IPFIX, and sFlow?
NetFlow (v5/v9) is Cisco’s proprietary flow export protocol. IPFIX is the IETF standard based on NetFlow v9, adding extensibility and IPv6 support. sFlow uses packet sampling (typically 1 in N packets) rather than full flow tracking, making it more scalable for high-speed links but less precise for low-volume traffic. pmacct supports all three; nfdump supports NetFlow and IPFIX; fprobe exports NetFlow and IPFIX.
Can I use pmacct and nfdump together?
Yes. A common architecture uses fprobe or router-based flow export to send NetFlow records to both pmacct (for database storage and real-time aggregation) and nfdump (for fast file-based collection and ad-hoc analysis). This gives you both structured querying and rapid forensic analysis capabilities.
How much storage does flow data require?
Flow records are lightweight compared to full packet captures. A typical enterprise router generates 1-5 GB of flow data per day. nfdump’s binary format compresses well (50-70% with gzip). pmacct’s database storage depends on your aggregation rules — aggressive aggregation (per-hour, per-subnet) reduces storage significantly. Plan for 5-15 GB per day for a mid-size network.
Does fprobe impact host performance?
fprobe uses libpcap to capture packets in the kernel, which has minimal overhead for moderate traffic rates (< 1 Gbps). For high-throughput hosts (> 10 Gbps), consider using router-based flow export instead, or configure fprobe with BPF filters to exclude high-volume traffic (backups, replication) from flow accounting.
Which tool should I choose for a production network?
For comprehensive flow analysis with database integration and BGP monitoring, use pmacct. For fast, simple NetFlow/IPFIX collection with rich query capabilities, use nfdump. For adding flow export capability to individual hosts or containers, use fprobe as the probe sending data to your pmacct or nfdump collector.