Interprocess Communication Status

I recently was dealing with a perl process that creates shared memory for interprocess communication.  Starting the script it failed but had created the shared memory.

To view the shared memory:

 ipcs

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000000 3047426    username    600        256        0

------ Semaphore Arrays --------
key        semid      owner      perms      nsems

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages

To delete it, use the ipcrm command to remove the shared memory with the shared memory id.

ipcrm -m 3047426

Now the shared memory is gone, YEAH!

ipcs

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status

------ Semaphore Arrays --------
key        semid      owner      perms      nsems

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages

Leave a comment