How to list all outbound sockets given a PID?

I used netstat -tp <pid> to list all Foreign Addresses i.e OutBound sockets on Linux.

Likewise, i wish to list all Foreign Addresses on Sparc Solaris.

I get illegal option -- t when i try this command on Solaris.

The second query i have is that in the output of netstat command some foreign address shows string instead of numeric port number as shown in bold & red below output. Can you please tell me what & why is that so ?

After consulting

man netstat

I have found that

netstat -n -f inet -f inet6

in Solaris comes close to the Linux

netstat -n -t

Solaris does not have anything that corresponds to the -p (show associated pids) in Linux.

1 Like