Administering TCP/IP Networks, IPMP, and IP Tunnels in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Displaying the Status of Sockets

Use the netstat command to view the status of the sockets on a local host. You can specify several netstat command options as a regular user.

Display the status of connect sockets as follows:

% netstat

Display the status of all sockets, including unconnected listener sockets, as follows:

% netstat -a
Example 1-3  Displaying Connected Sockets

The output of the netstat command shows extensive statistics. The following example shows how you would limit the output to IPv4 sockets only.

% netstat -f inet

TCP: IPv4
   Local Address        Remote Address    Swind Send-Q Rwind Recv-Q    State
-------------------- -------------------- ----- ------ ----- ------ -----------
system-1.ssh          remote.38474     128872      0 128872      0 ESTABLISHED
system2.40721         remote.ldap      49232       0 128872      0 ESTABLISHED