Ipcs-provide Information on IPC facilities
DESCRIPTION IPCS provides information on the IPC facilities for which, the calling process has read access. The-i option allows a specific resource ID to be specified. Only information on the this ID would be printed. Resources may specified as follows: -M shared memory segments -Q message queues -S semaphore arrays -A All (this is the default) The output format may be specified as follows: -T time -P PID 650) this.width=650; "alt=" Picture "src=" http://r.photo.store.qq.com/psb?/V11qXNRe1rKw0v/NkArGXu4DfIy9rPVp97p1ZA992Tz. *7mtcopvyq468i!/o/dlaaaaaaaaaa&ek=1&kp=1&pt=0&bo=agouaaidrgadacu!&su=1167030577&tm= 1481493600&sce=0-12-12&rf=2-9 "style=" margin:0px;padding:0px;border-width:0px;border-style:none; vertical-align:top;width:770px;height:174px; "/> Note: The information listed in the key column is the application-defined key value, if the key value of the private object is 0, where we define the key value is 12345678, that is, the output of the 0X00BC614E (hex) The ID of the shared memory is listed in the Shmid column, and this value is unique. The Owner column lists the user who created the shared memory as root. The permissions for shared memory are listed in the perms column. The size of this shared memory is listed in the bytes column, and we get the shared memory size of 4,096 bytes to be created by calling sysconf (_sc_page_size). The number of processes connected to the associated shared memory segment is listed in the Nattch column. The Status column lists the state of the current shared memory and displays the word "dest" when the Shm_dest bit is set in the Mode field of the memory. When a user calls Shmctl's ipc_rmid, the kernel first looks at how many processes are associated with the memory, and if the number of associations is 0, the memory is destroyed (freed), otherwise the mode bit of the memory is Shm_dest, and set its key to Ipc_private, which means that the associated process can still legitimately access this memory, but it can no longer be associated with a new process. In the above output, we do not see SMEM use of shared memory dest State, and at this time we use ipcrm-m 18874397 to manually delete the segment of shared memory, The shared memory key value for this segment will be 0x00000000 (ipc_private), and the shared memory will actually disappear when the program releases the shared memory by calling SHMDT. |