filetrace connections lists the open and recently closed sockets, most recently active first, with the process that owns each, its state and the bytes it sent and received. The SOCKET column gives the ID that inspect socket takes.
Usage
What it shows
The owning process of an accepted connection is known once it sends or receives on it; until then PID shows
-.
A closed socket stays listed for 60 seconds after it closes. With
--since or --state closed, closed sockets are listed for as long as the agent remembers them.
Options
boolean
Only sockets that are open: not closed and not idle.
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
connecting, established, listening, closed, active or idle.string
Only sockets active at or after this time: a duration such as
10m, 1h or 7d, or an RFC 3339 timestamp.string
Only sockets first seen at or before this time.
string
outbound, inbound, bytes, time, pid, rate, duration or process. outbound and inbound order by bytes sent or received, rate by the current rate in both directions. Without it, the most recently active come first.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 socket 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
inspect:
flows splits the bytes of a socket by process and remote endpoint.