ipcs(1)
NAME
ipcs − report inter-process communication facilities status
SYNOPSIS
ipcs [ options ]
DESCRIPTION
ipcs prints certain information about active inter-process communication facilities. Without options, information is printed in short format for message queues, shared memory, semaphores, binary semaphores and frequency based schedulers that are currently active in the system. Otherwise, the information that is displayed is controlled by the following options:
−q Print information about active message queues.
−m Print information about active shared memory segments.
−s Print information about active semaphores.
−x Print information about active binary semaphores.
−f Print information about frequency based schedulers.
If −q, −m, −s, −x, or −f are specified, information about only those indicated is printed. If none of these five are specified, information about all five is printed subject to these options:
−b Print information on biggest allowable size: maximum number of bytes in messages on queue for message queues, size of segments for shared memory, number of semaphores in each set for semaphores, maximum number of processes schedulable for frequency based schedulers. See below for meaning of columns in a listing.
−c Print creator’s login name and group name. See below.
−o Print information on outstanding usage: number of messages on queue and total number of bytes in messages on queue for message queues, number of processes attached to shared memory segments, and number of processes currently controlled for frequency based schedulers.
−p Print 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.
−t Print time information: time of the last control operation that changed the access permissions for all facilities, time of last msgsnd and last msgrcv on message queues, time of last shmat and last shmdt on shared memory, time of last semop(2) on semaphores. See below.
−a Use all print options . (This is a shorthand notation for −b, −c, −o, −p, and −t.)
−C corefile
Use the file corefile in place of /dev/kmem.
−N namelist
Use the file namelist in place of /unix.
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; all means that the heading always appears. Note that 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
m shared memory segment
s semaphore
x binary semaphore
f frequency based scheduler
ID(all) The identifier for the facility entry.
KEY(all) The key used as an argument to msgget, semget, shmget, or bsemget 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.)
MODE(all) 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
S A process is waiting on a msgsnd
D The associated shared memory segment has been removed. It will disappear when the last process attached to the segment detaches it.
C The associated shared memory segment is to be cleared when the first attach is executed.
B The associated shared memory segment has been bound to a specific physical memory section.
− The corresponding special flag is not set.
The next nine characters are interpreted as three sets of three 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:
r Read permission is granted.
w Write permission is granted.
a Alter permission is granted.
− The indicated permission is not granted.
OWNER(all) The login name of the owner of the facility entry.
GROUP(all) The group name of the group of the owner of the facility entry.
CREATOR (a,c)
The login name of the creator of the facility entry.
CGROUP (a,c) The group name of the group of the creator of the facility entry.
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 process ID of the last process to send a message to the associated queue.
LRPID(a,p) The process ID of the last process to receive a message from the associated queue.
STIME(a,t) The time the last message was sent to the associated queue.
RTIME(a,t) The time 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.
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 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.
PROCS(a,f) The maximum number of processes that can be placed under control of this FBS.
CPROCS (a,f) The current number of processes that are under control of this FBS.
SECURITY FEATURES
The following security features are in effect when the system is running CX/SX.
Because ipcs has access to the address space of the kernel (via /dev/kmem, see mem(7)), the command is necessarily part of the Trusted Computing Base (intro(2SX)). The standard command provides information about all IPC objects without regard to the security implications of release of this information. The secured ipcs(1) command restricts the output of the command to IPC objects dominated by the user. See intro(2SX) for a definition of “dominate”. The user can gain information about IPC objects owned by other users; however, what the user can learn is of limited value. IPC objects are referenced by numbers for both key and object ID and these have only an indirect relation to process names; i.e., the name of the execed file. One can infer that certain processes are running because a message queue key is in use.
Users can use discretionary protections to prevent the ipcs command from showing their IPC objects. This is not possible for the process table where processes do not have permission bits.
The superuser can list the status of all IPC objects. There is no functional difference between the standard and the secured versions of ipcs(1) as far as the superuser is concerned. Users, other than superuser, are warned that output from the ipcs command is restricted by security policy.
Further the -N option, which changes the default namelist, and the -C option, which changes the default memory file, are restricted to superuser if the system is configured to B1 security.
FILES
/unixsystem namelist
/dev/kmemmemory
/etc/passwduser names
/etc/groupgroup names
NOTES
If the user specifies either the -C or -N flag, the real and effective UID/GID is set to the real UID/GID of the user invoking ipcs.
Things can change while ipcs is running; the information is guaranteed to be accurate only when it was retrieved.
SEE ALSO
shmdefine(1).
msgop(2), semop(2), shmbind(2), shmop(2) in the CX/UX Programmer’s Reference Manual.
shmconfig(1M) in the CX/UX Administrator’s Reference Manual.
CX/UX User’s Reference Manual