My connections feel unreliable. How do I check for hidden packet loss?

Quick Linux Tip #44:

Try: ss -ti | grep -A3 'ESTAB' | head -20

Info: ss -ti dumps TCP internal metrics. Look for retrans:X/Y (X current retransmits, Y total) and rtt (round-trip time). Non-zero retransmits signal packet loss or network congestion.

Examples:

  • $ ss -ti state established '( dport = :443 )'  # Inspect HTTPS connections
  • $ watch -n 1 'ss -s'  # Monitor overall socket summary
  • $ netstat -s | grep -i 'retrans\|reset'  # Global TCP retransmission counters

Note: When retransmissions occur, cwnd (congestion window) shrinks automatically. Persistent retransmits across multiple endpoints point to network hardware issues rather than application bugs.




LinuxTeck.com
linuxteck@ubuntu:~$ ss -ti | grep -A3 'ESTAB' | head -20
ESTAB    0      0      192.168.1.50:22       192.168.1.100:54321
         cubic wscale:7,7 rto:19.35/9.5 ato:40 mss:1448 pmtu:1500 rcvmss:1448
         advmss:1448 cwnd:10 bytes_sent:12345 bytes_acked:12345 bytes_received:6789 segs_out:234
         segs_in:189 send 5.99Mbps lastsnd:456 lastrcv:432 lastack:432
ESTAB    0      0      192.168.1.50:443      10.0.0.5:45678
         cubic wscale:7,7 rto:212 rtt:11.5/2.3 mss:1448 pmtu:1500 rcvmss:1448
         advmss:1448 cwnd:10 bytes_sent:98765 bytes_acked:98765 bytes_received:45678 segs_out:567
         segs_in:432 send 10.06Mbps retrans:0/3 lastsnd:12 lastrcv:8
linuxteck@ubuntu:~$

PREVIOUS ARTICLE Quick Linux Tip #43: How do I extract config values from between BEGIN and END markers?
About John Britto

John Britto Founder & Chief-Editor @LinuxTeck. A Computer Geek and Linux Intellectual having more than 20+ years of experience in Linux and Open Source technologies.

View all posts by John Britto →

Leave a Reply

Your email address will not be published.