5

I have a process which I need to run on a specific port. I have started some other process on that port and I need to kill it.

Unfortunately, I don't remember the name/pid of the other process so I need a quick way to find which PID are associated with it.

I tried lsof -i :7080 but that returned nothing. I can telnet localhost 7080 so I know its running.

For reference I'm running RHEL5

3 Answers 3

12

Try:

netstat -nap | grep 7080
2
  • It might be better to use netstat -nap | grep :7080. Especially for lower ports it reduces the output a lot. Commented Sep 23, 2010 at 11:13
  • why does this produce an answer when lsof -i:7080 doesn't? OR does it? Commented Sep 24, 2010 at 22:21
3

In FreeBSD:

sockstat -4 

for IPV6

sockstat -6
0

As root, with ss installed:

ss -p -l '( sport = :7080 )'

You should also check the files in /etc/xinetd.d and the output of rpcinfo -p

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.