onstat -g mem command: Print pool memory statistics

Use the onstat -g mem command to display the memory statistics for a pool.

If you run an SQL query that allocates memory from the PER_STMT_EXEC and PER_STMT_PREP memory duration pools, the onstat -g mem command displays information about the PRP.sessionid.threadid pool and the EXE.sessionid.threadid pool.

Figure 1: Syntax:

1  onstat   -g mem?  pool name session id

Session pools are named with the session number. If no argument is provided, information about all pools is displayed.

Example output

Figure 2: onstat -g mem command output
Pool Summary:
name               addr             totalsize freesize #allocfrag #freefrag
resident     R     10a001028        2420736   7960     2          2
res-buff     R     10a250028        8269824   7960     2          2
global       V     10aac0028        9351168   32648    650        11
...
...
...
onmode_mon   V     10b983028        20480     2752     108        1
13           V     10bd5d028        16384     5200     12         2
Blkpool Summary:
name               addr             size      #blks      pre-hint   szavail|
global       V     10aac8920        0         0          0          0
xmf_msc_pl   V     10ac84ca0        954368    73         0          0

Output description

Pool Summary
name
Pool name
Shared memory segment type where the pool is created
addr
Pool memory address
totalsize
Pool size, in bytes
freesize
Free memory in pool
#allocfrag
Allocated fragments in pool
#freefrag
Free fragments in pool
Blkpool Summary
name
Pool name
Shared memory segment type where pool is created
addr
Pool memory address
size
Pool size, in bytes
#blks
Number of blocks in pool