Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ipcs(1) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ipcrm(1)

msgctl(2)

msgget(2)

msgop(2)

semctl(2)

semget(2)

semop(2)

shmctl(2)

shmop(2)

ipcs(1)                                                             ipcs(1)

NAME
     ipcs - report interprocess communication facilities status

SYNOPSIS
     ipcs [option ...]

DESCRIPTION
     ipcs prints information about active interprocess communication facil-
     ities (IPC facilities). A number of options can be used to control

     -  the type of IPC facility for which information is output

     -  the kind of information provided.

     Since the status of IPC facilities can change while ipcs is running,
     the information returned by ipcs is guaranteed to be accurate only at
     the time it was retrieved.

OPTIONS
     No option specified:
          Prints information in short format for

          -  message queues

          -  shared memory segments

          -  semaphores

          that are currently active in the system. The meanings of indivi-
          dual output columns are described under the OUTPUT section.

     There are options for defining the type of IPC facility and options
     for defining the type of information.






















Page 1                       Reliant UNIX 5.44                Printed 11/98

ipcs(1)                                                             ipcs(1)

   Defining the type of IPC facility

     -q   Prints information about active message queues.

     -m   Prints information about active shared memory segments.

     -s   Prints information about active semaphores.

     If the -q, -m or -s option is set, only information about the corre-
     sponding IPC facility is printed. The options can also be combined. If
     none of the options are set, information will be provided on all types
     of IPC facilities.

   Defining the type of information

     The following section describes the options that select the type of
     information to be provided for the facilities specified by the -q, -m,
     and -s options. See the OUTPUT section for the meanings of individual
     output columns.

     -a   Sets all options that define the type of information to display.
          This is a shorthand notation for -b, -c, -o, -p, and -t.

     -b   Prints the biggest allowable size for each respective IPC facil-
          ity.

          For message queues: the maximum number of bytes in a message to
          be placed on the queue.

          For shared memory: the size of the memory segments.

          For semaphores: the number of semaphores in each set of sema-
          phores.

     -c   Prints the login name and group name of the creator of the IPC
          facility.

     -o   Prints the following information on outstanding IPC facilities:

          -  the number of messages on queue,

          -  the total number of bytes in messages on queue, and

          -  the number of processes attached to shared memory segments.

     -p   Prints the following process ID information:

          -  process ID of the last process that sent a message,

          -  process ID of the last process that received a message,




Page 2                       Reliant UNIX 5.44                Printed 11/98

ipcs(1)                                                             ipcs(1)

          -  process ID of the process that created a shared memory seg-
             ment, and

          -  process ID of the last process to attach or detach on shared
             memory segments.

     -t   Prints time information. The time of the last control operation
          that changed the access permissions for all IPC facilities is
          displayed.

          For message queues: time when the system call msgrcv(2) (receive
          message from queue) or msgsnd(2) (send message to queue) was last
          used.

          For shared memory: time when the system call shmat(2) or shmdt(2)
          was last used.

          For semaphores: time when the system call semop(2) was last used
          on a semaphore.

   Additional arguments

     -C corefile
          Uses the file named corefile instead of /dev/kmem. This option
          can only be used by root or by users with permission to access
          /dev/kmem.

     -N namelist
          Uses the file named namelist instead of /stand/unix. This option
          can only be used by root or by users with permission to access
          /dev/kmem.

     -X   Prints information about XENIX interprocess communication, in
          addition to the standard IPC facilities status. The XENIX IPC
          information describes a second set of semaphores and shared
          memory.

          The -p option does not print process ID information for XENIX
          shared memory. The -t option does not print time information
          about XENIX semaphores and shared memory.

     If you specify either the -C or -N option, the real and effective user
     ID and group ID are set to the real user ID and group ID of the user
     invoking ipcs.

OUTPUT
     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.




Page 3                       Reliant UNIX 5.44                Printed 11/98

ipcs(1)                                                             ipcs(1)

     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 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 facil-
          ity belongs.

     ID (all)
          The identifier for the IPC facility.

     KEY (all)
          The key used as an argument when creating the IPC facility with
          msgget(2) (create message queue) or semget(2) (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 asso-
          ciated queue.

     MODE (all)
          The facility access modes and status indicators. The mode con-
          sists of 11 characters that are interpreted as follows:

          The first character can be:

          S  if a process is waiting on a msgsnd(2).

          D  if the associated shared memory segment has been removed. It
             disappears when the last process attached to the segment
             detaches it.

          -  if no process is waiting on a msgsnd(2).

          The second character can be:

          R  if a process is waiting on a msgrcv(2).




Page 4                       Reliant UNIX 5.44                Printed 11/98

ipcs(1)                                                             ipcs(1)

          C  if the associated shared memory segment is to be cleared when
             the first attach is executed.

          -  if no process is waiting on a msgrcv(2).

          The next 9 characters are interpreted as three sets of three bits
          each:

          The first set refers to the access permissions of the owner of
          the IPC facility.

          The next set represents the access permissions of others belong-
          ing to the same user group as the owner of the facility entry.

          The third set refers to the access permissions of all other
          users.

          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 specified as follows:

          r  if read permission is granted

          w  if write permission is granted

          a  if permission to alter the entry is granted

          -  if the indicated permission is not granted.

     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 asso-
          ciated semaphore set.

     OWNER (all)
          The 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 mes-
          sage queue.


Page 5                       Reliant UNIX 5.44                Printed 11/98

ipcs(1)                                                             ipcs(1)

     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 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 segment.

     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.

     T (all)
          Type of the IPC facility:

          q  for message queue

          m  for shared memory

          s  for semaphore.

EXAMPLES
     The server program sets up a message queue. You first start this pro-
     gram in the background and then check the status of the interprocess
     communication facilities with ipcs:

     $ server &
     $ ipcs
     IPC status from /dev/kmem as of Tue Jun  6 13:35:55 1989
     T     ID     KEY        MODE       OWNER    GROUP
     Message Queues:
     q     40 0x0000004b -Rrw-rw-rw-  michael    qm234
     Semaphores:







Page 6                       Reliant UNIX 5.44                Printed 11/98

ipcs(1)                                                             ipcs(1)

FILES
     /stand/unix
          System name list

     /dev/kmem
          File containing a virtual memory map of the operating system ker-
          nel

     /etc/passwd
          The /etc/passwd file contains all the login names that have been
          set up

     /etc/group
          The /etc/group file contains all the group names that have been
          set up

SEE ALSO
     ipcrm(1), msgctl(2), msgget(2), msgop(2), semctl(2), semget(2),
     semop(2), shmctl(2), shmop(2).



































Page 7                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026