My Oracle Support Banner

Grid Control Agent Performance: Enabling 'Monitor in Memory Access Mode' For Target Database Results in High Shared Memory Segments (Doc ID 565569.1)

Last updated on FEBRUARY 22, 2019

Applies to:

Enterprise Manager Base Platform - Version to [Release 10.2 to 11.1]
Information in this document applies to any platform.


The shared memory segments allocated by the Agent process is found to be high. It is also seen that these shared memory segments are not released even after the Agent is shutdown.
Steps to verify:

+  Execute the following:

cd <AGENT_HOME>/bin
emctl status agent
Oracle Enterprise Manager 10g Release 5 Grid Control
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Agent Version :
OMS Version :
Protocol Version :
Agent Home : /../oracle/gc102/agent10g
Agent binaries : /../oracle/gc102/agent10g
Agent Process ID : 21719
Parent Process ID : 21701
Agent URL : https://agentmachine.domain:<PORT>/emd/main/
Repository URL : https://omsmachine.domain:<PORT>/em/upload
Started at : 2010-10-13 16:53:27
Started by user : em
Last Reload : 2010-10-13 16:53:27
Last successful upload : 2010-10-14 09:04:29
Total Megabytes of XML files uploaded so far : 34.82
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0.00
Available disk space on upload filesystem : 84.67%
Last successful heartbeat to OMS : 2010-10-14 09:06:52
Agent is Running and Ready

- In the output, identify the following:

Agent Process ID: 21719
Started by user: em

+  Login to the machine as root user and  execute:

ipcs -mp |grep <OS user who has installed / started the Grid Agent process>

For example:

# ipcs -mp |grep em
------ Shared Memory Creator/Last-op --------
688144 em 21547 23126
1081367 em 14700 21719

- The pid: 23126 is related to the nmccollector:

$ ps -ef |grep 23126
$ em 23126 23115 0 16:54 ? 00:00:01 ./nmccollector DSGA (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=agentmachine.domain)(Port=<PORT>))( CONNECT_DATA=(SID=<SID>))) <AGENT_HOME>/<HOSTNAME_SID>/sysman/log/ <AGENT_HOME>/<HOSTNAME_SID>/sysman/log/ <AGENT_HOME>/mesg/

- Checking the parent process id for the above shows this is started by the script in the Agent home:

$ ps -ef| grep 23115
em 23115 1 0 16:54 ? 00:00:00 <AGENT_HOME>/perl/bin/perl  <AGENT_HOME>/sysman/admin/scripts/db/ DSGA (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=agentmachine.domain)(Port=<PORT>))(CONNECT_DATA=(SID=<SID>))) <HOSTNAME> <PORT> <SID> /..../oracle/databases/11.1.0/db_1 /home/em/oracle/databases/11.1.0/db_1/<HOSTNAME_SID>/sysman/log resume

- The number of shared memory segments allocated to pid: 23126 do not reduce even if the Agent is stopped:

$ cd <AGENT_HOME>/bin
$ emctl stop agent
$ ps -ef  |grep emagent

# ipcs -mp |grep em
------ Shared Memory Creator/Last-op --------
688144 em 21547 23126


"Monitor in Memory Access Mode" was enabled for one of the target Databases monitored by this Agent. The Database name can be seen in the ps output for the nmccollector process: (SID=<SID>)))

The feature can be enabled by logging into the Grid Console and navigating to Targets -> Databases -> Click on the Database name -> Performance -> Under the 'Related Links' section, click on 'Monitor in Memory Access Mode'.
In the next page, click the 'Enable Memory Access Mode' button to enable the feature.

In Memory Access Mode, performance statistics are retrieved directly from the Shared Global Area (SGA) using optimized/lightweight system-level calls as an alternative to SQL. Memory Access mode avoids the computation associated with parsing and executing SQL statements, thereby making it ideal for severe cases of library cache contention that can prevent the instance from being monitored in SQL Mode. You should switch to Memory Access Mode for slow or hung systems.

Pages in Memory Access Mode contain data sampled at a higher frequency than pages in SQL Mode. (Charts may appear to be slightly different from SQL mode for this reason.) Consequently, Enterprise Manager provides better information about where events begin and end, and can also handle short-duration events that might otherwise be missed.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.