Useful memory info for Oracle on Solaris

Total memory on the server

The total amount of memory available on the server can be determined via:

/usr/sbin/prtconf | grep "Memory size"

Memory size: 65536 Megabytes

Free memory on the server

The amount of free memory available on the server can be determined by looking at the "free" column in the output from vmstat. Note that this value is output in Kilobytes.

vmstat

kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr s7 s8 s9 s1 in sy cs us sy id
0 1 0 43268872 27164256 141 540 1454 29 28 0 0 0 0 0 0 257 310 429 10 25 65

Shared Memory - Used

The ipcs command can be used to display the details of all shared memory segments currently allocated. To display all the shared memory allocated to oracle:

ipcs -mb | grep 'oracle'

T ID KEY MODE OWNER GROUP SEGSZ
m 42416 0x5511e130 --rw-r----- oracle dba 155189248
m 26017 0x124fb5e0 --rw-r----- oracle dba 27492352
m 25818 0x83df1294 --rw-r----- oracle dba 247463936
m 9219 0xfc994430 --rw-r----- oracle dba 222298112
m 29820 0xc34b1fcc --rw-r----- oracle dba 281018368
m 54021 0xf2185130 --rw-r----- oracle dba 415236096
m 23822 0x405b262c --rw-r----- oracle dba 264241152
m 11423 0x6cd32be4 --rw-r----- oracle dba 134217728
m 32624 0x6f285790 --rw-r----- oracle dba 239075328
m 34025 0x82348344 --rw-r----- oracle dba 692060160
m 31426 0x6a151e28 --rw-r----- oracle dba 138412032

Together with a simple awk command, we can sum the last column to determine the total amount of shared memory allocated to the oracle user.

ipcs -mb | grep oracle | awk '{ sum+=$7 } END { print sum/1024/1024" GBs"}'

21102.6 GBs

Or, to determien the total amount of shared memory allocated on the server:

ipcs -mb | awk '{ sum+=$7 } END { print sum/1024/1024" GBs"}'

21098.7 GBs