list_connections
Lists TCP connections and UDP endpoints with owning program, remote address/name, ports, and TCP state; filter by process or text and optionally trace per-connection traffic.
Instructions
Every TCP connection and UDP endpoint with its program, the other end's address and name (from what programs looked up, else reverse DNS), ports and TCP state. With trace_seconds > 0, also each connection's traffic. Filter by process or by text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | Only this process' connections. | |
| limit | No | At most this many (default 200, at most 2000). | |
| filter | No | Only connections whose program, remote address or remote name contains this (any case). | |
| trace_seconds | No | Seconds to trace first (0 to 30, default 0): adds how much each connection sends and receives. Needs "Turn kernel traces on". |