Learning of ipcs command
Inter-process communication and more commonly used techniques include
共享内存
,消息队列
,信号量
and so on.
ipcs
The purpose of the command is mainly used to report the status of the inter-process communication facility.
①View help:
ipcs -help
②View all resources (facilities):
ipcs -a
oripcs
③The three types of resources are viewed separately:
View Message Queueipcs -q
separatelyipcs -m
: View Shared Memory Segments separately :
View Semaphore Arrays separately:ipcs -s
④ resource options and output options can be
搭配
used to-c
display the creator and owner of an example:ipcs -c
andipcs -s -c
options-t
,-p
,-l
,-u
,-b
empathy.
⑤ options
-i
used bysemid
orshmid
for more information print resources:ipcs -s -i 9
,ipcs -m -i 9
⑥Column description:
键
Shared memory is the key;
shmid
is the number of shared memory;
semid
is the number of semaphore arrays;
nsems
corresponding to the semaphore semaphore number of focus
pid
is the process ip, canps -ef | grep pid
view details
semnum
semaphore number
ncount
is the number of processes waiting for this signal
拥有者
is to create Its user (owner);
权限
that is, perms;
字节
is the size bytes created;
连接数
nattach
状态
is the number of processes connected to the shared memory; is the status of the shared memory.
Expand
Show what are contained in the ipcs semaphore set
进程