View Shared Memory
[App_usr@js2test01 shell]$ IPCS
------Shared Memory Segments--------
Key shmid owner perms bytes nattch Status
0X0122F9DF 12419074 app_usr 666 70604918 0
0x0001b3ef 14450693 app_usr 666 70604278 0
0x0003d09a 14385158 app_usr 666 67732 1
Meaning of each field:
The first column is the shared memory key;
The second column is the number of shared memory shmid;
The third column is the user owner of the creation;
The fourth column is the permission perms;
Column v is the size bytes created;
Column VI is the number of processes connected to shared memory Nattach;
The seventh column is the state status of shared memory. "Dest" indicates that the shared memory segment has been deleted, but there are also users using it, and "Dest" is displayed when the Mode field for that segment of memory is set to Shm_dest. When a user invokes Shmctl's ipc_rmid, memory first looks at how many processes are associated with this memory, and if the number of associations is 0, the shared memory is destroyed, and no one sets the MoD mode of this memory to be shm_dest, if all processes do not need to delete the shared memory.
Remove shared memory
Direct use of #ipcrm-m shmid may not be directly deleted and there are shared memory used by processes. At this point you can use PS-EF to view the process, kill the excess process, and then use IPCS view.