状态统计
netstat -ant |
awk '/tcp/ {print $6}'|
sort |
uniq -c |
sort -
nr
前十位ESTABLISHED状态ip统计
netstat -ant |
grep "ESTABLISHED"|
awk '/tcp/ {print $5}'|
cut -d
":" -f1|
sort |
uniq -c |
sort -nr |
head -
10
前十位TIME_WAIT状态ip统计
netstat -ant |
grep "TIME_WAIT"|
awk '/tcp/ {print $5}'|
cut -d
":" -f1|
sort |
uniq -c |
sort -nr |
head -
10
服务器本地被连接的EST
netstat -ant |
grep "EST"|
awk '/tcp/ {print $4}' |
sort |
uniq -c |
sort -nr |
head -
10
服务器本地被连接的WAIT
netstat -ant |
grep "TIME_WAIT"|
awk '/tcp/ {print $4}' |
sort |
uniq -c |
sort -nr |
head -
10
netstat -ant |
awk '/^tcp/ {print $5}'|
cut -d
":" -f1 |
sort |
uniq -c|
sort -nr |
grep -v
"10.20"
转载于:https://www.cnblogs.com/icemonkey/p/10447714.html
转载请注明原文地址: https://win8.8miu.com/read-950151.html