Find the pid of the running process if you don't know it:
$ ps ax | grep node
1012 ? Ssl 0:03 node /usr/bin/signalhub listen -p 8000In this case we're running a node program and it's pid is 1012
$ lsof -Pan -p 1012 -i
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 1012 ubuntu 10u IPv6 15437 0t0 TCP *:8000 (LISTEN)Ahh, this program is listening on port 8000 !