3.41 TopMemoryUsers

Use this Knowledge Script to monitor memory utilization (User Global Area and Program Global Area) for current user sessions. If the memory utilization exceeds the threshold, the job raises an event.

You can specify the number of user sessions with the highest memory usage to display in the Event Properties dialog box. Information in the Event Properties dialog box includes the memory in bytes for each session, username, session ID, and program name. Enter 0 for the Number of top user sessions to display parameter if you want to include memory utilization statistics for all user sessions in the event details.

The account you use to run this script must have SELECT permissions for the following tables:

DBA_USERS
V_$SESSION
V_$SESSTAT
V_$STATNAME
V_$VERSION

3.41.1 Resource Objects

Oracle Database folders. When you drop a script on an Oracle Database folder, a job executes on that database and monitors only that database.

3.41.2 Default Schedule

The default interval for this script is Every 30 minutes.

3.41.3 Setting Parameter Values

Set the following parameters as needed:

Description

How to Set It

Oracle Username

Enter the username that this script needs to access the target databases. If you run this script on more than one database, configure each database with the same username. To use SYSDBA authentication, leave this parameter blank. The default is blank.

Collect data for memory usage by top N user sessions?

Select Yes to collect data for charts and reports. When you enable data collection, the Knowledge Script returns the total memory usage (in MB) for the top N user sessions. You determine how many sessions are included in this total by setting the Number of top user sessions to display parameter. The default is unselected.

Number of user sessions to display

Specify the number of user sessions with the highest memory utilization that you want displayed in the event detail message. Enter 0 if you want to see information for all user sessions. The default is 15.

Raise event if threshold is exceeded?

Select Yes to raise an event if the total memory usage of any user session exceeds the threshold you set. The default is unselected.

Threshold - Maximum amount of memory for a user session

Enter a threshold for the maximum total memory usage (in MB) for any user session. The default is 10 MB.

Severity

Set the event severity level, from 1 to 40, to indicate the importance of the event. The default is 10 (red event indicator).

Event severity for internal failure

Set the event severity level, from 1 to 40, to indicate the importance of the event. The default is 5 (red event indicator).