Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List named semaphores

Is there a way to list all posix-named-semaphores, ipcs doesn't seem to give any info about posix semaphores e.g. ipcs -s output is

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0xcbc384f8 32769      xxx    600        1

Though I have created many posix semaphores and listing `/dev/shm' shows them

-rw------- 1 xxx auniyal 16 2011-08-09 15:59 /dev/shm/sem.mysem
-rw------- 1 auniyal auniyal 16 2011-08-09 16:29 /dev/shm/sem.mysem1
like image 348
Anurag Uniyal Avatar asked Aug 09 '11 22:08

Anurag Uniyal


1 Answers

So for now solution seems to be to list /dev/shm e.g.

$ ls -al /dev/shm/sem.*|more
-rw------- 1 auniyal auniyal 16 2011-08-09 15:59 /dev/shm/sem.mysem
-rw------- 1 auniyal auniyal 16 2011-08-09 16:29 /dev/shm/sem.mysem1
-rw------- 1 auniyal auniyal 16 2011-08-09 16:37 /dev/shm/sem.mysem2
-rw------- 1 auniyal auniyal 16 2011-08-09 16:37 /dev/shm/sem.mysem3
-rw------- 1 auniyal auniyal 16 2011-08-09 16:39 /dev/shm/sem.mysem4
...
like image 172
Anurag Uniyal Avatar answered Sep 24 '22 03:09

Anurag Uniyal