get_network_connections
Inspect active TCP/UDP connections with state, addresses, and process info. Filter by type or status, group by PID, and optionally resolve hostnames via reverse DNS.
Instructions
Returns active TCP/UDP connections with state, addresses, process info, and optional reverse-DNS hostnames. Read-only from /proc/net. Params: status and type filters, grouped by PID, max_connections (0-200). resolve_hostnames does network lookups and is slow - keep it off unless needed. For listening sockets prefer get_listening_ports, which also gives process names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | optional type filter: tcp, udp | |
| status | No | optional status filter (e.g. ESTABLISHED, LISTEN, TIME_WAIT) | |
| grouped | No | optional: group connections by PID (default: false) | |
| max_connections | No | optional: limit results (max: 200) | |
| resolve_hostnames | No | optional: resolve remote hostnames via reverse DNS (default: false) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| errors | No | ||
| groups | No | ||
| connections | Yes |