
- Unix Commands Reference
- Unix Commands - Home
ipcs Command in Linux
NAME
ipcsreport XSI interprocess communication facilities status
SYNOPSIS
ipcs [-qms][-a | -bcopt]
DESCRIPTION
ipcsThe ipcs utility shall write information about active interprocess com- munication facilities. Without options, information shall be written in short format for mes- sage queues, shared memory segments, and semaphore sets that are cur- rently active in the system. Otherwise, the information that is dis- played is controlled by the options specified.
Options
Tag | Description |
---|---|
-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; see below. |
-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
Example-1:
List all the IPC facility
# ipcs -a
output:
------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0xc616cc44 1056800768 oracle 660 4096 0 0x0103f577 323158020 root 664 966 1 0x0000270f 325713925 root 666 1 2 ------ Semaphore Arrays -------- key semid owner perms nsems 0x0103eefd 0 root 664 1 0x0103eefe 32769 root 664 1 0x4b0d4514 1094844418 oracle 660 204 ------ Message Queues -------- key msqid owner perms used-bytes messages 0x000005a4 32768 root 644 0 0
Example-2:
List all the Message Queue
$ ipcs -q
output:
------ Message Queues -------- key msqid owner perms used-bytes messages 0x000005a4 32768 root 644 0 0
Example-3:
List all the Semaphores
# ipcs -s
output:
------ Semaphore Arrays -------- key semid owner perms nsems 0x0103eefd 0 root 664 1 0x0103eefe 32769 root 664 1 0x4b0d4514 1094844418 oracle 660 204
Example-4:
List all the Shared Memory
# ipcs -m
output:
------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0xc616cc44 1056800768 oracle 660 4096 0 0x0103f577 323158020 root 664 966 1 0x0000270f 325713925 root 666 1 2
Example-5:
Detailed information about an IPC facility
# ipcs -q -i 32768
output: Message Queue msqid=32768 uid=0 gid=0 cuid=0 cgid=0 mode=0644 cbytes=0 qbytes=65536 qnum=0 lspid=0 lrpid=0 send_time=Not set rcv_time=Not set change_time=Thu Aug 5 13:30:22 2010
Advertisements