next up previous contents
Next: The ipcrm Command Up: 6.4.1 Fundamental Concepts Previous: IPC Keys

The ipcs Command

The ipcs command can be used to obtain the status of all System V IPC objects. The Linux version of this tool was also authored by Krishna Balasubramanian.


ipcs     -q:    Show only message queues
ipcs     -s:    Show only semaphores
ipcs     -m:    Show only shared memory
ipcs --help:    Additional arguments

By default, all three categories of objects are shown. Consider the following sample output of ipcs:


------ Shared Memory Segments --------
shmid     owner     perms     bytes     nattch    status      

------ Semaphore Arrays --------
semid     owner     perms     nsems     status      

------ Message Queues --------
msqid     owner     perms     used-bytes  messages    
0         root      660       5           1

Here we see a single message queue which has an identifier of ``0''. It is owned by the user root, and has octal permissions of 660, or -rw-rw--. There is one message in the queue, and that message has a total size of 5 bytes.

The ipcs command is a very powerful tool which provides a peek into the kernel's storage mechanisms for IPC objects. Learn it, use it, revere it.



Converted on:
Fri Mar 29 14:43:04 EST 1996

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:57:43