Operating System - Linux
1825803 Members
2616 Online
109687 Solutions
New Discussion

Re: unable to kill shared memory

 
Binu_5
Regular Advisor

unable to kill shared memory

Hi all

I have some problem with removing shared memmory
if I use ipscs the output looks like
ey shmid owner perms bytes nattch status
0x00000000 17760256 naveens 666 33562624 1 dest

if I give ipcrm -s 17760256

it stil does'nt remove shared memmory

Please help

Binu
7 REPLIES 7
Gopi Sekar
Honored Contributor

Re: unable to kill shared memory


you are using invalid key for removing shared memory.

to remove shared memory use 'ipcrm -m 17760256'

-s is for removing semaphore

Hope this helps,
Gopi
Never Never Never Giveup
Binu_5
Regular Advisor

Re: unable to kill shared memory

Hi Gopi

I have tried with -m too but the problem
still persist ...Is there any other option other than reboot

Thanks
Binu
Gopi Sekar
Honored Contributor

Re: unable to kill shared memory

from man page of ipcrm
-m shmid
removes the shared memory segment identified by shmid after the last detach is performed.


from the output of your ipcs, it looks like there is still one more process which is attached to that shared memory. find out that process and kill it. then u should be able to remove it using ipcrm -m

use this command to find out who is using that shared memory

ipcs -m -p

it will give you shared memory id, pid of creator and last accessed pid. check the pid owner and kill him if not required.

then you should be able to do ipcrm.

Hope this helps,
Gopi
Never Never Never Giveup
Binu_5
Regular Advisor

Re: unable to kill shared memory

Hi Sekar

Thanks for the info ..Then how can I kill
all the procees initited by a particular user ...

Thanks
Binu
Gopi Sekar
Honored Contributor

Re: unable to kill shared memory


you can use either killall or pkill

pkill has option to kill all the process running on a particular user id.


Hope this helps,
Gopi
Never Never Never Giveup
Steven E. Protter
Exalted Contributor

Re: unable to kill shared memory

If you can kill it, boot it.

Some shared memory problems can't be fixed.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ross Minkov
Esteemed Contributor

Re: unable to kill shared memory

reboot

;-)