lsof -n -i4TCP:$PORT | grep LISTEN
Ref: stackoverflow: Who is listening on a given TCP port on Mac OS X?