Kbase P152270: How can I identify and remove shared memory segments that were allocated for a database that is no l
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  2/22/2010 |
|
Status: Verified
GOAL:
How can I identify and remove shared memory segments that were allocated for a database that is no longer running or online?
GOAL:
How do I determine what processes are attached to a shared memory segment on AIX?
GOAL:
How can I find out what processes are still attached to a OpenEdge database's shared memory segment(s) on AIX?
FACT(s) (Environment):
IBM AIX
OpenEdge 10.x
FIX:
The first step is to determine the shared memory segment ID numbers in use by all active OpenEdge databases. For each database, run the command: promon <database name> and then enter the following screen menu options:
R&D, 1. Status Displays, 14. Shared Memory Segments
This will list out the shared memory segment ID's in use for each database.
To find out if there are still shared memory segments allocated for an OpenEdge database that is no long online or running, you will need to use a process of elimination.
First, use promon with each database as shown above, to list the shared memory segment ID's for all active databases.
Second, run the command: proutil -C dbipcs to list out all the shared memory segments in use by all OpenEdge databases.
Lastly, compare the two lists to determine which segments are not associated with actively running databases.
If there are shared memory segments active that are not associated with an actively running database, then there is likely at least one active process attached to that shared memory segment. Using the ipcrm -m <segment id> command may not remove the segment if there are processes still attached to it. It is possible that there could be self serve client processes still attached to those shared memory segments. You will first need to identify and terminate those processes before trying to remove the shared memory segment:
Run the command: ipcrm -mS to get a list of all the active shared memory segment ID's and the virtual memory manager (VMM) segment ID (SID) associated with each segment.
Run the command: svmon -S <SID> -l to list all processes that are still attached to that shared memory segment. (Note that svmon is an AIX specific utility)
Terminate those processes by issuing a kill command: kill -15 <PID> . If signal 15 does not terminate the process, try signal 1 next, and if that still does not work, try signal 2.
Once all processes attached to a shared memory segment have been terminated, you can then use the command: ipcrm -m <shared memory segment ID> to remove the shared memory segment if it still exists. It may have already been removed when the last process attached to it terminated.