netstat的Recv-Q和Send-Q

来源:互联网 发布:软件科技有限公司简介 编辑:程序博客网 时间:2024/04/28 13:24

通过netstat -anp可以查看机器的当前连接状态:

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address          Foreign Address         State      PID/Program name

tcp        0      00.0.0.0:8139            0.0.0.0:*              LISTEN      -              

tcp        0      0 0.0.0.0:111            0.0.0.0:*              LISTEN      -              

tcp        0      00.0.0.0:26837           0.0.0.0:*              LISTEN      -              

tcp        0      00.0.0.0:1046            0.0.0.0:*              LISTEN      -              

tcp        0      0127.0.0.1:25            0.0.0.0:*              LISTEN      -              

tcp6       0    910 10.100.83.145:57142    10.100.83.140:80        ESTABLISHED 7072/java      

tcp6       0      010.100.83.145:57114     10.100.83.140:80       ESTABLISHED 7072/java       

tcp6       0    914 10.100.83.145:57117    10.100.83.140:80        ESTABLISHED 7072/java      

tcp6       0    910 10.100.83.145:57126    10.100.83.140:80        ESTABLISHED 7072/java      

tcp6       0      010.100.83.145:57159     10.100.83.140:80       ESTABLISHED 7072/java       

tcp6       0      010.100.83.145:57128     10.100.83.140:80       ESTABLISHED 7072/java 

 

一个较详细的解释是

WhatIt Means

"Proto"is short for protocol, which is either TCP or UDP. "Recv-Q" and"Send-Q" mean receiving queue and sending queue. These should alwaysbe zero; if they're not you might have a problem. Packets should not be pilingup in either queue, except briefly, as this example shows: 

tcp 0593 192.168.1.5:34321 venus.euao.com:smtp ESTABLISHED 

Thathappened when I hit the "check mail" button in KMail; a brief queuingof outgoing packets is normal behavior. If the receiving queue is consistentlyjamming up, you might be experiencing a denial-of-service attack. If thesending queue does not clear quickly, you might have an application that issending them out too fast, or the receiver cannot accept them quicklyenough. 

"Localaddress" is either your IP and port number, or IP and the name of aservice. "Foreign address" is the hostname and service you areconnected to. The asterisk is a placeholder for IP addresses, which of coursecannot be known until a remote host connects. "State" is the currentstatus of the connection. Any TCP state can be displayed here, but these threeare the ones you want to see.

 

大致的意思是

Recv-Q Send-Q分别表示网络接收队列,发送队列。QQueue的缩写。

这两个值通常应该为0,如果不为0可能是有问题的。packets在两个队列里都不应该有堆积状态。可接受短暂的非0情况。如文中的示例,短暂的Send-Q队列发送packets0是正常状态。

如果接收队列Recv-Q一直处于阻塞状态,可能是遭受了拒绝服务 denial-of-service 攻击。

如果发送队列Send-Q不能很快的清零,可能是有应用向外发送数据包过快,或者是对方接收数据包不够快。

Recv-Q:表示收到的数据已经在本地接收缓冲,但是还有多少没有被进程取走

Send-Q:对方没有收到的数据或者说没有Ack,还是本地缓冲区。

通过netstat的这两个值就可以简单判断程序收不到包到底是包没到还是包没有被进程接收

阅读全文
'); })();
0 0
原创粉丝点击
热门IT博客
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 关于感恩老师的作文 感恩作文200字 关于感恩的演讲稿 学会感恩作文600字 感恩歌曲大全 懂得感恩的名言 感恩议论文800字 有关感恩的故事 关于感恩的图片 感恩父母图片带字 感恩的图片和话 感恩的作文400个字 感恩作文100字 感恩作文400字左右 关于感恩的作文400字 感恩有你作文 感恩励志名言 关于感恩的散文 感恩的意思是什么 感恩父母作文600字 关于感恩的作文素材 感恩作文素材 关于感恩的故事 感恩父亲的句子 关于感恩的词语 感恩朋友的作文 感恩的诗句和名言 感恩的名言警句 感恩生活的名言 感恩作文500字 感恩老师的诗歌 感恩父母的作文300字 感恩儿童座椅 感恩安全座椅不合格 感恩汽车安全座椅 传递感恩 点燃梦想 心怀感恩 回报社会 心存感恩 成就人生 感恩老师的手抄报 心存感恩 知足惜福 黄鹤楼1916感恩