Monitor session memory with onstat -g mem and onstat -g stm output
Use the onstat -g mem and onstat -g stm commands to obtain information about the memory used for each session.
You can determine which session to focus on by the used memory column of the onstat -g ses output.
onstat
-g mem and onstat -g stm to determine
session memory shows sample onstat
-g ses output and some of the onstat -g mem and onstat
-g stm output for Session 16.
- The output of the onstat -g mem command shows
the total amount of memory used by each session.
The totalsize column of the onstat -g mem 16 output shows the total amount of memory allocated to the session.
- The output of the onstat -g stm command shows
the portion of the total memory allocated to the current prepared SQL statement.
The heapsz column of the onstat -g stm 16 output in the following figure shows the amount of memory allocated for the current prepared SQL statement.