By Alvin Alexander. Last updated: June 6, 2016
To see what’s running on a Mac OS X port, use this lsof
command:
$ sudo lsof -i :5150
This command shows what’s running on port 5150. Just change that to whatever port you want to see.
You can also use this command and then weed through the output:
$ sudo lsof -i -P
I found the first command at the link shown.