cancel
Showing results for 
Search instead for 
Did you mean: 

ipcrm query

 
kpatel786
Frequent Advisor

ipcrm query

(hqs) [SU] # ipcs|grep 0x0000000
m 125763594 0x00000000 --rw-r----- oracle dba
m 294923 0x00000000 --rw-r----- oracle dba
m 294924 0x00000000 --rw-r----- oracle dba
m 3866640 0x00000000 --rw------- root root
m 61472785 0x00000000 --rw------- root root
s 1573 0x00000000 --ra------- root root
s 1318 0x00000000 --ra------- root root

I have below queries:

1) Can I do ipcrm on the above process.
2) Will there be any issue if they are attached to any other process.
3) Will these release memory,cpu after they are killed.

Thanking you in advance.
6 REPLIES
mvpel
Trusted Contributor

Re: ipcrm query

If you run "ipcs -ma" you'll get a few additional columns, including the CPID and LPID of the memory segments in question.

The CPID is the creator of the segment, and the LPID is the last process to attach to the segment. A segment can be deleted and zero-size, but still attached. If you persuade the attached process to detach, by killing it or some other method, then you'd be able to remove the memory segment - or it would disappear once the last detach is complete.
mvpel
Trusted Contributor

Re: ipcrm query

Almost forgot - the ipcs -ma will also show you the SEGSZ column which will indicate how much memory will be released upon remove/detach. For removed but not yet detached segments (with attached processes still running) this will be zero.
kpatel786
Frequent Advisor

Re: ipcrm query

(hqs) [SU] # ipcs -ma |grep 0x0000000
m 125763594 0x00000000 --rw-r----- oracle dba oracle dba 43 1073741824 14590 3688 16:13:15 16:13:15 23:14:57
m 294923 0x00000000 --rw-r----- oracle dba oracle dba 43 1073741824 14590 3688 16:13:15 16:13:15 23:14:57
m 294924 0x00000000 --rw-r----- oracle dba oracle dba 43 1073741824 14590 3688 16:13:15 16:13:15 23:14:57
m 3866640 0x00000000 --rw------- root root root root 2 159804 15083 15112 16:10:43 no-entry 16:10:43
m 61472785 0x00000000 --rw------- root root root root 2 159804 5557 5633 12:38:47 no-entry 12:38:47


Above is the output. Could you please confirm if the same can be deleted.
mvpel
Trusted Contributor

Re: ipcrm query

That output indicates that the Oracle segments each have 43 processes attached to them, and they're each one gigabyte in size. I assume this is probably fairly normal for an Oracle database.

They were all created by pid 14590, and last attached by 3688, which are undoubtedly Oracle database service processes.

If your Oracle database is online, which is likely to be the case considering that there's 43 processes attached to each segment, then no, you won't be able to delete the segments without damaging the operation of the Oracle database - it'd probably crash pretty hard, knowing Oracle.

The root shared memory segments are only 156k in size, and are a normal part of the system operation - perhaps network buffers or the like? Those shouldn't be deleted either.
kpatel786
Frequent Advisor

Re: ipcrm query

Thanks for explaining in detail.
kpatel786
Frequent Advisor

Re: ipcrm query

Thanks all