Common Linux commands (2): ipcs/ipcrm commands, ipcsipcrm

Source: Internet
Author: User

Common Linux commands (2): ipcs/ipcrm commands, ipcsipcrm
Ipcs

1. Command Format

Ipcs [resource-option] [output-format]
Ipcs [resource-option]-I id

2. command functions

Provide information about the IPC Device

3. Usage

Resource options:

Ipcs-m view system shared memory information

Ipcs-q: view system message queue Information

Ipcs-s: view system semaphore Information

Ipcs [-a] displays all IPC information in the system by default.

[martin@localhost data]$ ipcs -a------ Message Queues --------key        msqid      owner      perms      used-bytes   messages    ------ Shared Memory Segments --------key        shmid      owner      perms      bytes      nattch     status      0x00000000 229376     martin     600        4194304    2          dest         0x00000000 196609     martin     600        524288     2          dest         0x00000000 327682     martin     600        393216     2          dest         0x00000000 491525     martin     600        2097152    2          dest         ------ Semaphore Arrays --------key        semid      owner      perms      nsems     

 

Output Format control:

Ipcs-c view the creator and owner of IPC

Ipcs-l view restrictions on IPC Resources

Ipcs-p: view the creator and process ID of the IPC Resource

Ipcs-t: view the detailed time for calling the IPC Resource

Ipcs-u view IPC Resource Status Summary Information

[martin@localhost data]$ ipcs -u --human------ Messages Status --------allocated queues = 0used headers = 0used space = 0B------ Shared Memory Status --------segments allocated 4pages allocated 1760pages resident  339pages swapped   0Swap performance: 0 attempts     0 successes------ Semaphore Status --------used arrays = 0allocated semaphores = 0

 

Additional format control:

Ipcs-l -- human

Display size as humans can read

[martin@localhost data]$ ipcs -l --human------ Messages Limits --------max queues system wide = 3644max size of message = 8Kdefault max size of queue = 16K------ Shared Memory Limits --------max number of segments = 4096max seg size = 16Emax total shared memory = 16Emin seg size = 1B------ Semaphore Limits --------max number of arrays = 128max semaphores per array = 250max semaphores system wide = 32000max ops per semop call = 32semaphore max value = 3276

 

Ipcrm

1. command functions

Deletes an IPC resource by specifying an ID and deletes the data associated with the IPC object. Only the super user or the IPC resource creator can delete the resource.

2. Usage

Ipcrm-M shmkey

Remove shared memory segments created with shmkey

Ipcrm-m shmid

Remove shared memory segments identified by shmid

Ipcrm-S semkey

Remove semaphores created with semkey

Ipcrm-s semid

Remove semaphores identified by semid

Ipcrm-Q msgkey

Remove the Message Queue created with msgkey

Ipcrm-q msgid

Remove a Message Queue identified by msgid

 

Common Linux commands: directories

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.