服务器上的一些统计数据:

1)统计80端口连接数

netstat -nat|grep -i "80"|wc -l

1

2)统计httpd协议连接数

ps -ef|grep httpd|wc -l

1

3)、统计已连接上的,状态为“established'

netstat -na|grep ESTABLISHED|wc -l

2

4)、查出哪个IP地址连接最多,将其封了.

 

 

netstat -na|grep ESTABLISHED|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|sort -r +0n 

netstat -na|grep SYN|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|sort -r +0n

 

(责任编辑:A6)

本站文章仅代表作者观点,本站仅传递信息,并不表示赞同或反对.转载本站点内容时请注明来自www.linuxeden.com-Linux伊甸园。如不注明,www.linuxeden.com将根据《互联网著作权行政保护办法》追究其相应法律责任。