Valery Ushakov <[email protected]> wrote: > May be. Though I'm not even sure that it needs a separate heading,
Fair enough. Here's an updated diff. -Jan
Index: ipcs.1 =================================================================== RCS file: /cvsroot/src/usr.bin/ipcs/ipcs.1,v retrieving revision 1.20 diff -u -p -r1.20 ipcs.1 --- ipcs.1 11 Jun 2014 14:57:55 -0000 1.20 +++ ipcs.1 14 Nov 2025 19:33:08 -0000 @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 11, 2014 +.Dd November 14, 2025 .Dt IPCS 1 .Os .Sh NAME @@ -121,6 +121,147 @@ or .Fl T options are specified, information about all active IPC facilities is listed. +.Pp +The output generated by +.Nm +if passed the +.Fl M , +.Fl Q , +and +.Fl S +options is self-explanatory. +For the other options, the output consists of a series +of columns depending on the facility in question as +well as which of the various supported flags were +given. +.Pp +The meaning of each column as identified by the column +heading is as follows: +.Bl -tag -width 9n +.It Li T +The type of facility, identified as: +.Bl -tag -width 4n -offset indent +.It Sy m +shared memory segment +.It Sy s +semaphore +.It Sy q +message queue +.El +.It Li ID +The identifier, suitable to be passed to, e.g., +.Xr ipcrm 1 . +.It Li KEY +The key passed to, e.g., +.Xr msgget 2 , +.Xr semget 2 , +or +.Xr shmget 2 ; +often created using +.Xr ftok 3 . +.It Li MODE +A string of 11 characters representing the access mode +and flags for the facility. +.Pp +On +.Nx , +the first two characters are always +.Sy \- . +.Pp +The remaining 9 characters are similar to typical file +permissions in that three characters each refer to +owner-, group-, and other permissions of the facility +entry with the following meaning: +.Bl -tag -width 4n -offset indent +.It Sy r +read permission +.It Sy w +write permission +.It Sy a +alter permission; the ability to change control +information such as the owner or permissions +.El +.It Li OWNER +The user name (or, if no user name can be found, UID) +of the owner of the facility entry. +.It Li GROUP +The group name (or, if no group name can be found, +GID) of the group owner of the facility entry. +.It Li CREATOR +The user name (or, if no user name can be found, UID) +of the creator of the facility entry. +.It Li CGROUP +The group name (or, if no group name can be found, +GID) of the creator group owner of the facility entry. +.El +.Pp +Following this, the columns printed will differ for +each of the facilities. +.Pp +Times are displayed in +.Sy %H:%M:%S +format in the +time zone described by +.Pa /etc/localtime +or the +.Ev TZ +environment variable. +If no time is available for the given event, the +string "no-entry" is used instead. +.Ss Message Queues +.Bl -tag -width 9n +.It Li CBYTES +The total number of bytes left in the message queue. +.It Li QNUM +The number of messages left in the message queue. +.It Li QBYTES +The maximum number of bytes in the message queue. +.It Li LSPID +The process ID of the last process to send a message. +.It Li LRPID +The process ID of the last process to receive a +message. +.It Li STIME +The time of last +.Xr msgsend 2 . +.It Li RTIME +The time of last +.Xr msgrcv 2 . +.It Li CTIME +The time the message queue was created or last modified. +.El +.Ss Shared Memory +.Bl -tag -width 9n +.It Li NATTCH +The number of current attaches. +.It Li SEGSZ +The size of the shared memory segment in bytes. +.It Li CPID +The process ID of the process that created the shared +memory segment. +.It Li LPID +The process ID of the last shm operation. +.It Li ATIME +The time of last +.Xr shmat 2 . +.It Li DTIME +The time of last +.Xr shmdt 2 . +.It Li CTIME +The time the shared memory segment was created +or last modified. +.El +.Ss Semaphores +.Bl -tag -width 9n +.It Li NSEMS +The number of semaphores in the set. +.It Li OTIME +The time of last +.Xr semop 2 . +.It Li CTIME +The time the semaphore set was created or last +modified. +.El .Sh RESTRICTIONS System data structures may change while .Nm @@ -129,13 +270,26 @@ is running; the output of is not guaranteed to be consistent. .Sh SEE ALSO .Xr ipcrm 1 , +.Xr msgctl 2 , +.Xr msgget 2 , +.Xr msgrcv 2 , +.Xr msgsnd 2 , +.Xr semctl 2 , +.Xr semget 2 , +.Xr semop 2 , .Xr shmat 2 , .Xr shmctl 2 , .Xr shmdt 2 , -.Xr shmget 2 +.Xr shmget 2 , +.Xr ftok 3 .Sh AUTHORS .An Thorsten Lockert Aq Mt [email protected] .Sh BUGS -This manual page is woefully incomplete, because it does not -at all attempt to explain the information printed by -.Nm . +The first two characters of the +.Li MODE +are always set to +.Sy \- +on +.Nx . +On other platforms, these characters may indicate +additional state information about the given facility.
