Copyright 1989 AT&T
Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
ipcs [-aAbciJmopqstZ] [-D mtype] [-z zone]
The ipcs utility prints information about active inter-process communication facilities. The information that is displayed is controlled by the options supplied. Without options, information is printed in short format for message queues, shared memory, and semaphores that are currently active in the system.
The following options are supported: -m
Prints information about active shared memory segments.
Prints information about active message queues.
Prints information about active semaphores.
If -m, -q, or -s are specified, information about only those indicated is printed. If none of these three is specified, information about all three is printed subject to these options: -a
Uses all XCU5 print options. (This is a shorthand notation for -b, -c, -o, -p, and -t.)
Uses all print options. (This is a shorthand notation for -b, -c, -i, -J, -o, -p, and -t.)
Prints information on biggest allowable size: maximum number of bytes in messages on queue for message queues, size of segments for shared memory, and number of semaphores in each set for semaphores. See below for meaning of columns in a listing.
Prints creator's login name and group name. See below.
Displays, in hexadecimal and ASCII, the contents of all messages of type mtype found on any message queue that the user invoking ipcs has permission to read. If mtype is 0, all messages are displayed. If mtype is negative, all messages with type less than or equal to the absolute value of mtype are displayed. (See msgrcv(2) and msgsnap(2)).
Prints number of ISM attaches to shared memory segments.
Prints the creator's project.
Prints information on outstanding usage: number of messages on queue and total number of bytes in messages on queue for message queues and number of processes attached to shared memory segments.
Prints process number information: process ID of last process to send a message, process ID of last process to receive a message on message queues, process ID of creating process, and process ID of last process to attach or detach on shared memory segments. See below.
Prints time information: time of the last control operation that changed the access permissions for all facilities, time of last msgsnd(2) and last msgrcv(2) on message queues, time of last shmat(2) and last shmdt(2) on shared memory (see shmop(2)), time of last semop(2) on semaphores. See below.
Prints information about facilities associated with the specified zone (see zones(7)). The zone can be specified as either a name or a numeric id. The default is to display information about the zone in which the command is executing. Notice that this option is only useful when executing in the global zone.
When executing in the global zone, prints information about all zones. Otherwise, prints information about the zone in which the command is executing. The output includes the zone associated with each facility.
The column headings and the meaning of the columns in an ipcs listing are given below. The letters in parentheses indicate the options that cause the corresponding heading to appear and "all" means that the heading always appears. Note: These options only determine what information is provided for each facility; they do not determine which facilities are listed. T (all)
Type of the facility: q
message queue
shared memory segment
semaphore
The identifier for the facility entry.
The key used as an argument to msgget(2), semget(2), or shmget(2) to create the facility entry. (Note: The key of a shared memory segment is changed to IPC_PRIVATE when the segment has been removed until all processes attached to the segment detach it.)
The facility access modes and flags: The mode consists of 11 characters that are interpreted as follows. The first two characters are: R
A process is waiting on a msgrcv(2).
A process is waiting on a msgsnd(2).
The corresponding special flag is not set.
Read permission is granted.
Write permission is granted.
Alter permission is granted.
The indicated permission is not granted.
The login name of the owner of the facility entry.
The group name of the group of the owner of the facility entry.
The login name of the creator of the facility entry.
The group name of the group of the creator of the facility entry.
The number of bytes in messages currently outstanding on the associated message queue.
The number of messages currently outstanding on the associated message queue.
The maximum number of bytes allowed in messages outstanding on the associated message queue.
The process ID of the last process to send a message to the associated queue.
The process ID of the last process to receive a message from the associated queue.
The time the last message was sent to the associated queue.
The time the last message was received from the associated queue.
The time when the associated entry was created or changed.
The number of ISM attaches to the associated shared memory segments.
The number of processes attached to the associated shared memory segment.
The size of the associated shared memory segment.
The process ID of the creator of the shared memory entry.
The process ID of the last process to attach or detach the shared memory segment.
The time the last attach was completed to the associated shared memory segment.
The time the last detach was completed on the associated shared memory segment.
The number of semaphores in the set associated with the semaphore entry.
The time the last semaphore operation was completed on the set associated with the semaphore entry.
The project name of the creator of the facility entry.
The zone with which the facility is associated.
See environ(7) for descriptions of the following environment variables that affect the execution of ipcs: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH. TZ
Determine the timezone for the time strings written by ipcs.
group names
user names
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Committed |
Standard See standards(7). |
ipcrm (1), msgget (2), msgids (2), msgrcv (2), msgsnap (2), msgsnd (2), semget (2), semids (2), semop (2), shmctl (2), shmget (2), shmids (2), shmop (2), attributes (7), environ (7), standards (7), zones (7)
Things can change while ipcs is running. The information it gives is guaranteed to be accurate only when it was retrieved.