ipcs [–mqsS] [–a b c o p t w x y M B]
ipcs writes to the standard output information for active interprocess communication facilities. If you do not specify any flags, ipcs writes information in a short form about currently active message queues, shared memory segments, and semaphores.
The column headings and the meaning of the columns in an ipcs command listing are listed in Table 1. . The letters in parentheses indicate the command flags that cause the corresponding heading to appear. (all) means that the heading is always displayed. These flags determine what information is provided for each facility. They do not determine which facilities are listed.
Column heading | Meaning of the column |
---|---|
T (all except y) | The type of facility:
|
ID (all except x,w,y,S,B) | The identifier for the facility entry |
KEY (all except y,S,B) | The key used as a parameter to the msgget subroutine, the semget subroutine, or the shmget subroutine to make the facility entry. (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 it.) |
MODE (all except x,w,y,S,B) | 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 permissions are indicated
as follows:
|
OWNER (all, except S,B) | The login name or user ID of the owner of the facility entry. |
GROUP (all) | The name or group ID of the group that owns the facility entry. |
CREATOR (a,c) | The login name or user ID of the creator of the facility entry. |
CGROUP (a,c) | The group name or group ID of the creator of the facility entry. |
CBYTES (a,x,o) | The number of bytes in messages currently outstanding on the associated message queue. |
INFO (x) | Provides additional extended state information. Under this
field will be returned one or more of the following codes (codes are
not mutually exclusive unless noted): For shared memory output:
For semaphore output:
For message queue output:
|
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 (p) | The ID of the last process that sent a message to the associated queue. |
LRPID (p) | The ID of the last process that received a message from the associated queue. |
STIME (a,t) | The time when the last message was sent to the associated queue. |
RTIME (a,t) | The time when the last message was received from the associated queue. |
CTIME (a,t) | The time when the associated entry was created or changed. |
NATTCH (a,o) | The number of processes attached to the associated shared memory segment. |
SEGSZPG (a,b,x) | The size in pages of the associated shared memory segment. |
PGSZ (a,b,x) | The page size of the associated shared memory segment. |
SEGSZ (a,b,x) | The size in bytes of the associated shared memory segment. |
CPID (p) | The process ID of the creator of the shared memory entry. |
LPID (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. |
RCVWAIT (x) | A count of msgrcv() waiters. |
SNDWAIT (x) | A count of msgsnd() waiters. |
MSGQPID (w) | For the message Q report, up to 10 lines of data will be shown under this heading. |
MSGQTYPE (w) | For the message Q report, up to 10 lines of data will be shown under this heading. |
RCVPID (w) | The process ID of a msgrcv() waiter. A maximum of 10 process IDs can be written. |
RCVTYP (w) | The message type of a msgrcv() waiter associated with RCVPID. A maximum of 10 message type will be written. If the caller does not have read access, this field is not displayed. |
SNDPID (w) | The process ID of a msgsnd() waiter. A maximum of 10 process IDs can be written |
SNDLEN (w) | The message send length of a msgsnd() waiter associated with SNDPID. A maximum of 10 message send lengths can be written. |
TERMA (x) | The number of times sem_val was changed during termination for semaphore adjustments. |
CNADJ (x) | The current number of processes with semaphore adjustments. |
SNCNT (x) | The number of waiters waiting for a sem_val greater than zero. |
SZCNT (x) | The number of waiters waiting for a sem_val equal to zero. |
WTRPID (w) | The process IDs of a semop waiter. A maximum of 10 semop waiters are written. |
WTRNM (w) | The semaphore number associated with WTRPID. A maximum of 10 semaphore numbers are written. |
WTROP (w) | The semaphore operation value associated with WTRNM and WTRPID. A maximum of 10 semaphore operation values are written. |
AJPID (w) | The process ID of a process with semaphore adjustments. A maximum of 10 process IDs are written. |
AJNUM (w) | The semaphore number of the semaphore adjustment associated with AJPID. A maximum of 10 semaphore numbers are written. |
AJPID (w) | The process ID of a process with semaphore adjustments. A maximum of 10 process IDs are written. |
AJNUM (w) | The semaphore number of the semaphore adjustments associated with AJPID. A maximum of 10 semaphore numbers are written. |
AJVAL (w) | The semaphore adjustment value associated with AJNUM and AJPID. A maximum of 10 semaphore adjustment values are written. |
ATPID (x) | The process ID of a process that is attached to this shared memory segment. A maximum of 10 process IDs are written. |
ATADDR (x) | The shared memory address where the process ATPID is attached to this segment. A maximum of 10 addresses are written. |
MNIDS (y) | The system limit for maximum number of message queues, semaphores, or shared memory IDs. |
HWIDS (y) | The most message queues, semaphores, or shared memory IDs created. |
CIDSA (y) | The current number of message queues, semaphores, or shared memory IDs available. |
CPRIV (y) | The current number of message queues, semaphores, or shared memory IDs created with IPC_PRIVATE |
CKEY (y) | The current number of message queues, semaphores, or shared memory IDs created with a key. |
GETEX (y) | The number of times msgget, semget, or shmget exceeded the maximum number of IDs MNID. |
MAXQB (y) | The system limit for maximum number of bytes on a message queue. |
QMNUM (y) | The system limit for maximum number messages on a message queue. |
ENOMEM (y) | The number of times msgsnd() calls returned ENOMEM. |
MNSEMS (y) | The system limit for maximum number of semaphores per set. |
MNOPS (y) | The system limit for maximum number of operations per semop. |
CSBYTES (y) | The current number of bytes used by the system for semaphores. |
TPAGES (y) | The system limit for number of system-wide shared memory pages |
SPAGES (y) | The system limit for number of pages per shared memory segment. |
SEGPR (y) | The system limit for number of segments per process. |
CPAGES (y) | The current number of system-wide shared memory pages |
MAXSEG (y) | The largest number of shared memory pages allocated to a single shared memory segment. |
CREATEPID (S,B) | The creator PID of the map memory area. It is an unique identifier of the map area. |
USERPID (S,B) | The user PID of the map memory area, which is currently using it. |
USER (S,B) | The user name of the user of the map memory segments entry. |
SHUTDOWN (S,B) | This field indicates that for this particular map memory object, shutdown flag has been marked for freeing of this area. While blocks can be freed in this area, the map memory object is not freed until the last process using it terminates. |
BLKSIZE (B) | The block size of the map area object in megabytes. |
BLKSINUSE (B) | The number of blocks is in use in the map memory area object. |
BLKSINMAP (B) | The number of blocks in this map area object. |
BLKSMAPPED (B) | The number of blocks mapped by this process. |
SECLABEL (M) | The multilevel security label associated with Message queues, Semaphores, and Shared Memory. |
If –q, –m, –s, or –S are specified, only information about those facilities is written. If none of these four are specified, information about message queues, shared memory segments and semaphores are written subject to the following options. __Map memory information will not written unless the –S is specified.
Fields | ||||
---|---|---|---|---|
AJNUM | KEY | RCVPID | T | |
AJPID | MSGQPID | RCVTYP | WTRNM | |
AJVAL | MSGQTYP | SNDLEN | WTROP | |
GROUP | OWNER | SNDPID | WTRPID |
Fields | ||||
---|---|---|---|---|
ATADDR | KEY | SEGSZ | T | |
ATPID | OWNER | SEGSZPG | TERMA | |
CNADJ | PGSZ | SNCNT | ||
GROUP | QCBYTES | SNDWAIT | ||
INFO | RCVWAIT | SZCNT |
Fields | ||||
---|---|---|---|---|
CIDSA | ENOMEM | MAXSEG | SPAGES | |
CKEY | GETEX | MNIDS | TPAGES | |
CPAGES | HWIDS | MNOPS | ||
CPRIV | QMNUM | MNSEMS | ||
CSBYTES | MAXQB | SEGPR |
IPC status as of Wed Apr 6 14:56:22 EDT 1994
Message Queues:
T ID KEY MODE OWNER GROUP
q 1234567890 0x4107001c -Rrw-rw---- root printq
Shared Memory:
T ID KEY MODE OWNER GROUP
m 0 0x0d07021e --rw------- root system
m 1 0x0d08c984 --rw-rw-rw- root system
Semaphores:
T ID KEY MODE OWNER GROUP
s 4096 0x0108c86e --ra------- root system
s 1 0x6208c8ef --ra-r--r-- root system
s 2 0x4d0b00a6 --ra-ra---- root system
s 24579 0x00bc614e --ra-ra-ra- xlin vendor
s 176132 0x00000058 --ra-ra-ra- xlin vendor
IPC status as of Wed Oct 6 14:56:22 EDT 2002
Map Memory Service:
T CREATEPID USERPID USER GROUP SHUTDOWN
S 1096 165 root system Y
S 4 114 John system Y
S 6 324 John system N
S 1052 111 Andrew vendor N
S 96 678 xlin vendor Y
ipcrm