tcpconnlat(8) | System Manager's Manual | tcpconnlat(8) |
tcpconnlat - Trace TCP active connection latency. Uses Linux eBPF/bcc.
tcpconnlat [-h] [-t] [-p PID] [-L] [-4 | -6] [-v] [min_ms]
This tool traces active TCP connections (eg, via a connect() syscall), and shows the latency (time) for the connection as measured locally: the time from SYN sent to the response packet. This is a useful performance metric that typically spans kernel TCP/IP processing and the network round trip time (not application runtime).
All connection attempts are traced, even if they ultimately fail (RST packet in response).
This tool works by use of kernel dynamic tracing of TCP/IP functions, and will need updating to match any changes to these functions. This tool should be updated in the future to use static tracepoints, once they are available.
Since this uses BPF, only the root user can use this tool.
CONFIG_BPF and bcc.
This traces the kernel tcp_v[46]_connect functions and prints output for each event. As the rate of this is generally expected to be low (< 1000/s), the overhead is also expected to be negligible. If you have an application that is calling a high rate of connects()s, such as a proxy server, then test and understand this overhead before use.
This is from bcc.
Also look in the bcc distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool.
Linux
Unstable - in development.
Brendan Gregg
2016-02-19 | USER COMMANDS |