netstat Recv-Q and Send-Q

The current connection status of the machine can be viewed through netstat -anp:

 
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:8139            0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:26837           0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:1046            0.0.0.0:*               LISTEN      -               
tcp        0      0 127.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      0 10.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      0 10.100.83.145:57159     10.100.83.140:80        ESTABLISHED 7072/java       
tcp6       0      0 10.100.83.145:57128     10.100.83.140:80        ESTABLISHED 7072/java 
 
It is easy to understand proto, localAddress, etc. What does Recv-Q Send-Q mean? Why is the Send-Q duration not 0? If it is not 0, does it mean that the network exit is blocked? Check out the relevant information on this issue.
 
A more detailed explanation is:
What It 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 always be zero; if they're not you might have a problem. Packets should not be piling up in either queue, except briefly, as this example shows: 
tcp 0 593 192.168.1.5:34321 venus.euao.com:smtp ESTABLISHED 
That happened when I hit the "check mail" button in KMail; a brief queuing of outgoing packets is normal behavior. If the receiving queue is consistently jamming up, you might be experiencing a denial-of-service attack. If the sending queue does not clear quickly, you might have an application that is sending them out too fast, or the receiver cannot accept them quickly enough. 
"Local address" is either your IP and port number, or IP and the name of a service. "Foreign address" is the hostname and service you are connected to. The asterisk is a placeholder for IP addresses, which of course cannot be known until a remote host connects. "State" is the current status of the connection. Any TCP state can be displayed here, but these three are the ones you want to see。
 
roughly means:
Recv-Q Send-Q represents the network receiving queue and sending queue respectively. Q is short for Queue.

These two values ​​should normally be 0, if not 0 can be problematic. Packets should not have stacking state in either queue. A brief non-zero condition is acceptable. As in the example in the text, it is normal for the short-lived Send-Q queue to send pakets non-zero.

If the receiving queue Recv-Q has been blocked, it may be suffering from a denial-of-service attack.
If the sending queue Send-Q cannot be cleared quickly, it may be that an application sends data packets too fast, or the other party is not fast enough to receive data packets.

 

Recv-Q: Indicates that the received data has been buffered locally, but how much has not been taken away by the process, recv()

Send-Q: The data that the other party has not received or that there is no Ack is still a local buffer.

Through these two values ​​of netstat, you can simply judge whether the program cannot receive the package, whether the package has not arrived or the package has not been recv by the process.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325139787&siteId=291194637