Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: shared memory identification
Pardon for the last blank messages ( I need a real newsreader!)
On v8
svrmgrl> connect internal svrmgrl> oradebug setmypid svrmgrl> oradebug ipc
v7
od -X $ORACLE_HOME/dbs/sgadef${ORACLE_SID}.dbf
this will give you the shmids of that SID. The first # is the # of
shared memory segments. Skip a byte and then you have the addresses of
the shared memory segments, continue reading until you hit all bytes of
all FFs. When this ends you have the shmids. You can correlate this
info using ipcs.
Example structure:
# OFFSET=2
# ---------------------------------------------------------------------
# | start_pos | end_pos | values
# ---------------------|-------------------|---------------------------
# | 1 | 1 | num of shared mem segs
# | OFFSET | OFFSET | ?
# | (OFFSET+1) | (OFFSET)+( SEGS) | (1) address of shared mem
segs
# | (OFFSET+1)+( SEGS)| (OFFSET)+(2*SEGS) | (2) sizes of shared mem
segs
# | (OFFSET+1)+(2*SEGS)| (OFFSET)+(3*SEGS) | (3) id of shared mem segs
# | (OFFSET+1)+(3*SEGS)| end of file | process - semaphore info
# ----------------------------------------------------------------------
#
# if you don't know the SEGS (max shared segs allowed) for the platform
version
# you can generaly tell the number by looking at the sgadef with od -X
# (1) is initialized to FFFFFFFF (value if slot not used)
# (2) is initialized to 00000000 (value if slot not used)
# (3) is initialized to FFFFFFFF (value if slot not used)
# so all the slots that are unused will have either 00000000 or FFFFFFFF
# by counting to the last position for (3) substracting the OFFSET and
# dividing by 3 you have max shared segs allowed - the value of SEG
The sige of SEGS depends on the platform and version. Typical values are 1, 25, 20, 32, 100
For example, Solaris was 20 in 7.3.3 and 100 before that.
Best
Kyle Hailey
Sent via Deja.com
http://www.deja.com/
Received on Mon Feb 05 2001 - 17:28:47 CST