Agnus Dei (jackal) wrote,
Agnus Dei
jackal

Two ways to check the TCP States of socket connections on a server.

# ss -an | awk '{print $1;}' | sort | uniq -c | grep -v "State" | sort -rn
126 ESTAB
29 LISTEN
15 TIME-WAIT


# netstat -an |grep tcp | awk '{print $6}' | sort | uniq -c | sort -rn
123 ESTABLISHED
29 LISTEN
12 TIME_WAIT
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments