1833431 Members
3216 Online
110052 Solutions
New Discussion

Semaphore PIDS

 
SOLVED
Go to solution
Michael Dalanek
Advisor

Semaphore PIDS

How can I find out from the ipcs -sa command which pid is actually using the semaphores ?
3 REPLIES 3
Stefan Farrelly
Honored Contributor
Solution

Re: Semaphore PIDS


Heres a script to do it (for HP-UX 11) - attached.


Im from Palmerston North, New Zealand, but somehow ended up in London...
Ken Scharpell
Valued Contributor

Re: Semaphore PIDS

The script Stefan sent works for 11 but for HP-UX 10.20 simply change the first line to;

/usr/contrib/bin/q4pxdb -s status /stand/vmunix|grep "ready for debug" >/dev/null 2>&1
The whole world is a simple perl script
CHRIS_ANORUO
Honored Contributor

Re: Semaphore PIDS

Use ipcs -mob and ipcs -t
This will tell you the user and the group the user belongs to.
You can terminate the process with
ipcrm -s(semaphore) and -m(shared memory identifiers), then the id number.
ie ipcrm -s 1234
ipcrm -m 1234
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.