logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

       zhenwei pi

Description

       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.

Examples

       Trace TCP RTT and print 1 second summaries, 10 times:
              # tcprtt-i1-d10

       Summarize in millisecond, and timestamps:
              # tcprtt-m-T

       Only trace TCP RTT for remote address 192.168.1.100 and remote port 80:
              # tcprtt-i1-d10-A192.168.1.100-P80

       Trace local port and show a breakdown of remote hosts RTT:
              # tcprtt-i3--lport80--byraddr

       Trace IPv4 family only:
              # tcprtt-4

       Trace IPv6 family only:
              # tcprtt-6

Name

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

Options

       -h     Print usage message.

       -T     Include a time column on output (HH:MM:SS).

       -D     Show debug infomation of bpf text.

       -m     Output histogram in milliseconds.

       -i INTERVAL
              Print output every interval seconds.

       -d DURATION
              Total duration of trace in seconds.

       -p LPORT
              Filter for local port.

       -P RPORT
              Filter for remote port.

       -a LADDR
              Filter for local address.

       -A RADDR
              Filter for remote address.

       -b     Show sockets histogram by local address.

       -B     Show sockets histogram by remote address.

       -e     Show extension summary(average).

       -4     Trace IPv4 family only.

       -6     Trace IPv6 family only.

Os

       Linux

Overhead

       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.

Requirements

       CONFIG_BPF and bcc.

See Also

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

USER COMMANDS                                      2020-08-23                                          tcprtt(8)

Source

       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.

Stability

       Unstable - in development.

Synopsis

tcprtt[-h][-T][-D][-m][-pLPORT][-PRPORT][-aLADDR][-ARADDR][-iINTERVAL][-dDURATION][-b][-B][-e][-4|-6]

See Also