[SunHELP] How to tell what spawned an orphan shmid
Joe Pampel
joe at ardsley.com
Wed May 8 14:40:21 CDT 2002
Ok, this could be a weird one but here goes:
Our back office runs on a pretty fancy database program. It runs in memory (so
it's a whole lot faster than anything with a disk I/O) To see the shared
memory ID (shmid) it is using, we would typically use the IPCS -m | grep
<shmemkey>.
Here is our problem:
The program is spawing orphaned shmid's - a memory leak, and while we can
clean things up manually or via cron what I'm wondering is this - can we
determine which shared memory segments do not have active processes associated
with them? Or alternatively can I somehow query to find what process a
particular shmid thinks it is associated with and then compare that to IPCS to
see if it in fact exists etc ( and then run ipcrm -m <shmid> to remove the bad
stuff) or something along those lines? (using perl probably)
I'm no developer, and I don't play one on TV.. but is there a way I can do
this? What we'd really like to do is fix the problem and this is a key first
step towards getting there.
Thanks for any ideas!
- Joe
More information about the SunHELP
mailing list