Network: detect packet loss with netstat (Linux and Windows)
Read TCP retransmission statistics with netstat -s on Linux and Windows.
To detect network packet loss, look at the system TCP retransmission statistics with netstat -s.
Linux
netstat -s | grep retransmitted
netstat -s | grep segments
Windows
netstat -s -p tcp
Compare the number of retransmitted segments with the total number of segments sent: a high retransmission rate points to packets lost or corrupted on the network.
Notes
- In the original note the protocol of the Windows command was unreadable;
tcpwas restored (netstat -s -paccepts a protocol such astcp,udp,ip,icmp).