socketcap
Socketcap is a software utility designed to capture and analyze the network socket activity of a running application. It records the sequence of socket API calls made by the process, including creation of sockets, connections, data transmission, reception, and closure, along with metadata such as timestamps, process IDs, socket descriptors, IP addresses, ports, and protocol types. This provides visibility into how an application interacts with the network stack.
Most implementations achieve this through user-space instrumentation or dynamic interposition. Common techniques include function interposition via
Socketcap is platform- and implementation-specific; different projects may support Linux, Windows, or macOS, with varying levels
See also: socket tracing, strace and ltrace, DTrace, and eBPF-based tracing tools.