ipcs

 


 
 
 
 User Commands                                             ipcs(1)
 
 
 


NAME

ipcs - report inter-process communication facilities status

SYNOPSIS

/usr/bin/ipcs [ -aAbcimopqst ] [ -C corefile ] [ -N namelist ] /usr/xpg4/bin/ipcs [ -aAbcimopqst ] [ -C corefile ] [ -N namelist ]

DESCRIPTION

The utility ipcs 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. /usr/xpg4/bin/ipcs See NOTES.

OPTIONS

The following options are supported: -m Prints information about active shared memory seg- ments. -q Prints information about active message queues. -s 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.) -A Uses all print options. (This is a shorthand notation for -b, -c, -i, -o, -p, and -t.) -b 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. -c Prints creator's login name and group name. See below. -C corefile Uses the file corefile in place of /dev/mem and SunOS 5.8 Last change: 17 Nov 1999 1 User Commands ipcs(1) /dev/kmem. Use a core dump obtained from savecore(1M) in place of /dev/mem and /dev/kmem. Without the -C option (default), the running system image is used. -i Prints number of ISM attaches to shared memory seg- ments. -N namelist Uses the file namelist in place of /dev/ksyms. -o Prints information on outstanding usage: number of messages on queue and total number of bytes in mes- sages on queue for message queues and number of processes attached to shared memory segments. -p 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. -t 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. 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: 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 ID (all) The identifier for the facility entry. KEY (all) The key used as an argument to msgget(2), semget(2), SunOS 5.8 Last change: 17 Nov 1999 2 User Commands ipcs(1) 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.) 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(2). S A process is waiting on a msgsnd(2). D The associated shared memory segment has been removed. It will disappear when the last process attached to the segment detaches it. (Note: If the shared memory segment identifier is removed via an IPC_RMID call to shmctl(2) before the process has detached from the segment with shmdt(2), the segment is no longer visi- ble to ipcs and it will not appear in the ipcs out- put.) C The associated shared memory segment is to be cleared when the first attach is executed. - 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 permis- sions; 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. SunOS 5.8 Last change: 17 Nov 1999 3 User Commands ipcs(1) GROUP (all) The group name of the group of the owner of the facil- ity entry. CREATOR (a,A,c) The login name of the creator of the facility entry. CGROUP (a,A,c) The group name of the group of the creator of the facility entry. CBYTES (a,A,o) The number of bytes in messages currently outstanding on the associated message queue. QNUM (a,A,o) The number of messages currently outstanding on the associated message queue. QBYTES (a,A,b) The maximum number of bytes allowed in messages out- standing on the associated message queue. LSPID (a,A,p) The process ID of the last process to send a message to the associated queue. LRPID (a,A,p) The process ID of the last process to receive a mes- sage from the associated queue. STIME (a,A,t) The time the last message was sent to the associated queue. RTIME (a,A,t) The time the last message was received from the asso- ciated queue. CTIME (a,A,t) The time when the associated entry was created or changed. ISMATTCH (a,i) The number of ISM attaches to the associated shared memory segments. NATTCH (a,A,o) The number of processes attached to the associated shared memory segment. SEGSZ (a,A,b) SunOS 5.8 Last change: 17 Nov 1999 4 User Commands ipcs(1) The size of the associated shared memory segment. CPID (a,A,p) The process ID of the creator of the shared memory entry. LPID (a,A,p) The process ID of the last process to attach or detach the shared memory segment. ATIME (a,A,t) The time the last attach was completed to the associ- ated shared memory segment. DTIME (a,A,t) The time the last detach was completed on the associ- ated shared memory segment. NSEMS (a,A,b) The number of semaphores in the set associated with the semaphore entry. NSEMS (a,A,b,t) (For /usr/xpg4/bin/ipcs) The number of semaphores in the set associated with the semaphore entry. OTIME (a,A,t) The time the last semaphore operation was completed on the set associated with the semaphore entry. ENVIRONMENT VARIABLES See environ(5) for descriptions of the following environ- ment 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.

FILES

/etc/group" group names /etc/passwd" user names /dev/mem memory /dev/ksyms system namelist SunOS 5.8 Last change: 17 Nov 1999 5 User Commands ipcs(1)

ATTRIBUTES

See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWipc (32-bit) | |_____________________________|_____________________________| | | SUNWipcx (64-bit) | |_____________________________|_____________________________|

SEE ALSO

ipcrm(1), savecore(1M), msgget(2), msgrcv(2), msgsnd(2), semget(2), semop(2), shmctl(2), shmget(2), shmop(2), attri- butes(5), environ( 5)

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 it gives is guaranteed to be accurate only when it was retrieved. When the corresponding facility is not installed or has not been used since the last reboot, /usr/xpg4/bin/ipcs will report "%s facility not in system.\n", facility while /usr/bin/ipcs will report "%s facility is inactive.\n", facility where facility is "Message Queue", "Shared Memory", or "Semaphore", as appropriate. SunOS 5.8 Last change: 17 Nov 1999 6