Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Which process associates with which memory segments?
@ 2002-04-05  1:16 Andrew Li
  0 siblings, 0 replies; only message in thread
From: Andrew Li @ 2002-04-05  1:16 UTC (permalink / raw)


Is there a way to tell which process is attached to a certain shared
memory segment? If I do a "ipcs -bocpm", I'll get something like this
(some information is cut out to save space):

ID        KEY  OWNER  GROUP  CREATOR  CGROUP NATTCH   SEGSZ  CPID  LPID
13  0x4044ed3 oracle    dba   oracle     dba      9     784  3363  24224

How do I know what processes are using this segment? I've a tool developed
locally that goes through the pid table and find as much information as
possible. This tool takes a process id as argument and will report a key_t
key (struct ipc_perm) of a segment.

# /tmp/procmem 3371
Proc (3371): pid_entry@0xfffffc00009cbc08

Entry    Start address     type     VSZ    ObjSz  resident swapped share Key
   0:  0x0000000000010000  device    56K  aio?
   1: *0x00000000007fe000 SysVSHM     8K       1K       8K     0K 10 0x4044ed3
   2:  0x0000000000800000     SSM 57344K   52416K   10208K    2176K 10
   3: *0x000000011ffe0000    anon   128K               16K       0K 1
   4:  0x0000000120000000 segment  8192K    8192K    5152K          95
   5:  0x0000000120800000 segment  8192K    2424K    1352K          95
   6: *0x0000000140000000    anon   424K               56K       0K 1
   7:  0x000000014006a000    anon   472K              176K       0K 1

This is as far as I got. But this means I have to run this tool on every
process on the system to compare the key, in order to find out which
process is using which memory segment. Has anyone done anything like this
before or could suggest a better solution?

Andrew




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-05  1:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-05  1:16 Which process associates with which memory segments? Andrew Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox