IP-TCP_METRICS(8)
๐ ip-tcp_metrics(8) ๐
the TCP metrics manual, bestie ๐
๐ NAME
okay so ip-tcp_metrics is all about managing TCP Metrics โจ
๐ SYNOPSIS
ip [ OPTIONS ] tcp_metrics { COMMAND | help }
ip tcp_metrics { show | flush } SELECTOR
ip tcp_metrics delete [ address ] ADDRESS
SELECTOR := [ [ address ] PREFIX ]
๐ธ DESCRIPTION
okay so ip tcp_metrics lets you mess with the entries the kernel keeps about TCP stuff for both IPv4 and IPv6 destinations ๐ง these entries show up when TCP sockets want to share info about a destination, and they get stored in a cache that's keyed by the destination address ๐
the saved info can include metric values (which start out coming from routes), a recent TSVAL for TIME-WAIT recycling, state for the Fast Open feature, and more, bestie ๐ฆ
lowkey important: the cache is never allowed to grow past its configured limit ๐ so the older entries get replaced with fresh info, and sometimes they get reclaimed and reused for brand new destinations ๐
and the kernel never removes entries on its own ๐ญ they can only be flushed with this tool, so this is literally your job now ๐
๐ฆ ip tcp_metrics show - show cached entries
address PREFIX(default) โ the IPv4/IPv6 prefix or address you want to look at ๐ if you don't give a prefix, you get all the entries โจ
when you show entries, the output might include:
age <S.MMM>secโ how long ago the entry was created, reset, or updated with metrics from sockets โฐ the entry gets reset and refreshed when it's used with metrics from a route if those metrics haven't been updated in the last hour, and not every cached value resets the age when it gets updated, so don't be shook ๐ซcwnd <N>โ the CWND metric value ๐fo_cookie <HEX-STRING>โ the cookie value that came in the SYN-ACK, which Fast Open uses for the next SYNs ๐fo_mss <N>โ the MSS value that came in the SYN-ACK, which Fast Open uses for the next SYNs ๐fo_syn_drops <N>/<S.MMM>sec agoโ the number of initial outgoing Fast Open SYNs-with-data that got dropped, spotted by watching the received SYN-ACK after a SYN retransmission ๐ค the seconds show how long ago the last SYN drop happened, and you can use that along with the drop count to turn off Fast Open for a little while ๐ซถreordering <N>โ the reordering metric value ๐rtt <N>usโ the RTT metric value โฑ๏ธrttvar <N>usโ the RTTVAR metric value ๐ssthresh <SSTHRESH>โ the SSTHRESH metric value ๐ฅtw_ts <TSVAL>/<SEC>sec agoโ the recentTSVALand how many seconds have passed since it got saved into a TIME-WAIT socket ๐ง
๐๏ธ ip tcp_metrics delete - delete single entry
address ADDRESS(default) โ the IPv4/IPv6 address ๐ this one is required, no skipping it bestie ๐ โโ๏ธ
๐ ip tcp_metrics flush - flush entries
this command flushes the entries that match some criteria you pick ๐งน
it takes the same arguments as show โจ
๐ EXAMPLES
ip tcp_metrics show address 192.168.0.0/24
shows the entries for destinations from that subnet ๐
ip tcp_metrics show 192.168.0.0/24
same thing, but the address keyword is optional so you can skip it ๐
ip tcp_metrics
showing everything is the default action, iconic ๐
ip tcp_metrics delete 192.168.0.1
removes the entry for 192.168.0.1 from the cache ๐๏ธ
ip tcp_metrics flush 192.168.0.0/24
removes the entries for destinations from that subnet ๐งน
ip tcp_metrics flush all
removes all the entries from the cache ๐
ip -6 tcp_metrics flush all
removes all the IPv6 entries from the cache but keeps the IPv4 entries safe ๐ซถ
๐ SEE ALSO
ip(8) ๐
๐ซถ AUTHOR
Original Manpage by Julian Anastasov <ja@ssi.bg> ๐ท
that's the whole tea, bestie ๐ฆ this page came from iproute2, dated 23 Aug 2012, and it's still giving ๐ โจ
๐ฆ where this page comes from
- alpine 3.22: iproute2-doc 6.15.0-r0 ยท GPL-2.0-or-later
- alpine 3.23: iproute2-doc 6.17.0-r0 ยท GPL-2.0-or-later
- alpine 3.24: iproute2-doc 7.0.0-r0 ยท GPL-2.0-or-later
- arch rolling: iproute2 7.2.0-1
- arch rolling: iproute2 7.3.0-1 ยท GPL-2.0-or-later
- centos-stream 10: iproute 7.0.0-2.el10 ยท GPL-2.0-or-later AND NIST-PD
- centos-stream 9: iproute 6.17.0-3.el9 ยท GPL-2.0-or-later AND NIST-PD
- debian bookworm: iproute2 6.1.0-3 ยท GPL-2.0-only
- debian trixie: iproute2 6.15.0-1 ยท GPL-2.0-only
- fedora 43: iproute 6.14.0-2.fc43 ยท GPL-2.0-or-later AND NIST-PD
- fedora 44: iproute 6.17.0-2.fc44 ยท GPL-2.0-or-later AND NIST-PD
- nixos 26.05: iproute2 7.0.0
- nixpkgs unstable: iproute2 7.2.0
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- ubuntu jammy: iproute2 5.15.0-1ubuntu2 ยท GPL-2.0-only
- ubuntu jammy: iproute2 5.15.0-1ubuntu2.2 ยท GPL-2.0-only
- ubuntu noble: iproute2 6.1.0-1ubuntu6 ยท GPL-2.0-only
- ubuntu noble: iproute2 6.1.0-1ubuntu6.4 ยท GPL-2.0-only
- ubuntu questing: iproute2 6.16.0-1ubuntu2
- ubuntu questing: iproute2 6.16.0-1ubuntu2.1 ยท GPL-2.0-only
- ubuntu questing: iproute2 6.16.0-1ubuntu2.2
- ubuntu resolute: iproute2 6.19.0-1ubuntu1 ยท GPL-2.0-only
- ubuntu resolute: iproute2 6.19.0-1ubuntu1.1 ยท GPL-2.0-only
- ubuntu stonking: iproute2 7.2.0-1ubuntu1 ยท GPL-2.0-only
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms