1748092 Members
5248 Online
108758 Solutions
New Discussion юеВ

Re: release the port

 
SOLVED
Go to solution
haeman
Frequent Advisor

release the port

I have a system port ( port no. 5000 ) is locked by application ( but i don't know which application is locking it ), can advise if I want release the port , what can i do ? or how can I check which application / PID is locking it ? thx

netstat -na |grep 5000
5 REPLIES 5
Jaime Bolanos Rojas.
Honored Contributor
Solution

Re: release the port

Haeman,

Perhaps you could use the lsof tool if you have it or you could use this command to get more information on it netstat -a | grep Port_number

Regards,

Jaime.
Work hard when the need comes out.
haeman
Frequent Advisor

Re: release the port

the netstat can't show the pid , how can i know the pid ? thx
Matti_Kurkela
Honored Contributor

Re: release the port

The lsof utility would be a great thing to have here.

If it's a TCP port, running "lsof -i tcp:5000" would tell you the PID of the process holding it. If it's a UDP port, "lsof -i udp:5000" would do the same thing.

MK
MK

Re: release the port

Hi

Have you tried /usr/local/bin/lsof ???

- Vivek
haeman
Frequent Advisor

Re: release the port

yes , it works , thx.