对ORACLE的SGA 进行检查,有以下脚本来实现[@more@]
SQL> compute sum of bytes on pool
SQL> break on pool skip 1
SQL> select pool ,name ,round(bytes/1024,2)bytes from v$sgastat order by pool ,name;
POOL NAME BYTES
----------- -------------------------- ----------
large pool free memory 16777216
*********** ----------
sum 16777216
shared pool 1M buffer 2098176
Checkpoint queue 1026560
FileOpenBlock 3796104
KGK heap 7000
KGLS heap 3702624
KQR L PO 1902568
KQR L SO 143368
POOL NAME BYTES
----------- -------------------------- ----------
shared pool KQR M PO 2070968
KQR M SO 34368
KQR S SO 9264
KSXR pending messages que 853952
KSXR receive buffers 1034000
MTTR advisory 119768
PL/SQL DIANA 873384
PL/SQL MPCODE 1078920
PL/SQL PPCODE 73872
PL/SQL SOURCE 11880
PLS non-lib hp 2088
POOL NAME BYTES
----------- -------------------------- ----------
shared pool dictionary cache 3229952
enqueue 936920
errors 232592
event statistics per sess 6247080
fixed allocation callback 552
free memory 8866232
joxs heap init 4240
library cache 32397512
miscellaneous 23812304
parameters 79280
sessions 1500720
POOL NAME BYTES
----------- -------------------------- ----------
shared pool sim memory hea 355632
sql area 70248448
table definiti 5872
transaction 1013320
trigger defini 544
trigger inform 1592
trigger source 504
*********** ----------
sum 167772160
buffer_cache 419430400
POOL NAME BYTES
----------- -------------------------- ----------
fixed_sga 732072
log_buffer 787456
*********** ----------
sum 420949928
40 rows selected.