1*387f9dfdSAndroid Build Coastguard WorkerDemonstrations of tcpsynbl, the Linux BCC/eBPF version. 2*387f9dfdSAndroid Build Coastguard Worker 3*387f9dfdSAndroid Build Coastguard Worker 4*387f9dfdSAndroid Build Coastguard WorkerThis tool shows the TCP SYN backlog size during SYN arrival as a histogram. 5*387f9dfdSAndroid Build Coastguard WorkerThis lets you see how close your applications are to hitting the backlog limit 6*387f9dfdSAndroid Build Coastguard Workerand dropping SYNs (causing performance issues with SYN retransmits). For 7*387f9dfdSAndroid Build Coastguard Workerexample: 8*387f9dfdSAndroid Build Coastguard Worker 9*387f9dfdSAndroid Build Coastguard Worker# ./tcpsynbl.py 10*387f9dfdSAndroid Build Coastguard WorkerTracing SYN backlog size. Ctrl-C to end. 11*387f9dfdSAndroid Build Coastguard Worker^C 12*387f9dfdSAndroid Build Coastguard Worker 13*387f9dfdSAndroid Build Coastguard Workerbacklog_max = 500L 14*387f9dfdSAndroid Build Coastguard Worker backlog : count distribution 15*387f9dfdSAndroid Build Coastguard Worker 0 -> 1 : 961 |****************************************| 16*387f9dfdSAndroid Build Coastguard Worker 2 -> 3 : 1 | | 17*387f9dfdSAndroid Build Coastguard Worker 18*387f9dfdSAndroid Build Coastguard WorkerThis output shows that for the backlog limit of 500, there were 961 SYN 19*387f9dfdSAndroid Build Coastguard Workerarrival where the backlog was zero or one, and one accept where the backlog was 20*387f9dfdSAndroid Build Coastguard Workertwo or three. This indicates that we are nowhere near this limit. 21*387f9dfdSAndroid Build Coastguard Worker 22*387f9dfdSAndroid Build Coastguard WorkerUSAGE: 23*387f9dfdSAndroid Build Coastguard Worker 24*387f9dfdSAndroid Build Coastguard Worker# ./tcpsynbl -h 25*387f9dfdSAndroid Build Coastguard Workerusage: tcpsynbl.py [-h] [-4 | -6] 26*387f9dfdSAndroid Build Coastguard Worker 27*387f9dfdSAndroid Build Coastguard WorkerShow TCP SYN backlog. 28*387f9dfdSAndroid Build Coastguard Worker 29*387f9dfdSAndroid Build Coastguard Workeroptional arguments: 30*387f9dfdSAndroid Build Coastguard Worker -h, --help show this help message and exit 31*387f9dfdSAndroid Build Coastguard Worker -4, --ipv4 trace IPv4 family only 32*387f9dfdSAndroid Build Coastguard Worker -6, --ipv6 trace IPv6 family only 33*387f9dfdSAndroid Build Coastguard Worker 34*387f9dfdSAndroid Build Coastguard Workerexamples: 35*387f9dfdSAndroid Build Coastguard Worker ./tcpsynbl # trace syn backlog 36*387f9dfdSAndroid Build Coastguard Worker ./tcpsynbl -4 # trace IPv4 family only 37*387f9dfdSAndroid Build Coastguard Worker ./tcpsynbl -6 # trace IPv6 family only