IPCS
ipcs provides information on the ipc facilities for which the calling process has read acccess.
ipcs provides information on ipc facilities for which you have read access.
Resource Specification:
-m : shared_mem
-q : messages
-s : semaphores
-a : all (default)
Output Format:
-t : time
-p : pid
-c : creator
-l : limits
-u : summary
-i id [-s -q -m] : details on resource identified by id
usage : ipcs -asmq -tclup
ipcs [-s -m -q] -i id
ipcs -h for help.
This will show memory segments held by all users.
For example:
root@host# ipcs -sa
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 262144 apache 600 1
0x00000000 294913 apache 600 1
0x00000000 327682 apache 600 1
0x00000000 360451 apache 600 1
------ Message Queues --------
key msqid owner perms used-bytes messages
And then to remove any of those shared memory segments (lets say httpd is hung for this example):
root@host# ipcrm -m semid
ipcs provides information on ipc facilities for which you have read access.
Resource Specification:
-m : shared_mem
-q : messages
-s : semaphores
-a : all (default)
Output Format:
-t : time
-p : pid
-c : creator
-l : limits
-u : summary
-i id [-s -q -m] : details on resource identified by id
usage : ipcs -asmq -tclup
ipcs [-s -m -q] -i id
ipcs -h for help.
This will show memory segments held by all users.
For example:
root@host# ipcs -sa
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 262144 apache 600 1
0x00000000 294913 apache 600 1
0x00000000 327682 apache 600 1
0x00000000 360451 apache 600 1
------ Message Queues --------
key msqid owner perms used-bytes messages
And then to remove any of those shared memory segments (lets say httpd is hung for this example):
root@host# ipcrm -m semid

Comments