# Display tcp connections on the machine and their states. netstat -an | awk '/tcp/ {print $6}' | sort | uniq -c