Have you ever tried to start a server like MySQL and been amazed to see an error that the port is already in use? You rack your brain and try to figure out what it would be to no avail. Sometimes you do a “ps” in Linux and don’t even see anything that you think would be using the port. Well, forutantely, there are some tricks to help you find out without doing a reboot. If it is a production server, a reboot may not be an option anyway!
Below are some methods to help. We will start by looking at the “fuser” utility provided with many Linux distros:
fuser -n tcp 80 80/tcp: 1029 1030 1824 1838 1839 1840 1841 13972 14136 14137 14712
This example shows a simple check of everything using port 80. What you see above is a list of PIDs that are using that port. Now we could probably just do a simple “ps” to figure out what it is. You might also want to get more info by doing something like the …
[Read more]