Reports interprocess communication facility status.
ipcs [ -m] [ -q] [ -s] [ -S] [ -P] [ -1] [ -a | -b -c -o -p -r -t] [ -T] [ -C CoreFile] [ -N Kernel ] [ -X ] [ -@ [ WparName ] ]
The ipcs command writes to the standard output information about active interprocess communication facilities. If you do not specify any flags, the ipcs command writes information in a short form about currently active message queues, shared memory segments, semaphores, remote queues, and local queue headers.
The column headings and the meaning of the columns in an ipcs command listing follow. The letters in parentheses indicate the flags that cause the corresponding heading to appear. The designator all means the heading is always displayed. These flags only determine what information is provided for each facility. They do not determine which facilities are listed.
Item | Description |
---|---|
T | (all) the type of facility. There are three facility
types:
|
ID | (all) the identifier for the facility entry. |
KEY | (all) the key used as a parameter to the msgget subroutine,
the semget subroutine, or the shmget subroutine to make
the facility entry. Note: The key of a shared memory segment is changed to IPC_PRIVATE when the segment is removed until all processes attached to the segment detach from it. |
MODE | (all) the facility access modes and flags. The mode
consists of 11 characters that are interpreted as follows: The first two characters can be the following:
The next nine characters are interpreted as three sets of 3 bits each. The first set refers to the owner's permissions; the next to permissions of others in the user group of the facility entry; and the last to all others. Within each set, the first character indicates permission to read, the second character indicates permission to write or alter the facility entry, and the last character is currently unused. The permissions are indicated as follows:
|
OWNER | (all) The login name of the owner of the facility entry. |
GROUP | (all) The name of the group that owns the facility entry. |
CREATOR | (a,c) The login name of the creator of the facility entry. |
CGROUP | (a,c) The group name of the creator of the
facility entry. Note: For the OWNER, GROUP, CREATOR, and CGROUP, the user and group IDs display instead of the login names. |
CBYTES | (a,o) The number of bytes in messages currently outstanding on the associated message queue. |
QNUM | (a,o) The number of messages currently outstanding on the associated message queue. |
QBYTES | (a,b) The maximum number of bytes allowed in messages outstanding on the associated message queue. |
LSPID | (a,p) The ID of the last process that sent a message to the associated queue. If the last message sent was from a process in a node other than the node that holds the queue, LSPID is the PID of the kernel process that actually placed the message on the queue, not the PID of the sending process. |
LRPID | (a,p) The ID of the last process that received a message from the associated queue. If the last message received was from a process in a node other than the node that holds the queue, LRPID is the PID of the kernel process that actually received the message on the queue, not the PID of the receiving process. |
STIME | (a,t) The time when the last message was sent to the associated queue. For remote queues, this is the server time. No attempt is made to compensate for time-zone differences between the local clock and the server clock. |
RTIME | (a,t) The time when the last message was received from the associated queue. For remote queues, this is the server time. No attempt is made to compensate for any time-zone differences between the local clock and the server clock. |
CTIME | (a,t) The time when the associated entry was created or changed. For remote queues, this is the server time. No attempt is made to compensate for any time-zone differences between the local clock and the server clock. |
NATTCH | (a,o) The number of processes attached to the associated shared memory segment. |
SEGSZ | (a,b) The size of the associated shared memory segment. |
CPID | (a,p) The process ID of the creator of the shared memory entry. |
LPID | (a,p) The process ID of the last process to attach or detach the shared memory segment. |
ATIME | (a,t) The time when the last attach was completed to the associated shared memory segment. |
DTIME | (a,t) The time the last detach was completed on the associated shared memory segment. |
NSEMS | (a,b) The number of semaphores in the set associated with the semaphore entry. |
OTIME | (a,t) The time the last semaphore operation was completed on the set associated with the semaphore entry. |
SID | (S) The shared memory segment id. SIDs can be used as input to the svmon -S command. |
This command supports multibyte character sets.
Item | Description |
---|---|
-a | Uses the -b, -c, -o, -p and -t flags. |
-b | Writes the maximum number of bytes in messages on queue for message queues, the size of segments for shared memory, and the number of semaphores in each semaphores set. |
-c | Writes the login name and group name of the user that made the facility. |
-CCoreFile | Uses the file specified by the CoreFile parameter in place of the /dev/mem file. The CoreFile parameter is a memory image file produced by the Ctrl-(left)Alt-Pad1 key sequence. |
-1 | When used with the -S flag, writes the list of SIDs unwrapped. |
-m | Writes information about active shared memory segments. |
-NKernel | Uses the specified Kernel (the /usr/lib/boot/unix file is the default). |
-o | Writes the following usage information:
|
-p | Writes process number information:
|
-P | Writes the list of SIDs (segment IDs) associated with the shared memory ID, along with the number of bytes pinned to that segment and an indication of whether the segment is large-page enabled or not. If the segment is large-page enabled, a 'Y' is displayed, otherwise a '-' is displayed. |
-q | Writes information about active message queues. |
-r | Writes information about real-time interprocess communication objects. |
-s | Writes information about active semaphore set. |
-S | Writes the list of SID attached to shared memory id. |
-t | Writes time information:
|
-T | Writes the output of the -t flag with the date. |
-X | Prints all available characters of each user name, group name of owner, creator, owner group, creator group instead of truncating to the first 8 characters. |
-@ [ WparName ] | Reports the interprocess-communication facility status for workload partitions. If WparName
is specified, the status of the interprocess communication facility
is displayed for that particular workload partition. If no WparName
is specified, the status of the interprocess communication facility
is displayed for all active workload partitions. The name
of the workload partition associated
with the object is displayed. Specify Global as the WparName to display IPC object information for just that operating system environment, excluding any IPC information for workload partitions hosted from that environment. |
Example output from entering ipcs without flags:
IPC status from /dev/mem as of Mon Aug 14 15:03:46 1989
T ID KEY MODE OWNER GROUP
Message Queues:
q 0 0x00010381 -Rrw-rw-rw- root system
q 65537 0x00010307 -Rrw-rw-rw- root system
q 65538 0x00010311 -Rrw-rw-rw- root system
q 65539 0x0001032f -Rrw-rw-rw- root system
q 65540 0x0001031b -Rrw-rw-rw- root system
q 65541 0x00010339--rw-rw-rw- root system
q 6 0x0002fe03 -Rrw-rw-rw- root system
Shared Memory:
m 65537 0x00000000 DCrw------- root system
m 720898 0x00010300 -Crw-rw-rw- root system
m 65539 0x00000000 DCrw------- root system
Semaphores:
s 131072 0x4d02086a --ra-ra---- root system
s 65537 0x00000000 --ra------- root system
s 1310722 0x000133d0 --ra------- 7003 30720
Item | Description |
---|---|
/usr/lib/boot/unix | Specifies the system kernel image. |
/dev/mem | Specifies memory. |
/etc/passwd | Specifies user names. |
/etc/group | Specifies group names. |
/usr/include/sys/ipc.h | Contains the header file. |