RE: reading the SGA from my own program

  • From: Tanel Poder <tanel.poder.003@xxxxxxx>
  • To: jeremiah@xxxxxxxxxxx, "'Oracle Discussion List'" <oracle-l@xxxxxxxxxxxxx>
  • Date: Sat, 19 Aug 2006 12:22:44 +0800

Why bother at all with those calculations?
 
Just map all SGA SHM segments at the same locations in your program where
they'd be mapped in an oracle processes and use all SGA addresses without
any conversion needed. 
 
Even if some data is stored in different shared memory segments, it's still
the same virtual address space - no need for doing some segment offset
calcuations...
 
Tanel.


  _____  

From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Jeremiah Wilton
Sent: Saturday, August 19, 2006 05:14
To: 'Oracle Discussion List'
Subject: reading the SGA from my own program



I am trying to play around with reading the SGA using my own program, as
popularized by Kyle Hailey and Miladin Modrakovic's papers and
presentations.  I am confused about where to find x$ksusecst (session wait)
and other items in the fixed area.

 

The base address of the SGA from x$ksmmem is hex 20000000. 

 

The lowest ADDR I see in x$ksusecst on my instance is 27133F24.  So far so
good.  

 

That means that x$ksusecst begins (27133F24-20000000=7133F24) bytes into the
segment containing the fixed SGA, right?  

 

Hex 7133F24 is decimal 118,701,860, so that should be about 113Mb into the
segment.

 

The problem is that the segment containing my fixed area (from oradebug ipc)
is only 4Mb.  All the shared memory segments owned by oracle on my host
(according to ipcs -a) total less than 108Mb.

 

So according to x$ksusecst(ADDR), session waits have an address beyond the
highest address in the SGA.  What am I getting wrong?

 

Thanks for any insights!

--

Jeremiah Wilton

ORA-600 Consulting

http://www.ora-600.net

Other related posts: