Hello, ipcs(1) says:
"This manual page is woefully incomplete, because it does not at all attempt to explain the information printed by ipcs." The attached diff seeks to rectify this. Could folks double-check that the information I'm adding there is correct? Thanks! -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 02:00:56 -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 13, 2025 .Dt IPCS 1 .Os .Sh NAME @@ -121,6 +121,143 @@ or .Fl T options are specified, information about all active IPC facilities is listed. +.Sh OUTPUT +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 CREATOR +.It T +The type of facility, identified as: +.Bl -tag -width n -offset indent +.It m +shared memory segment +.It s +semaphore +.It q +message queue +.El +.It ID +The identifier, suitable to be passed to, e.g., +.Xr ipcrm 1 . +.It KEY +The key passed to, e.g., +.Xr msgget 2 , +.Xr semget 2 , +or +.Xr shmget 2 ; +often created using +.Xr ftok 3 Ns ). +.It MODE +A string of 11 characters representing the access mode +and flags for the facility. +.Pp +On +.Nx Ns , +the first two characters are always '-'. +.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 n -offset indent +.It r +read permission +.It w +write permission +.It a +alter permission; the ability to change control +information such as the owner or permissions +.El +.It OWNER +The user name (or, if no user name can be found, UID) +of the owner of the facility entry. +.It GROUP +The group name (or, if no group name can be found, +GID) of the group owner of the facility entry. +.It CREATOR +The user name (or, if no user name can be found, UID) +of the creator of the facility entry. +.It 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 %H:%M:%S format in the +time zone described by +.Pa /etc/localtime +or the 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 CREATOR +.It CBYTES +The total number of bytes left in the message queue. +.It QNUM +The number of messages left in the message queue. +.It QBYTES +The maximum number of bytes in the message queue. +.It LSPID +The process ID of the last process to send a message. +.It LRPID +The process ID of the last process to receive a +message. +.It STIME +The time of last +.Xr msgsend 2 . +.It RTIME +The time of last +.Xr msgrcv 2 . +.It CTIME +The time the message queue was created or last modified. +.El +.Ss Shared Memory +.Bl -tag -width CREATOR +.It NATTCH +The number of current attaches. +.It SEGSZ +The size of the shared memory segment in bytes. +.It CPID +The process ID of process that created the shared +memory segment. +.It LPID +The process ID of the last shm operation. +.It ATIME +The time of last +.Xr shmat 2 . +.It DTIME +The time of last +.Xr shmdt 2 . +.It CTIME +The time the shared memory segment queue was created +or last modified. +.El +.Ss Semaphores +.Bl -tag -width CREATOR +.It NSEMS +The number of semaphores. +.It OTIME +The time of last +.Xr semop 2 . +.It CTIME +The time the semaphore set was created or last +modified. +.El +.El .Sh RESTRICTIONS System data structures may change while .Nm @@ -129,13 +266,24 @@ 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 , +.Xr sysctl 7 .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 MODE are always set to +\'-' on +.Nx Ns . +On other platforms, these characters may indicate +additional state information about the given facility.
