tcpretrans-bpfcc: Trace TCP retransmits
tcpretrans-bpfcc [-h] [-s] [-l] [-c] [-4 | -6]
What it does
Trace TCP retransmits. Part of the bcc tools (bpfcc-tools 0.35.0 on Ubuntu, installed as /usr/sbin/tcpretrans-bpfcc; upstream and other distributions call it tcpretrans). It loads an eBPF program, so it needs root.
Options you will use
-s, --sequence- display TCP sequence numbers
-l, --lossprobe- include tail loss probe attempts
-c, --count- count occurred retransmits per flow
-4, --ipv4- trace IPv4 family only
-6, --ipv6- trace IPv6 family only
Examples
$ sudo tcpretrans-bpfcctrace TCP retransmits
$ sudo tcpretrans-bpfcc -linclude TLP attempts
$ sudo tcpretrans-bpfcc -4trace IPv4 family only
$ sudo tcpretrans-bpfcc -6trace IPv6 family only
Gotchas
- Each retransmit with LADDR:LPORT, RADDR:RPORT and the TCP state: names the lossy peer.
- As a normal user it fails with "could not open bpf map: ..., error: Operation not permitted" (unprivileged BPF is off on Ubuntu).
Try tcpretrans-bpfcc in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.