GNU and UNIX Commands: Find Out Which Ports a Program is Listening on

This is easiest done with lsof. On Solaris you can use pfiles, and you may also find netstat -anlp on Linux useful.

First, find the PID of the process you’re interested in

Then, run lsof against the PID

Port 1589/UDP, that’s the information we wanted.