[pilot@linuxpilot ~]$ ps -alx | grep oven 0 1004 3740 1 20 0 11592 8828 - S ? 3:05 ovend -M 0 1004 3927 1 20 0 4008 2280 - S ? 0:28 ovene -M 0 1004 15963 1 20 0 11600 8724 - S ? 2:41 ovendHere we see an ovend and ovene background process talking to the meter-cube along with an ovend process talking to the main oven.
[pilot@linuxpilot ~]$ ipcs ------ Message Queues -------- key msqid owner perms used-bytes messages ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x00000000 163842 pilot 600 524288 2 dest 0x00000000 163843 pilot 600 4194304 2 dest 0x00000100 163867 pilot 644 263748 1 0x00000110 98333 pilot 644 263748 2 0x00000000 163874 pilot 600 524288 2 dest 0x00000000 131107 pilot 600 524288 2 dest 0x00000101 163876 pilot 644 263748 0 0x00000102 163877 pilot 644 263748 0 0x00000000 163878 pilot 600 524288 2 dest 0x00000000 131111 pilot 600 524288 2 dest 0x00000000 131118 pilot 600 16777216 2 dest 0x00000000 131124 pilot 600 524288 2 dest 0x00000000 131126 pilot 600 393216 2 dest 0x00000000 131131 pilot 600 393216 2 dest 0x00000000 131132 pilot 600 524288 2 dest ------ Semaphore Arrays -------- key semid owner perms nsemsWe are interested only in the shared memory segments. There are a bunch we don't care about. These are used by linux for things that don't matter to us. The trick is knowing which of these are relevant to the oven. At the present time, the thing to note is that the "key" value is non-zero for all of the oven segments. (These also have a size of 263748 bytes, which is unlikely to change, but not an easy number to remember.
We can let grep filter out all these entries with zero keys as follows:
ipcs | grep -v 0x00000000 ------ Message Queues -------- key msqid owner perms used-bytes messages ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x00000100 163867 pilot 644 263748 1 0x00000110 98333 pilot 644 263748 2 0x00000101 163876 pilot 644 263748 0 0x00000102 163877 pilot 644 263748 0 ------ Semaphore Arrays -------- key semid owner perms nsemsThe segment with the key "110" is for the meter-cube. The three segments with the keys "100", "101" and "102" are for the main oven.
To delete a shared memory segment by hand, use the shmid in the following command.
This command would delete the segment for the meter-cube in the above example:
ipcrm -m 98333
So there are only 4 cases that should ever be seen in our current world: