Show TCP details per socket

Show rtt, cwnd and retransmits for each connection to remote port 443. Helps find slow or lossy peers

ss -tip state established '( dport = :443 )'

tool
iproute212 commands
tags
iproute2ssperformancenetworkdebug

More iproute2 commands

  • ss -K dst <ip> dport = :8080

    Force-close matching sockets (kernel 4.9+). Needs CONFIG_INET_DIAG_DESTROY

  • ip addr add 10.0.0.5/24 dev <name> && ip addr show dev <name>

    Add a secondary IP with a prefix on the fly. Note: it is not saved after reboot

  • ip link set dev <name> mtu 9000 && ip link set dev <name> up

    Set a jumbo MTU and bring the link up. Note: the MTU must match along the whole path

  • ip -j a | jq -r '.[] | select(.operstate=="UP") | .ifname + " " + (.addr_info[]?.local // "-")'

    Get interfaces as JSON and list UP links with their local IPs

  • ip route get <ip>

    Show the route, source IP and outgoing interface that the kernel picks for a destination

all 12 iproute2 commands