terça-feira, 25 de outubro de 2011

shared memory owner

How to check the shared memory owner?

1. showipc
2. get the key number and find the address, for example:

> showipc 01 | grep 51
OsKey: 20151 0x00004eb7 Semaphore Key: 51

the address is 4eb7

3. call the ipcs with the address, for example:

> ipcs | grep 4eb7
0x00004eb7 2818130 loladm 740 1


sexta-feira, 21 de outubro de 2011

semd

Op: Rq=1,Rl=2,Sh=3,In=4,InM=6,RmM=7,Clo=8,RmLM=9,Exit=10,AllowReInit=11 :10

3: Show the status of the semaphore.
4: Command "initialize".
10: Exit the semd program.


ex:
#!/bin/bash
SEMA=3; echo "4 $SEMA -1 3 10" > options; semd pf=INSTANCE_PROFILE < options