Results 1 to 2 of 2
Hi All,
Is there any equivalent method in POSIX to find out the ipc information for sharedmemory or semaphores?
Like if we execute this command:"
ipcs -m
We get the ...
- 05-07-2007 #1Just Joined!
- Join Date
- May 2007
- Posts
- 3
what is a POSIX equivalent of ipcs -m ?
Hi All,
Is there any equivalent method in POSIX to find out the ipc information for sharedmemory or semaphores?
Like if we execute this command:"
ipcs -m
We get the following output:
T ID KEY MODE OWNER GROUP
Shared Memory:
m 0 0x50000dcb --rw-r--r-- root root
Similarly, Do we have any such equivalent way to determine the ipcs facilites for POSIX calls? If there is no equivalent command then can we write any program ourselves to determine all these information?
Any help on this will be highly appreciated.
Thanks
barkha
- 05-08-2007 #2Just Joined!
- Join Date
- May 2007
- Location
- In a city called Chennai in India
- Posts
- 17
the same command shows the POSIX compliant ipc's as well
Hi,
The same command "ipcs -a" will list you all the currently active shared memories, Semaphores and also the message queues in your machine.
This command will also show you the POSIX compliant shared memories etc also.
Like when you create a shared memory using POSIX calls such as "shm_open()", "mmap()", "shm_destroy()" etc., those shared memories created could be viewed by opening "/dev/shm" which will be automatically mounted in your machine. You can check "df -h" for that "/dev/shm" device mount.
Those shared memories so created can also be viewed with the "ipcs -a" command. You can verify that by means of checking your Shared Memory key or the Permission bits. Say, if you give a 0666 permission for your shared memory, you can notice that permitted shared memory being shown in the "ipcs -a" command.
Regards
Visu


Reply With Quote
