When I run netstat -n
on Solaris I get different results from netstat -n
on Linux,
even though according to the manual pages in Solaris and Linux the -n
flag should do the same thing.
My question:
Please advise me how to run netstat
in Linux so that I will get the same results as I get in Solaris.
EXAMPLE:
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
netstat -n
on the two systems, the-n
flag behaves in the same way, although the two programs format their outputs a little differently. Can you explain a little about how you want the Linux output to look and why you want it that way?