Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: reading the SGA from my own program
Your assumption is wrong. The fixed SGA contains variables that are known at
oracle compile time or point to structures in variable part. So the answer
is that generally speaking, all x$ are in the variable part of the SGA. Also
there may be multiple segments but they are contiguous in memory (not always
the case), so you will have to map/attach at least to the segments of the
fixed and variable part. A better trick you can pull is so set SHMMAX
extremely large, so the whole SGA will fit in one segment. That means that
every thing is attached (easy to do when you are on linux).
Anjo.
On 8/18/06, Jeremiah Wilton <jeremiah_at_ora-600.net> wrote:
>
> 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
>
-- Anjo Kolk Owner and Founder OraPerf Projects tel: +31-577-712000 mob: +31-6-55340888 -- http://www.freelists.org/webpage/oracle-lReceived on Fri Aug 18 2006 - 16:56:09 CDT