Thursday, October 22, 2009

How to find process IDs listening to port xxx

If you need to figure out which process ids are listening to a given port by id, and netstat isn't working for you, this will work:

lsof -i :80 | awk '{print $2}'|grep -e [0-9]

No comments: