Count connections per state

How many connections are in ESTABLISHED, TIME_WAIT, etc.

ss -tan | awk 'NR>1{print $1}' | sort | uniq -c | sort -rn

tool
linux133 commands
tags
linuxnetworkmonitoring

More linux commands

  • mtr --report --tcp --port 443 example.com

    Combine traceroute and ping; TCP mode to bypass ICMP blocks

  • ping -M do -s 1472 -c 3 8.8.8.8

    Send DF-bit ping of 1500-byte frames to detect MTU issues

  • iptables -L -n -v --line-numbers

    All filter table rules with packet counters and line numbers

  • nft list ruleset

    Full nftables ruleset in human-readable form

  • iperf3 -c <server_ip> -t 10 -P 4

    Measure TCP throughput with 4 parallel streams for 10 seconds

all 133 linux commands