Find out which process is listening on a port
by jcf. Average Reading Time: less than a minute.
If you need to find out which process is listening on a certain port, use the following:
Linux netstat -natp | grep :80
Solaris lsof -i | grep :80
On Solaris, you need to have compiled lsof that you can get from Sunfreeware.com

The other way in Linux:
agua:~# fuser -n tcp 80
80/tcp: 4762 9625 15859 15860 15861 15862 15863 30151 30152
in solaris
svr1:~# pfiles pid
svr1:~# pfiles pid | grep port