cancel
Showing results for 
Search instead for 
Did you mean: 

Semaphore problem

SOLVED
Go to solution
Bob Manocchia
Regular Advisor

Semaphore problem

I have an rp4440 server running hpux 11.11. We are having a problem with left behind semaphores. When I run ipcs -bcopts I can see serveral (about 560) semaphores listed belonging to root: Here is a brief listing.
s 125 0x00000000 ----------- root sys root sys 1 no-entry 17:48:37
s 126 0x00000000 ----------- root sys root sys 1 no-entry 17:48:37
s 4225 0x00000000 ----------- root sys root sys 1 no-entry 17:48:52
s 8324 0x00000000 ----------- root sys root sys 1 no-entry 19:16:37
s 129 0x00000000 ----------- root sys root sys 1 no-entry 17:48:37
s 130 0x00000000 ----------- root sys root sys 1 no-entry 17:48:37
s 4229 0x00000000 ----------- root sys root sys 1 no-entry 19:16:37
s 8328 0x00000000 ----------- root sys root sys 1 no-entry 19:36:36
s 133 0x00000000 ----------- root sys root sys 1 no-entry 17:48:37
s 134 0x00000000 ----------- root sys root sys 1 no-entry 17:48:37
s 8331 0x00000000 ----------- root sys root sys 1 no-entry 19:36:36
s 4234 0x00000000 ----------- root sys root sys 1 no-entry 19:16:37
s 4235 0x00000000 ----------- root sys root sys 1 no-entry 19:16:37

I know the first 20 of so root entries should not be touched and the ones belonging to the SAP user should not be touched as well but these appear after those and look like they aren't owned by anything.

Can we determine what processes these belong to and can we safely remove them using ipcrm.

Thanks
11 REPLIES
Ivan Krastev
Honored Contributor

Re: Semaphore problem

Hello Bob,

Look for tool, called shminfo - it will give you detailed information about semaphores <-> processes.

regards,
ivan
Dennis Handly
Acclaimed Contributor

Re: Semaphore problem

Take a look at my attachment in the following thread. Compile it and that will give the time AND date of each semaphore.
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1144781
Bob Manocchia
Regular Advisor

Re: Semaphore problem

How do I complie this. In you original email you mention DHP_11.11.
Dennis Handly
Acclaimed Contributor
Solution

Re: Semaphore problem

>In you original email you mention -DHP11_11.

Yes: cc -DHP11_11 291516.c
Bob Manocchia
Regular Advisor

Re: Semaphore problem

I do not have this compiler and I tried googling it to no avail.
Dennis Handly
Acclaimed Contributor

Re: Semaphore problem

Yes: cc -DHP11_11 291516.c

>I do not have this compiler

It should be on all systems. Try the absolute path:
/usr/ccs/bin/cc_bundled 291516.c -DHP11_11 -o semaphore_date
And to execute: ./semaphore_date
Bob Manocchia
Regular Advisor

Re: Semaphore problem

Thanks. Got it. So the semaphores with the NO-ENTRY are not being used and can be removed.
Dennis Handly
Acclaimed Contributor

Re: Semaphore problem

>So the semaphores with the NO-ENTRY are not being used and can be removed.

Well, you need to use "ipcs -sa" to find the owner. Also, was it created long ago?
I suppose it is possible to create them and never used them, yet? 560 seems like a lot.
Bob Manocchia
Regular Advisor

Re: Semaphore problem

The owner is root and it looks like they were created sometime back in December of 07.
Dennis Handly
Acclaimed Contributor

Re: Semaphore problem

>The owner is root and it looks like they were created sometime back in December of 07.

So the system has been up that long?
Can you check syslog or the SD logs to see what happened on that date/time?
Bob Manocchia
Regular Advisor

Re: Semaphore problem

Thanks for all the help.