The agent must be running, and it only knows what happened since it started. Run the commands with
sudo when the agent runs as root.Summarize an address
filetrace inspect ip gives the overview: bytes in each direction, the number of flows and processes, and the file transfers to that address.
--limit sets the number of rows per list (20 by default).
List the files sent to it
files lists only bytes that a file accounts for. To include sent bytes with no associated file, use transfers, which shows unknown in the FILE column for them:
Find the connections and flows
connections lists sockets by their two ends; flows lists the bytes each process exchanged with each remote endpoint. Both take --remote, --port and --protocol.
--group-by merges flows by process, remote, port or protocol, which turns a long list into a ranking. To see the top destinations of the whole machine instead:
Drill into one socket or flow
TheSOCKET column of connections and the FLOW column of flows are IDs that inspect takes:
inspect socket shows the socket’s ends, owner, traffic and the files sent on it; inspect flow shows one process’s traffic with one remote endpoint on that socket.
Names instead of addresses
--resolve-hostnames shows remote addresses by host name where a reverse DNS lookup finds one:
Watch the address live
events for the event stream.