DOKK / manpages / debian 12 / bpfcc-tools / tcprtt-bpfcc.8.en
tcprtt(8) System Manager's Manual tcprtt(8)

tcprtt - Trace TCP RTT of established connections. Uses Linux eBPF/bcc.

tcprtt [-h] [-T] [-D] [-m] [-p LPORT] [-P RPORT] [-a LADDR] [-A RADDR] [-i INTERVAL] [-d DURATION] [-b] [-B] [-e] [-4 | -6]

This tool traces established connections RTT(round-trip time) to analyze the quality of network. This can be useful for general troubleshooting to distinguish the network latency is from user process or physical network.

Since this uses BPF, only the root user can use this tool.

CONFIG_BPF and bcc.

Print usage message.
Include a time column on output (HH:MM:SS).
Show debug infomation of bpf text.
Output histogram in milliseconds.
Print output every interval seconds.
Total duration of trace in seconds.
Filter for local port.
Filter for remote port.
Filter for local address.
Filter for remote address.
Show sockets histogram by local address.
Show sockets histogram by remote address.
Show extension summary(average).
-4
Trace IPv4 family only.
-6
Trace IPv6 family only.

# tcprtt -i 1 -d 10
# tcprtt -m -T
# tcprtt -i 1 -d 10 -A 192.168.1.100 -P 80
# tcprtt -i 3 --lport 80 --byraddr
# tcprtt -4
# tcprtt -6

This traces the kernel tcp_rcv_established function and collects TCP RTT. The rate of this depends on your server application. If it is a web or proxy server accepting many tens of thousands of connections per second.

This is from bcc.

https://github.com/iovisor/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.

zhenwei pi

tcptracer(8), tcpconnect(8), funccount(8), tcpdump(8)

2020-08-23 USER COMMANDS