加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – 检查端口80上的活动连接数?

发布时间:2020-12-13 18:33:46 所属栏目:Linux 来源:网络整理
导读:我有一个网络服务器,我需要在给定时间检查我的服务器中的连接数, 我用过以下 netstat -anp |grep 80 |wc -l 这回来了 2542 但是从我的谷歌分析中我知道同时用户不超过100. is this correct ? if not how to i get the active number of connections ? is thi
我有一个网络服务器,我需要在给定时间检查我的服务器中的连接数,

我用过以下

netstat -anp |grep 80 |wc -l

这回来了

2542

但是从我的谷歌分析中我知道同时用户不超过100.

is this correct ? 
if not how to i get the active number of connections ? 
is this sign of a victim of DOS attack how do i know that ?

解决方法

尝试只计算ESTABLISHED连接:
netstat -anp | grep :80 | grep ESTABLISHED | wc -l

另外,请注意不要在端口grep语句中使用冒号.只查找80可能会导致pids和其他端口错误地导致其输出中出现80个字符.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读