tcprtt(8) System Manager's Manual tcprtt(8)

# [NAME](#NAME)

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

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#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.

# [REQUIREMENTS](#REQUIREMENTS)

CONFIG\_BPF and bcc.

# [OPTIONS](#OPTIONS)

[-h](#h)

Print usage message.

[-T](#T)

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

[-D](#D)

Show debug infomation of bpf text.

[-m](#m)

Output histogram in milliseconds.

[-i INTERVAL](#i)

Print output every interval seconds.

[-d DURATION](#d)

Total duration of trace in seconds.

[-p LPORT](#p)

Filter for local port.

[-P RPORT](#P)

Filter for remote port.

[-a LADDR](#a)

Filter for local address.

[-A RADDR](#A)

Filter for remote address.

[-b](#b)

Show sockets histogram by local address.

[-B](#B)

Show sockets histogram by remote address.

[-e](#e)

Show extension summary(average).

-4

Trace IPv4 family only.

-6

Trace IPv6 family only.

# [EXAMPLES](#EXAMPLES)

[Trace TCP RTT and print 1 second summaries, 10 times:](#Trace)

\# **tcprtt -i 1 -d 10**

[Summarize in millisecond, and timestamps:](#Summarize)

\# **tcprtt -m -T**

[Only trace TCP RTT for remote address 192.168.1.100 and remote port 80:](#Only)

\# **tcprtt -i 1 -d 10 -A 192.168.1.100 -P 80**

[Trace local port and show a breakdown of remote hosts RTT:](#Trace~2)

\# **tcprtt -i 3 --lport 80 --byraddr**

[Trace IPv4 family only:](#Trace~3)

\# **tcprtt -4**

[Trace IPv6 family only:](#Trace~4)

\# **tcprtt -6**

# [OVERHEAD](#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.

# [SOURCE](#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.

# [OS](#OS)

Linux

# [STABILITY](#STABILITY)

Unstable - in development.

# [AUTHOR](#AUTHOR)

zhenwei pi

# [SEE ALSO](#SEE_ALSO)

[tcptracer(8)](/man/enterprise-packages/bcc/tcptracer.8), [tcpconnect(8)](/man/enterprise-packages/bcc/tcpconnect.8), [funccount(8)](/man/enterprise-packages/bcc/funccount.8), [tcpdump(8)](/man/enterprise-packages/bcc/tcpdump.8)

2020-08-23 USER COMMANDS

---

Document: tcprtt(8) from bcc 0.37.0-r2 (Chainguard OS)
Source: https://github.com/iovisor/bcc
