Как да намерим от кое IP колко connection-и имаме в момента:
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n |
Опит в реални условия:
root@popeye ~ # netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n 1 111.13.8.19 1 176.8.242.234 1 66.249.66.156 1 66.249.66.22 1 66.249.72.238 1 86.13.124.242 1 93.123.69.7 1 94.175.113.39 1 94.193.159.185 2 86.8.238.10 2 87.121.214.124 2 90.195.21.66 2 94.193.152.75 2 94.73.35.88 3 2.122.59.243 3 46.208.162.134 3 79.100.59.207 3 92.14.138.87 3 92.236.71.211 3 92.40.253.7 3 95.169.209.242 4 78.90.211.49 4 86.28.150.187 5 123.126.68.32 5 86.81.215.173 6 46.10.82.69 6 82.12.250.92 7 2.28.89.144 7 81.98.23.19 7 86.148.168.216 8 188.28.252.230 8 86.21.216.192 9 78.147.234.103 10 92.41.251.197 14 127.0.0.1 15 86.25.213.226 22 2.125.125.108 24 93.96.33.84 134 176.9.39.106 root@popeye ~ # |