ipcs - Report interprocess communication status
Synopsis
ipcs [-ETabcjmnopqstu]
Description
The ipcs utility reports information
about existing interprocess communication (IPC) entries on the system and
displays the output on standard output.
The ipcs utility is shipped with public authority
set to *EXCLUDE. The user must have *SERVICE
special authority to run ipcs.
ipcs automatically reports some information
for all entries that match the IPC mechanism specified.
Additional information is reported based on the specified options.
If no IPC mechanism is specified, all five mechanisms are
reported. An IPC mechanism is specified by using the -m option
for shared memory, -n option of named semaphores,
-s option for semaphores sets, -q option
for message queues, or -u option for unnamed sempahores.
The following information is reported for every shared memory, semaphore
set, and message queue entry:
- The type of the mechanism (column T).
- The id of the entry in decimal form (column ID).
- The key of the entry in hexadecimal form (column KEY).
- The entry's access modes and flags (column MODE).
- The user profile of the owner of the entry (column OWNER).
- The group profile of the owner of the entry (column GROUP).
The following information is reported for every named semaphore entry:
- The type of the mechanism (column T).
- The title for the semaphore (column TITLE).
- The entry's access modes and flags (column MODE).
The following information is reported for every unnamed semaphore entry:
- The type of the mechanism (column T).
- The title for the semaphore (column TITLE).
Warning: Running ipcs locks system-scoped resources
that can affect the performance of other IPC operations.
Options
The following options are used to select the IPC mechanism to report on.
- -m
- Show the shared memory entries on the system.
- -n
- Show the named semaphore entries on the system.
- -q
- Show the message queue entries on the system.
- -s
- Show the semaphore set entries on the system.
- -u
- Show the unnamed semaphore entries on the system.
The following options select the additional information that
is reported for the IPC mechanism.
- -a
- Report all information as if the -b, -c,
-o, -p, and -t options were specified.
- -b
- Display the maximum allowable size. If message queues are specified,
the report includes the QBYTES column. If shared memory is specified,
the report includes the SEGSZ column. If semaphore sets are specified,
the report includes the NSEMS column. If named semaphores or unnamed
semaphores are specified, the report includes the VALUE and NWAITERS columns.
- -c
- Display the user profile and group profile of the creator of the entry.
For all mechanisms, the report includes the CREATOR and CGROUP columns.
- -E
- Display extended information. If message queues are specified,
the report includes the WPID, WTID, MSGTYPE, and SIZE columns. If shared memory is specified, the report includes the APID and NUMATT columns. If semaphore sets are specified, the report includes the SEMNUM, SEMVAL, LOPID, WAITZ, WAITP, and WAITVAL columns. If named
semaphores are specified, the report includes the NAME, LPOST, LWAIT,
WAITER, JOB, and THREAD columns. If unnamed semaphores are specified,
the report includes the LPOST, LWAIT, WAITER, JOB, and THREAD columns.
Since this level of detail is not available on other
systems, this option is kept separate from the -a option.
When this option is specified, at least one row is added
for each entry.
- -j
- Display the qualified job name instead of the process ID when the
-E option is also specified. If message queues are
specified, the report includes the WJOBID column instead of WPID. If
shared memory is specifed, the report includes the AJOBID column instead
of APID. If semaphore sets are specified, the report includes the
LOJOBID column instead of LOPID, the WAITZJID column instead of WAITZ,
and the WAITPJID column instead of WAITP.
- -o
- Display information about outstanding usage. If message queues are specified,
the report includes the CBYTES and QNUM columns. If shared memory is specified,
the report includes the NATTCH column.
- -p
- Display process ID information. If message queues are specified,
the report includes the LSPID and LRPID columns. If shared memory is specified,
the report includes the CPID and LPID columns.
- -t
- Display time information. If message queues are specified,
the report includes the CTIME, RTIME, and STIME columns. If shared
memory is specified, the report includes the CTIME, ATIME, and DTIME
columns. If semaphore sets are specified, the report includes the
CTIME and OTIME columns.
- -T
-
Display thread information. If message queues are specified, the report
includes the LSTID and LRTID columns. If shared memory is specified,
the report includes the CTID and LTID columns.
If semaphore sets are specified and the
-E option is specified, the report includes the
LOTID, WAITZTID, and WAITPTID columns.
Operands
There are no operands.
Extended Description
Listed below are descriptions for all of the columns that can be
reported in the output. After the column name, the options that display
the column are shown. A value of "default"
means that the column is always displayed, no matter
what option is specified.
- AJOBID (-Ej)
- The qualified job name of the jobs attached to the
shared memory segment.
- ATIME (-t, -a)
- The last time a job attached to the shared
memory segment.
- APID (-E)
- The process ID of the job or jobs attached to the
shared memory segment.
- CBYTES (-o, -a)
- The total number of bytes in the messages
currently on the message queue.
- CGROUP (-c, -a)
- The group profile of the creator of the entry.
- CPID (-p, -a)
- The process ID of the job that created the
shared memory segment.
- CTID (-T)
- The thread ID of the thread that created the
shared memory segment.
- CREATOR (-c, -a)
- The user profile of the creator of the entry.
- CTIME (-t, -a)
- The last time the entry was either created or
the owner or permissions, or both, were changed.
- DTIME (-t, -a)
- The last time a job detached from the
shared memory segment.
- GROUP (default)
- The group profile of the owner of the entry.
- ID (default)
- The id of the entry in decimal.
- JOB (-E)
- The fully-qualified job name of the job waiting on the named semaphore
or unnamed semaphore.
- KEY (default)
- The key of the entry in hexadecimal.
- LOJOBID (-Ej)
- The qualified job name of the last job to change the value of the semaphore
using semop().
- LOPID (-E)
- The process ID of the last job to change the value of the semaphore
using semop().
- LOTID (-TE)
- The thread ID of the last thread to change the value of the
semaphore using semop().
- LPID (-p, -a)
- The process ID of the last job to attach
or detach from the shared memory segment or change the semaphore value.
- LPOST (-E)
- The fully-qualified job name and thread id of the last thread to
post the named semaphore or unnamed semaphore.
- LRPID (-p, -a)
- The process ID of the last job to receive a message from the message
queue using msgrcv().
- LRTID (-T)
- The thread ID of the last thread to receive a message from the message
queue using msgrcv().
- LSPID (-p, -a)
- The process ID of the last job to send a message to the message
queue using msgsnd().
- LSTID (-T)
- The thread ID of the last thread to send a message to the message
queue using msgsnd().
- LTID (-T)
- The thread ID of the last thread to attach or detach from the shared memory
segment.
- LWAIT (-E)
- The fully-qualified job name and thread id of the last thread to
wait for the named semaphore or unnamed semaphore.
- MODE (default)
- An 11 character field that provides information
about the state and permissions of the entry.
The first character can be one of the following:
- D
- The entry has sustained damage, and no
operations can be performed on it.
The entry should only be marked damaged if
an internal error has occurred.
- T
- The entry is a shared memory segment and
the segment uses teraspace storage.
- Y
- The entry is a shared memory segment and
the segment uses teraspace storage and the entry
has sustained damage.
- -
- None of the above applies.
The second character can be one of the
following:
- R
- The entry is a message queue and a
thread is waiting on a call to msgrcv().
- S
- The entry is a message queue and a
thread is waiting on a call to msgsnd().
- D
- The entry is a shared memory segment
and the shared memory segment is marked to
be removed when all the jobs
detach from the shared memory.
- -
- None of the above applies.
The next nine characters are interpreted as
three sets of three permissions each. The first set
refers to the owner's permissions, the second set
to group's permissions, and
the third set to other's permissions. Within each set, the
first character indicates permission to read,
the second character indicates permission to
write, and the last character is
currently unused.
The permissions are indicated as follows:
- r
- If read permission is granted.
- w
- If write permission is granted.
- -
- If the indicated permission is not granted.
- MSGTYPE (-E)
- The type of the messages that are currently on
the message queue.
- NAME (-E)
- The path name of the named semaphore.
- NATTCH (-o, -a)
- The current number of attaches to the shared
memory segment.
- NUMATT (-E)
- The number of times the job is attached to the
shared memory segment.
- NSEMS (-b, -a)
- The number of semaphores in the semaphore set.
- NWAITERS (-b, -a)
- The number of threads waiting on the named semaphore or
unnamed semaphore.
- OTIME (-t, -a)
- The last time that semop() was called using
the semaphore set.
- OWNER (default)
- The user profile of the owner of the entry.
- QBYTES (-b, -a)
- The maximum number of bytes allowed on the
message queue.
- QNUM (-o, -a)
- The number of messages currently on the message
queue.
- RTIME (-t, -a)
- The last time a msgrcv() was called using the message queue.
- SEGSZ (-b, -a)
- The size of the shared memory segment.
- SEMNUM (-E)
- The semaphore number in the semaphore set.
- SEMVAL (-E)
- The value of the semaphore.
- SIZE (-E)
- The size of the message on the message queue.
- STIME (-t, -a)
- The last time a msgsnd() was called using the message queue.
- T (default)
- The entry type. The value is M for a shared memory segment, N for a
named semaphore, Q for a message queue, S for a semaphore set, or
U for an unnamed semaphore.
- THREAD (-E)
- The thread ID of the thread waiting on the named semaphore
or unnamed semaphore.
- TITLE (default)
- The title of the named semaphore or unnamed semaphore.
- VALUE (-b, -a)
- The current value of the named semaphore or unnamed semaphore.
- WAITER (-E)
- The index number of the thread waiting on the named semaphore or
unnamed semaphore.
- WAITP (-E)
- The process ID
of the job waiting for the semaphore value
to reach a positive number.
- WAITPJID (-Ej)
- The qualified job name of the job waiting for the semaphore value to reach
a positive number.
- WAITPTID (-ET)
- The thread ID of the thread or threads waiting for the semaphore
value to reach a positive number.
- WAITVAL (-E)
- The value that the thread is waiting for the semaphore to reach.
- WAITZ (-E)
- The process ID
of the job waiting for the semaphore value
to reach zero.
- WAITZJID (-Ej)
- The qualified job name of the job waiting for the semaphore value to reach zero.
- WAITZTID (-ET)
- The thread ID of the thread or thread waiting for the semaphore value
to reach zero.
- WJOBID (-Ej)
- The qualified job names of the jobs waiting to receive a message.
- WPID (-E)
- The process ID of the job or jobs waiting to receive
a message.
- WTID (-E)
- The thread ID of the thread waiting to receive
a message.
Exit Status
- 0 on success
- >0 if an error occurs
Related Information