ipcs shows information on the inter-process communication facilities for which the calling process has read access. By default, it shows information about all three resources: shared memory segments, message queues, and semaphore arrays.
Without options, the information shall be written in short format for message queues, shared memory segments, and semaphore sets that are currently active in the system. Otherwise, the information that is displayed is controlled by the options specified.
Options :
- -q : Write information about active message queues.
- -m : Write information about active shared memory segments.
- -s : Write information about active semaphore sets.
- -a : Use all print options. (This is a shorthand notation for -b, -c, -o, -p, and -t.)
- -b : Write information on maximum allowable size. (Maximum number of bytes in messages on queue for message queues, size of segments for shared memory, and number of semaphores in each set for semaphores.)
- -c : Write creator’s user name and group name;.
- -o : Write information on outstanding usage. (Number of messages on queue and total number of bytes in messages on queue for message queues, and number of processes attached to shared memory segments.)
- -p : Write process number information. (Process ID of the last process to send a message and process ID of the last process to receive a message on message queues, process ID of the creating process, and process ID of the last process to attach or detach on shared memory segments.)
- -t : Write time information. (Time of the last control operation that changed the access permissions for all facilities, time of the last msgsnd() and msgrcv() operations on message queues, time of the last shmat() and shmdt() operations on shared memory, and time of the last semop() operation on semaphores.)
Examples on IPCS command:
1: To list all the IPC facility
# ipcs -a : It provides details about message queue, semaphore and shared memory.

All the IPC facility has unique key and identifier, which is used to identify an IPC facility.
2: To list all the Message Queue
$ ipcs -q : It lists only message queues for which the current process has read access.

3. To list all the Semaphores
# ipcs -s : To list the accessible semaphores.

4. To list all the Shared Memory
# ipcs -m : To lists the shared memories.

5. To get the detailed information about an IPC facility
# ipcs -m -i 425984 : To detailed information about an ipc facility(here for id-425984).

6. To lists the Limits for IPC facility
# ipcs -m -l : To get the system limits for each ipc facility.

# ipcs -l : To get the limits for all three IPC facilities.

7. To list Creator and Owner Details for IPC Facility
# ipcs -m -c : To list creator userid and groupid and owner userid and group id.

8. To get the process ids that accessed IPC facility recently
# ipcs -m -p : To displays creator id, and process id which accessed the corresponding ipc facility very recently.

9. To get the last Accessed Time
# ipcs -s -t : To get the last operation time in each ipc facility.

10. To get the status of current usage
# ipcs -u : To display current usage for all the IPC facility.

Reference: IPCS Linux Manual Page
This article is contributed by Kishlay Verma. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Recommended Posts:
- select command in Linux with examples
- Sed Command in Linux/Unix with examples
- ZIP command in Linux with examples
- SORT command in Linux/Unix with examples
- Cat command in Linux with examples
- Head command in Linux with examples
- Tail command in Linux with examples
- wc command in Linux with examples
- tar command in Linux with examples
- atrm command in Linux with examples
- bc command in Linux with examples
- AWK command in Unix/Linux with examples
- tr command in Unix/Linux with examples
- mv command in Linux with examples
- Paste command in Linux with examples
- comm command in Linux with examples
- cmp Command in Linux with examples
- cut command in Linux with examples
- cp command in Linux with examples
- uniq Command in LINUX with examples

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
