If you have lsof installed, you can easily check which process is using which port, e.g.

 lsof -i tcp:8000

However, if lsof isn't installed for whatever reason, here's an alternative menthod. The following will display network ports in use by process

 for p in `ls /proc`; do pfiles $p; done | egrep '^[0-9]+|sockname' | more

Recent Changes