Operating System - HP-UX
1833814 Members
2066 Online
110063 Solutions
New Discussion

Re: Killing a process bound to a port

 
SOLVED
Go to solution

Killing a process bound to a port

I have an issue with one of our servers. I am trying to bring up an application that uses port 11000 and find that it is already up. The netstat -na gives me the output:
# netstat -na|grep 11000
udp 0 0 *.11000 *.*
I tried lsof but that did not identify what process was tied to 11000, I also did a reread of the inetd, using inetd -c to no avail. Except for killing inetd and restarting it, which might drop the databases (production)...is there another way to remove this port?
4 REPLIES 4
Marvin Strong
Honored Contributor

Re: Killing a process bound to a port

I think you can do it with ndd

not sure the exact syntax tho. I'll see if I can find it.

rick jones
Honored Contributor
Solution

Re: Killing a process bound to a port

Keep looking - make sure you had the right parms for lsof. Although I'm not quite sure what happens with zombie processes - I'm reasonably sure that by that time the FD's have been closed.

Inted would only be listening on that port if there was a corresponding entry in /etc/inetd.conf.

While there are ways one should almost NEVER use to forcibly terminate a TCP connection via ndd, there is no such thing for UDP.

If you suspect inetd has a socket open bound to that port, you migth see what lsof says inetd has open.
there is no rest for the wicked yet the virtuous have no pillows
RAC_1
Honored Contributor

Re: Killing a process bound to a port

lsof command line I use is
lsof -i udp:port_no.

Anil
There is no substitute to HARDWORK

Re: Killing a process bound to a port

Bang on....Right on target!
#lsof -i udp:11000

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
PA_R 12607 applmgr 34u inet 0x94280a68 0t0 UDP *:11000 (Idle)
Thanks guys!