Pages

How to find a process using the ipcs shared memory segment


Process id can be identified using lsof

# lsof | egrep "shmid"

# ipcs -m
------ Shared Memory Segments --------
key               shmid      owner      perms      bytes      nattch     status      
0x0052e2c1 4194319    postgres  600        11083776   2 

From the above output you gets the shmid

# lsof | egrep "4194319"
postmaste 15289  postgres  DEL       REG              0,9               4194319 /SYSV0052e2c1
postmaste 15293  postgres  DEL       REG              0,9               4194319 /SYSV0052e2c1


And as shown above, 15289 and 15293 are the process IDs.

No comments:

Post a Comment