ipcs prints information about active inter-process communication facilities (IPC facilities).
You can specify options to control
the type of IPC facilities for which information is to be displayed
what information is to be shown.
Since the states of IPC facilities may change while ipcs is running, the displayed information is only current at the time of the request.
Syntax
ipcs [ option]... |
No option specified ipcs prints information in short format for
that are currently active in the system. The meanings of individual output columns are described in the section “Output”. option There are options for defining the type of IPC facility and options for defining the type of information. Defining the type of IPC facility
(message queues) Prints information about active message queues.
(memory) Prints information about active shared memory.
(semaphores) Prints information about active semaphores. If the -q, -m or -s option is set, only information about the corresponding IPC facility is shown. Any combination of these options is possible. If none of the options are specified, information on all types of IPC facilities will be displayed. Defining the type of informationThe following section describes the options that select the type of information to be provided for the IPC facilities specified by the -q, -m and -s options. See the “Output” for the meaning of the individual output columns.
(all) Sets all options that print various types of information. This is a shorthand notation for -b, -c, -o, -p and -t.
(all) Like option -a, but time information is printed with date and time (format yyyy-mm-yy_hh:mm:ss). This is a shorthand notation for -b, -c, -o, -p and -T.
(biggest) Prints the biggest allowable size for each respective IPC facility:
(creator) Prints the user ID (login name) and group name of the creator of the IPC facility.
(outstanding) Prints information on outstanding IPC facilities, including:
(process) Prints process number information, including:
(time) Prints time information. The time of the last control operation that changed the access permissions for all IPC facilities is displayed:
(time) Prints time information like option -t, but with date and time (format yyyy-mm-yy_hh:mm:ss). |
Output
The column headings and the meanings of the columns in an ipcs listing are given below. The letters in parentheses (...) indicate the options which cause the corresponding heading to appear. all means that the heading always appears. CBYTES (a,o) The number of bytes in messages currently outstanding on the associated message queue. CGROUP (a,c) The group name to which the creator of the IPC facility belongs. CREATOR (a,c) The user ID (login name) of the creator of the IPC facility entry. CTIME (a,t) The time when the associated entry was created or changed. GROUP (all) The group name of the group to which the owner of the IPC facility belongs. ID (all) The identifier for the IPC facility. KEY (all) The key used as an argument when creating the IPC facility with msgget() (create message queue) or semget() (create semaphore set). LRPID (a,p) The process ID of the last process to receive a message from the associated queue. LSPID (a,p) The process ID of the last process to send a message to the associated queue. MODE (all) The IPC facility access modes and status indicators. The mode consists of The first character is:
The second character is:
The next 9 characters are interpreted as three sets of three bits each:
Within each set, the first character indicates permission to read, the second character indicates permission to write or alter the IPC facility entry, and the last character is currently unused. The permissions are specified as follows:
NSEMS (a,b) The number of semaphores in the associated semaphore set. OTIME (a,t) The time the last semaphore operation was completed on the associated semaphore set. OWNER (all) The user ID (login name) of the owner of the IPC facility entry. QBYTES (a,b) The maximum number of bytes allowed in messages outstanding on the associated message queue. QNUM (a,o) The number of messages currently outstanding on the associated message queue. RTIME (a,t) The time the last message was received from the associated message queue. STIME (a,t) The time the last message was sent to the associated message queue. NATTCH (a,o) The number of processes attached to the shared memory segment involved. SEGSZ (a,b) The size of the shared memory segment involved. CPID (a,p) The process ID of the process that created the shared memory segment. LPID (a,p) The process ID of the last process that used a shared memory segment (attach, ATIME (a,t) The time at which the last attach on the shared memory segment involved was DTIME (a,t) The time at which the last detach on a shared memory segment was completed. T (all) Type of IPC facility:
|
File
/etc/group The /etc/group file contains a list of all created group names. |
Example
The server program sets up a message queue. You first start this program in the background and then check the status of the inter-process communication facilities with ipcs:
|
See also
ipcrm |