Display count of all TCP connections on a Linux server or workstation

Display all  TCP connections on a Linux based server (execute the command below from ROOT user):

netstat -an|awk ‘/tcp/ {print $6}’|sort|uniq -c

Should output something like:

     45 ESTABLISHED
      7 LISTEN
      2 TIME_WAIT


Leave a Reply