On a Solaris 8 server, how do I find out what process is listening on a given port? The Windows implementation of 'netstat' offers the -o and -b switches, which show the owning process ID and name respectively. Is there an equivalent under Solaris?
On a Solaris 8 server, how do I find out what process is listening on a given port? The Windows implementation of 'netstat' offers the -o and -b switches, which show the owning process ID and name respectively. Is there an equivalent under Solaris?
lsof -i
Doesn't come installed by default, but you can get Solaris version from http://www.sunfreeware.com/
If you don't want to or can't install lsof, you can also try the command
pfiles
. It prints out all the sockets open by a given process. If you had no other choice, you could iterate over all the PIDs and find the one listening to, say, port 25: