Operating System - HP-UX
1754978 Members
3390 Online
108828 Solutions
New Discussion юеВ

How to release those resources that are held by dead process?

 
SOLVED
Go to solution
YLTan
Frequent Advisor

How to release those resources that are held by dead process?


I have numerous case where developers did something in their program which use up a lot of memory resources or system resources and unable to release it after the process is kill.
Each time I have to reboot the system to recover it, this affect other developers.

Is there a way to recover those system resources without rebooting the system?
tyl
3 REPLIES 3
S.K. Chan
Honored Contributor

Re: How to release those resources that are held by dead process?

This talk quite in length about "should I reboot server" vs "i should not need to reboot my server" which ties in to your question also. Hope it'll help ..

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4b3eec08252fd611abd50090277a778c,00.html


Steven Sim Kok Leong
Honored Contributor
Solution

Re: How to release those resources that are held by dead process?

Hi,

You will have to elaborate on the resources.

If network resources, use ndd with /dev/tcp tcp_discon and tcp_discon_by_addr, if you cannot terminate the connection.

If shared memory and semaphores, use ipcrm.

The first step would be to perform lsof and identify the resources (files, network connections, processes) being held. For shared memory and semaphores, use the ipcs command to check.

Hope this helps. Regards.

Steven Sim Kok Leong
Kenny Chau
Trusted Contributor

Re: How to release those resources that are held by dead process?

Maybe you can use ipcs to check what held the resources and use ipcrm to remove that.

Man ipcs and ipcrm for usage.

Hope this helps.
Kenny.
Kenny