Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: reading the SGA from my own program

RE: reading the SGA from my own program

From: Jeremiah Wilton <jeremiah_at_ora-600.net>
Date: Fri, 18 Aug 2006 16:38:00 -0700
Message-ID: <01a901c6c31f$582acbc0$6c01a8c0@flbp7000a>


Anjo,

I guess I realize I could set shmmax high and get a single segment, but I want my program to work on any old Oracle instance, not just one I set up special for it.

Are you saying that because segments can be noncontiguous, you have to count the space between segments where there is no segment allocated when you are counting up from the SGA base address to the address of the object you are seeking?

In my case the segments are noncontiguous. There are big gaps between each segment according to oradebug IPC. If I count space between segments, then the supposed location of session waits falls in the last segment. I'll play around and see what I find. Any hints are welcome.

Is there a better (more programmatic way) to map the segments' base addresses and sizes other than looking at the trace file from oradebug ipc?

Thanks,

Jeremiah Wilton
ORA-600 Consulting
http://www.ora-600.net



From: akolk_at_oraperf.com [mailto:akolk_at_oraperf.com] On Behalf Of Anjo Kolk

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.

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Aug 18 2006 - 18:38:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US