November 30, 2015

Netstat equivalent in solaris 5.10

We had a situation where a port was being occupied by a process at OS level and we found out the hard way that netstat was not similar other unix based OS.

How we discovered which process was occupying the port:

pfiles /proc/* 2>/dev/null | nawk '
/^[0-9]*:/ { pid=$0 }
/port: 3600$/ { printf("%s %s\n",pid,$0);}