1. 首页
  2. 数据库
  3. 其它
  4. Linux查看某个端口的连接数的方法

Linux查看某个端口的连接数的方法

上传者: 2021-01-16 03:19:36上传 PDF文件 91.21KB 热度 20次
一、查看哪些IP连接本机 netstat -an 二、查看TCP连接数 1)统计80端口连接数 netstat -nat | grep -i 80 | wc -l 2)统计httpd协议连接数 ps -ef | grep httpd | wc -l 3)统计已连接上的,状态为“established netstat -anp | grep ESTABLISHED | wc -l 4)、查出哪个IP地址连接最多,将其封了 netstat -anp | grep ESTABLISHED | awk {print $5}|awk -F: {print $1} | sort | uniq
用户评论