The ipcs(1) utility presents status information about
active interprocess communication (IPC) objects, specifically
message queues, shared memory segments, and semaphores.
Without any options, ipcs(1) presents terse information
about all active IPC objects on the system (of these types; other
Windows IPC mechanisms are not summarized). To present information
about only memory segments, message queues, or only semaphore sets,
use the options -m, -q, or -s, respectively.
Other options specify the information displayed.
Use all other information options (identical to
-bcopt).
-b
Display information about maximum allowable size.
For shared memory, this is the maximum allowable size of each
segment.
For message queues, this is the maximum number of bytes on each
queue for messages.
For semaphores, this is the number of semaphores in each
set.
-c
Display creator's user name and group name.
-m
Display information about shared memory segments only. Can be
combined with -q or -s.
-o
Display information on outstanding usage.
For shared memory, this is the number of processes attached to
shared memory segments.
For messages queues, this is the number of messages on queue
and the total number of bytes in messages on queue.
-p
Display process number information.
For shared memory, this is the process identifier (PID) of the
last process to attach or detach on shared memory segments and the
PID of the creating process, or the PID of the process that created
it if no process has yet attached.
For message queues, this is the PID of the last process to send
a message and the PID of the last process to receive a message on
message queues.
-q
Display information about message queues only. (Can be combined
with -m or -s).
-s
Display information about semaphore sets only. (Can be combined
with -m or -q).
-t
Display time information. This is the time of the last control
operation that changed access permissions, and:
For shared memory segments, this is the time of the last
shmat(3) and shmdt(3) operations and
the time the segment was created or last modified.
For message queues, this is the time of the last msgsnd(3)
and msgrcv(3) operations and the time the queue was
created or last modified.
For semaphore sets, this is the time of the last semop(3)
operation and the time that the semaphore set was created or last
modified.
For each IPC object, a permissions or mode string
is displayed, similar to the output of ls -l, and consisting
of eleven characters. The first character indicates the current
state of the object; the second and third letters indicate
information specific to the IPC object. The last nine letters
indicate the permissions on the object, where r is read
permission, w is write permission, and a is
permission to alter the object.
The first letter is one of the following:
-
The object exists in its normal state.
C
The object is being created.
D
The object is being deleted.
Z
The object is zombied. Although all objects go through this
state, it is normally only seen with shared memory segments; other
objects are reaped immediately. A shared memory segment is a zombie
if it has been marked for deletion but still has outstanding
references. These references prevent the segment from being reaped;
it cannot be removed until all mappings have been unmapped. Since
it has been marked for deletion, no new connections are possible.
It is possible for a call to shmget() to create a new memory
segment using the same key that created the zombied segment.
The meanings of the second and third characters depend upon the
IPC object:
Message queues
The second character is R if any process is blocked
waiting to receive a message, or - otherwise.
The third character is S if any process is blocked
waiting to send a message, or - otherwise.
Semaphore sets
The second letter is N if the process is blocked waiting
for a semaphore value in the set to rise to a threshold (that is,
waiting for the other process to release resources), or -
otherwise.
The third character is Z if the process is blocked
waiting for a semaphore value in the set to drop to zero, or
- otherwise.
Shared memory segments
The second letter is R if any process is attached to the
segment read-only, and - otherwise.
The third letter is W if any process is attached to the
segment read-write, and - otherwise.