LINUX netstat连接状态解析及TCP状态转换
水平有限如果有误请指出。
我们经常在netstat -anlp 中能够看到端口连接状态一项
gaopeng@bogon:~$ netstat -anlp|grep 10050
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 2502/server
tcp 0 0 192.168.190.81:48008 192.168.190.81:10050 ESTABLISHED 2510/client
tcp 0 0 192.168.190.81:10050 192.168.190.81:48008 ESTABLISHED 2502/server
又比如
gaopeng@bogon:~$ netstat -anlp|grep 10050
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 1 0 192.168.190.81:48008 192.168.190.81:10050 CLOSE_WAIT 2510/client
tcp 0 0 192.168.190.81:10050 192.168.1