Re: release the port (26 Views)
Reply
Frequent Advisor
haeman
Posts: 116
Registered: ‎01-17-2008
Message 1 of 6 (26 Views)
Accepted Solution

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
Please use plain text.
Honored Contributor
Jaime Bolanos Rojas.
Posts: 1,168
Registered: ‎08-05-2005
Message 2 of 6 (26 Views)

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.
Please use plain text.
Frequent Advisor
haeman
Posts: 116
Registered: ‎01-17-2008
Message 3 of 6 (26 Views)

Re: release the port

the netstat can't show the pid , how can i know the pid ? thx
Please use plain text.
Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 4 of 6 (26 Views)

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
Please use plain text.
Advisor
Vivekanandan Somanathan
Posts: 22
Registered: ‎11-18-2004
Message 5 of 6 (26 Views)

Re: release the port

Hi

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

- Vivek
Please use plain text.
Frequent Advisor
haeman
Posts: 116
Registered: ‎01-17-2008
Message 6 of 6 (26 Views)

Re: release the port

yes , it works , thx.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation