Saturday, 10 August 2013

How do I find out which process is using a port on Solaris?

With great difficulty.

It is possible, but sadly Solaris does not know about "netstat -anp" or "lsof".

Instead you have to use the "pfiles" command on every running process and keep looking until you strike gold. For example:

# for pid in `ls proc`
> do
> echo $pid
> pfiles $pid | grep PORTNUMBER
> done

As so often with Solaris, you will need "root" privileges for this to work.

No comments:

Post a Comment