wikipedia

Support Wikipedia

Wednesday, February 24, 2010

Finding process/program using a port

Many a times you would get a "Bind Exception", "Address already in use" kind of errors and need to find the process that's using the port. For example say the port is 8080. The following command will get you the pid and program name as well.

netstat -nlept | grep "8080"

The result might look something like this...

Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name
tcp6   0           0          :::8080                        :::*                              LISTEN      1000       994652    4024/java  
Where 4024 is the pid and it's a java app.

Tuesday, February 2, 2010

Upgraded process manager for Linux

Check this out htop which is a more interactive and intuitive upgrade of the good old 'top' has many pluses to it like Color themes, mouse enabled and so on.