Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory Managment

Status
Not open for further replies.

unixkid

IS-IT--Management
May 22, 2001
105
US
when using the "ipcs -m" command Does anyone know how to track those ID's to PID or processes?
 
just use "ipcs -mp", -p (prints process number information)

Hope this helps,
Regards,

Carlos Almeida,
 
not see how that maps to a PID when doing a "ps -ef" there must be a way to map these to system PIDS?
 
sorry, but don't understand what you want, consider Informix example:
#ipcs -mp
IPC status from <running system>
T ID KEY MODE OWNER GROUP CPID LPID
m 0 0x500009a3 --rw-r--r-- root root 220 10158
m 1 0x52564801 --rw-rw---- root informix 275 11470
m 2 0x52564802 --rw-rw---- root informix 275 11470
m 3 0x52564803 --rw-rw-rw- root informix 275 16423
===
CPID is the process ID of the creator of the shared memory entry, LPID is the process ID of the last process to attach or detach the shared memory segment.
then you can use crash:
#crash
dumpfile = /dev/mem, namelist = /dev/ksyms, outfile = stdout
> p #275
PROC TABLE SIZE = 7882
SLOT ST PID PPID PGID SID UID PRI NAME FLAGS
31 s 275 1 275 275 0 58 oninit load
===
pid 275 (oninit) is in slot 31 you can see detail in crash with &quot;as&quot;:
> as -f 31
BASE SIZE AS NEXT PREV OPS DATA
0x00010000 1000 0xf023c600 0xf0996f80 0x00000000 segvn_ops 0xf03fabd8
0x00020000 1000 0xf023c600 0xf08bbbc0 0xf0928480 segvn_ops 0xf096f6d8
0xdd000000 1000000 0xf023c600 0xf0928c20 0xf0996f80 segspt_shm 0xf0944e80
0xdf6c0000 99000 0xf023c600 0xf0660b60 0xf08bbbc0 segvn_ops 0xf09fdb80
===
In its address space you can see the shared page table segment driver (segspt_shm),which is responsible for Intimate Shared Memory segments is present.
you can inspect other process pid in the same way.

Hope this helps,
Regards,
Carlos Almeida.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top