Linux ipcs field meaning shared memory delete ipcs dest State __linux

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.