Largest number of established connections

To find out the largest number of established connections you can simply use something like

netstat -an | grep 'ESTABLISHED' | awk '{print $4}' | cut -d: -f1 | uniq -c | sort -rn | head -n 1

To see the list of the top 10

netstat -an | grep 'ESTABLISHED' | awk '{print $4}' | cut -d: -f1 | uniq -c | sort -rn | head -n 10

To view all

netstat -an | grep 'ESTABLISHED' | awk '{print $4}' | cut -d: -f1 | uniq -c | sort -rn

You can also view all but have pages so you can view each in detail

netstat -an | grep 'ESTABLISHED' | awk '{print $4}' | cut -d: -f1 | uniq -c | sort -rn | more

You can show the port with

netstat -an | grep 'ESTABLISHED' | awk '{print $4}' | uniq -c | sort -rn


User Comments