Operating System - HP-UX
1833780 Members
2142 Online
110063 Solutions
New Discussion

Two dead shared memory segments upon reboot in 11i

 
SOLVED
Go to solution
Hiro Asari
Occasional Contributor

Two dead shared memory segments upon reboot in 11i

On all 11i boxes that I've checked so far (about 10 of them), there are always 2 dead shared memory segments with key 0. One is owned by root, and the other by www. Could someone explain to me what's going on there?

m 1808 0x00000000 D-rw------- root root 6 1052672
m 2209 0x00000000 D-rw------- www other 6 184324


The dead shared memory segments don't exist on 11.0 (as far as I can tell).
5 REPLIES 5
Andy Beal
Frequent Advisor

Re: Two dead shared memory segments upon reboot in 11i

The one owned by www is probably apache running. I have some similar segments showing my my boxes, you can do an ipcs -mp to display the pid associated with each segment.

Andy
Bill Hassell
Honored Contributor

Re: Two dead shared memory segments upon reboot in 11i

The most usefu options for ipcs are:

ipcs -bmop

That should show you all the details.


Bill Hassell, sysadmin
James Murtagh
Honored Contributor
Solution

Re: Two dead shared memory segments upon reboot in 11i

Hi Hiro,

Shared memory segments remaining even if no processes are currently accessing them is a feature of the SysV implementation, this is normal. This is, of course, dependant of the implementation, but I know the processes in question and this is desired. You can use the shminfo utility to see what processes created and last accessed them, its available here:

ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin/programs/shminfo

Cheers,

James.
James Murtagh
Honored Contributor

Re: Two dead shared memory segments upon reboot in 11i

My apologies, I misread the question. This key is the IPC_PRIVATE key (see "man shmget") used by processes that only require the process that created it and its child processes to access. Again, perfectly normal.
Elena Leontieva
Esteemed Contributor

Re: Two dead shared memory segments upon reboot in 11i

On my server I also have shared memory segments with 0 key and PID is associated with apache. From man ipsc, the D mode means that
"the associated shared memory segment has been removed. It will disappear when the last process attached to the segment detaches it."

Elena.