-- Demo case: How to identify which SHM segment is used by an Oracle instance -- Date: 13-05-2019 -- Demo case run with Oracle version: 12.2.0.1 & 18.3.0.0.180717 -- List of Oracle instances on one host [root@OEL ~]# ps -ef | grep -i lgwr oracle 6137 1 0 19:03 ? 00:00:00 ora_lgwr_T122DB oracle 6540 1 0 19:03 ? 00:00:00 ora_lgwr_T183DB -- List of all SHM segments [root@OEL ~]# ipcs -m ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x00000000 360448 oracle 600 4096 0 0x00000000 393217 oracle 600 4096 0 0x00000000 425986 oracle 600 4096 0 0x00000000 458755 oracle 600 4096 0 0x00000000 491524 oracle 600 4096 0 0xceb4cad8 524293 oracle 600 12288 50 0x00000000 557062 oracle 600 8663040 100 0x00000000 589831 oracle 600 2919235584 50 0x00000000 622600 oracle 600 8114176 50 0xedd61d60 655369 oracle 600 16384 50 -- Identify SHM segments related to instance T122DB T122DB [oracle@OEL ~]$ sysresv -l T122DB IPC Resources for ORACLE_SID "T122DB" : Maximum shared memory segment size (shmmax): 4398046511104 bytes Total system shared memory (shmall): 17592186044416 bytes Total system shared memory count (shmmni): 4096 *********************** Dumping ipcs output ******************** ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x00000000 360448 oracle 600 4096 0 0x00000000 393217 oracle 600 4096 0 0x00000000 425986 oracle 600 4096 0 0x00000000 458755 oracle 600 4096 0 0x00000000 491524 oracle 600 4096 0 0xceb4cad8 524293 oracle 600 12288 53 0x00000000 557062 oracle 600 8663040 100 0x00000000 589831 oracle 600 2919235584 50 0x00000000 622600 oracle 600 8114176 50 0xedd61d60 655369 oracle 600 16384 50 ------ Semaphore Arrays -------- key semid owner perms nsems 0xde4e6e28 720898 oracle 600 152 0xde4e6e29 753667 oracle 600 152 0xde4e6e2a 786436 oracle 600 152 0xcbc477a0 917509 oracle 600 250 0xcbc477a1 950278 oracle 600 250 ------ Message Queues -------- key msqid owner perms used-bytes messages *********************** End of ipcs command dump ************** ***************** Dumping Resource Limits(s/h) ***************** core file size 0 KB/UNLIMITED data seg size UNLIMITED/UNLIMITED scheduling priority 0 KB/0 KB file size UNLIMITED/UNLIMITED pending signals 44 KB/44 KB max locked memory 128 GB/128 GB max memory size UNLIMITED/UNLIMITED open files 64 KB/64 KB POSIX message queues 800 KB/800 KB real-time priority 0 KB/0 KB stack size 32 MB/32 MB cpu time UNLIMITED/UNLIMITED max user processes 16 KB/16 KB virtual memory UNLIMITED/UNLIMITED file locks UNLIMITED/UNLIMITED ***************** End of Resource Limits Dump ****************** Maximum map count configured per process: 65530 Total /dev/shm size: 1140850688 bytes, used: 956301312 bytes Shared Memory: ID KEY 393217 0x00000000 425986 0x00000000 458755 0x00000000 491524 0x00000000 360448 0x00000000 524293 0xceb4cad8 Semaphores: ID KEY 720898 0xde4e6e28 753667 0xde4e6e29 786436 0xde4e6e2a Oracle Instance alive for sid "T122DB" -- Identify SHM segments related to instance T183DB T183DB [oracle@OEL ~]$ sysresv -l T183DB IPC Resources for ORACLE_SID "T183DB" : Maximum shared memory segment size (shmmax): 4398046511104 bytes Total system shared memory (shmall): 17592186044416 bytes Total system shared memory count (shmmni): 4096 *********************** Dumping ipcs output ******************** ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x00000000 360448 oracle 600 4096 0 0x00000000 393217 oracle 600 4096 0 0x00000000 425986 oracle 600 4096 0 0x00000000 458755 oracle 600 4096 0 0x00000000 491524 oracle 600 4096 0 0xceb4cad8 524293 oracle 600 12288 50 0x00000000 557062 oracle 600 8663040 101 0x00000000 589831 oracle 600 2919235584 51 0x00000000 622600 oracle 600 8114176 51 0xedd61d60 655369 oracle 600 16384 51 ------ Semaphore Arrays -------- key semid owner perms nsems 0xde4e6e28 720898 oracle 600 152 0xde4e6e29 753667 oracle 600 152 0xde4e6e2a 786436 oracle 600 152 0xcbc477a0 917509 oracle 600 250 0xcbc477a1 950278 oracle 600 250 ------ Message Queues -------- key msqid owner perms used-bytes messages *********************** End of ipcs command dump ************** ***************** Dumping Resource Limits(s/h) ***************** core file size 0 KB/UNLIMITED data seg size UNLIMITED/UNLIMITED scheduling priority 0 KB/0 KB file size UNLIMITED/UNLIMITED pending signals 44 KB/44 KB max locked memory 128 GB/128 GB max memory size UNLIMITED/UNLIMITED open files 64 KB/64 KB POSIX message queues 800 KB/800 KB real-time priority 0 KB/0 KB stack size 32 MB/32 MB cpu time UNLIMITED/UNLIMITED max user processes 16 KB/16 KB virtual memory UNLIMITED/UNLIMITED file locks UNLIMITED/UNLIMITED ***************** End of Resource Limits Dump ****************** Maximum map count configured per process: 65530 Total /dev/shm size: 1140850688 bytes, used: 956301312 bytes Shared Memory: ID KEY 589831 0x00000000 622600 0x00000000 557062 0x00000000 655369 0xedd61d60 Semaphores: ID KEY 917509 0xcbc477a0 950278 0xcbc477a1 Oracle Instance alive for sid "T183DB"