[Gllug] [OT] Solaris Netstat Help

Andy Farnsworth farnsaw at stonedoor.com
Wed Mar 19 11:34:18 UTC 2003


Thanks to Doug Winter and Tethys,

  Doug sent directly and Tethys helped explain it.  I am just going to run
with tcp -an on AIX as there is no simple way to limit the output to just
the TCP without writing a wrapper or ending up with summary info.

Andy Farnsworth
-------------------------------
Mobile   : +44 (0) 7736 952 749
@Ikea    : +46 (0)   42 264 982
@Timeless: +44 (0)  208 818 2929
E-Mail   : farnsaw at stonedoor.com
E-Mail   : afarnsworth at timeless-group.com

-----Original Message-----
From: gllug-admin at linux.co.uk [mailto:gllug-admin at linux.co.uk]On Behalf
Of Tethys
Sent: March 19 2003 11:38
To: gllug at linux.co.uk
Subject: Re: [Gllug] [OT] Solaris Netstat Help



"Andy Farnsworth" writes:

>  Does anyone out there have access to Solaris?  I am in need of knowing
>what the following command gives as output:
>
>netstat -naP tcp

TCP: IPv4
   Local Address        Remote Address    Swind Send-Q Rwind Recv-Q  State
-------------------- -------------------- ----- ------ ----- ------ -------
      *.*                  *.*                0      0 24576      0 IDLE
      *.22                 *.*                0      0 24576      0 LISTEN
      *.22                 *.*                0      0 24576      0 LISTEN
      *.111                *.*                0      0 24576      0 LISTEN
      *.*                  *.*                0      0 24576      0 IDLE
      *.32771              *.*                0      0 24576      0 LISTEN
      *.4045               *.*                0      0 24576      0 LISTEN
      *.25                 *.*                0      0 24576      0 LISTEN
      *.5987               *.*                0      0 24576      0 LISTEN
      *.898                *.*                0      0 24576      0 LISTEN
      *.32772              *.*                0      0 24576      0 LISTEN
      *.32775              *.*                0      0 24576      0 LISTEN
      *.32776              *.*                0      0 24576      0 LISTEN
      *.*                  *.*                0      0 24576      0 IDLE
192.168.1.184.22     192.168.1.186.50457  41992      0 24616      0
ESTABLISHED
192.168.1.184.22     192.168.1.186.56806  38912      0 24616      0
ESTABLISHED
192.168.1.184.22     192.168.1.183.58672  18048      0 24616      0
ESTABLISHED
      *.*                  *.*                0      0 24576      0 IDLE

TCP: IPv6
   Local Address                     Remote Address                 Swind
Send-Q Rwind Recv-Q   State      If
--------------------------------- --------------------------------- ----- --
---- ----- ------ ----------- -----
      *.*                               *.*                             0
0 24576      0 IDLE
      *.22                              *.*                             0
0 24576      0 LISTEN
      *.25                              *.*                             0
0 24576      0 LISTEN

"-a" means all, "-n" tells netstat not to perform address/port lookups,
and just use the raw numbers instead. "-P tcp" tells it to only show
TCP connections.

Under Linux, the equivalent command is "netstat -ant". Under AIX, you can
use "netstat -an", but although it has a "-p tcp" flag, that changes the
output to display summary statistics, rather than active connections. I'm
not sure if there's an easy way to get only tcp socket info (other than
grep :-)

Tet

--
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list