当我netstat -n
在 Solaris 上运行时,我在 Linux 上得到不同的结果netstat -n
,即使根据 Solaris 和 Linux 的手册页,-n
标志应该做同样的事情。
我的问题:
请告诉我如何netstat
在 Linux 中运行,以便获得与在 Solaris 中相同的结果。
例子:
索拉里斯
netstat -n | head-10
TCP:IPv4
LocalAddress RemoteAddress SwindSend-QRwindRecv-Q State
-------------------------------------------------------------------------
10.119.99.77.9495 10.106.97.118.60823 5888 049640 0CLOSE_WAIT
10.119.99.77.33121 10.119.99.77.1521 49152 049152 0ESTABLISHED
10.119.99.77.1521 10.119.99.77.33121 49152 049152 0ESTABLISHED
10.119.99.77.1521 10.119.99.112.54374 63702 049232 0ESTABLISHED
127.0.0.1.45459 127.0.0.1.8886 49152 049152 0ESTABLISHED
10.119.99.77.7777 10.115.244.53.63575 5888 049220 0CLOSE_WAIT
Linux
netstat -n | head -10
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:14407 127.0.0.1:20281 ESTABLISHED
tcp 0 0 10.106.207.143:61623 10.106.207.143:1521 ESTABLISHED
tcp 0 0 10.106.207.143:61630 10.106.207.143:1521 ESTABLISHED
tcp 0 0 10.106.207.143:61624 10.106.207.143:1521 ESTABLISHED
tcp 0 0 10.106.207.143:61625 10.106.207.143:1521 ESTABLISHED
tcp 0 0 10.106.207.143:61627 10.106.207.143:1521 ESTABLISHED
tcp 0 0 10.106.207.143:1521 10.106.207.143:32263 ESTABLISHED
tcp 0 0 127.0.0.1:20281 127.0.0.1:14407 ESTABLISHED