Operating System - HP-UX
1837205 Members
2327 Online
110115 Solutions
New Discussion

kill the dead process which hold the service port

 
ust3
Regular Advisor

kill the dead process which hold the service port


In my database , we open port no. 5012 for remote connection , however , sometimes they hv many dead connection , so that it always full in connection ( as I only release 10 connection at the same time) , can advise , if I want to terminate the connction that over 15 minutes , what can i do ? is there any script may do that ? thx

/bin/netstat -na |grep 5012
tcp 0 0 0.0.0.0:5012 0.0.0.0:* LISTEN


p.s. the above netstat result found that port 5012 is in listen mode , it is in normal situation , but sometimes some dead process is still in "established" , so I would like to terminate this kind of dead process.

thx in advance.
2 REPLIES 2
BUPA IS
Respected Contributor

Re: kill the dead process which hold the service port

Hello,
To find out which process has a port open you can use lsof with the -i option . e.g. lsof -i :5012

You will then need to analyse the results before killing things in case they are genuinely in use .

You can down load hp binaries from the HP porting and archiving centre if you do not have it .
http://hpux.connect.org.uk/
Mike






Help is out there always!!!!!
ust3
Regular Advisor

Re: kill the dead process which hold the service port

thx reply,

You will then need to analyse the results before killing things in case they are genuinely in use .

You can down load hp binaries from the HP porting and archiving centre if you do not have it .

Yes , I know -i may check the process ,

".. to analyse the results .." --> except use other tools , can I use any script to analyse and kill it ?

thx