filetrace flows lists the bytes exchanged per process, socket and remote endpoint, largest sender first. A flow is one process’s traffic with one remote endpoint on one socket, so a socket shared by several processes has a flow for each. The FLOW column gives the ID that inspect flow takes, and --group-by merges flows into totals per process, remote address, port or protocol.
Usage
What it shows
Grouped flows
--group-by merges the flows that share a process name, a remote address, a remote port or a protocol, and prints the totals with the number of flows merged:
* collects flows without a remote end. Groups are ordered by bytes sent, or by bytes received with --direction inbound, and --limit caps the number of groups. In machine-readable formats the first field is process, remote_ip, remote_port or protocol, followed by bytes_sent, bytes_received and flows.
Options
string
Merge flows by
process, remote, port or protocol.string
default:"outbound"
Order by
inbound (bytes received), outbound (bytes sent) or both (bytes sent and received together).boolean
Only flows with traffic within the last 5 seconds.
number
Only this process.
string
Only processes with this name.
* matches any run of characters. Alias: --name.string
Only processes of this user, by name or numeric ID.
string
Only processes in this cgroup, by numeric ID or cgroup directory.
number
Only processes in this network, PID or mount namespace, given as the inode number that
ls -Li /proc/<pid>/ns shows.string
Only this remote address or CIDR network.
string
Only this local address or CIDR network.
number
Only this local or remote port.
string
default:"all"
Only this protocol:
tcp, udp or all.string
Only this address family:
ipv4 or ipv6.string
At least this many bytes, sent and received together, such as
1KB, 100MB or 1GB.string
Only flows active at or after this time: a duration such as
10m, 1h or 7d, or an RFC 3339 timestamp.string
Only flows that started at or before this time.
string
outbound, inbound, bytes, time, pid, rate, duration or process. --sort and --direction set the same order; the one given last applies.boolean
Show remote addresses by host name where a reverse DNS lookup finds one. The lookups tell the DNS resolver which addresses are being looked at.
number
Show at most this many rows.
string
default:"table"
table, json, jsonl, csv or quiet. Quiet prints one flow ID per row.boolean
Short for
--format json.boolean
Short for
--format jsonl.string
Write to this file instead of standard output.
--since and --until select which records are listed. See filters and output formats.
Examples
top destinations ranks remote addresses the same way as --group-by remote, and inspect ip shows one address or network with its processes and the files sent to it.