The current connection status of the machine can be viewed through netstat -anp:
"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。
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.
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.