0

how to get exe or program file from shmid in linux ?
there are many shared memories running in the system. how to get program file or exe from shared memory segments and what are nattch and what does status specify ?

 Shared Memory Segments --------
    key        shmid      owner      perms      bytes      nattch     status      
    0x0052e2c1 0          postgres  600        39337984   10                      
    0x00000000 163841     root      600        393216     2          dest         
    0x00000000 196610     root      600        393216     2          dest         
    0x00000000 229379     root      600        393216     2          dest         
    0x00000000 262148     root      600        393216     2          dest         
    0x00000000 294917     root      600        393216     2          dest         
    0x00000000 327686     root      600        393216     2          dest         
    0x00000000 360455     root      600        393216     2          dest         
    0x00000000 393224     root      600        393216     2          dest         
    0x00000000 425993     gdm       600        393216     2          dest         
    0x00000000 458762     gdm       600        393216     2          dest         
    0xffffffff 491531     root      666        4          6                       
    0x7401e943 524300     root      666        27         4                       
zishan
  • 584
  • 1
  • 6
  • 12
  • 1
    Duplicate of http://stackoverflow.com/questions/5658568/how-to-list-processes-attached-to-a-shared-memory-segment-in-linux – HAL Sep 16 '13 at 06:50
  • Then, with the command grep 123456 /proc/*/maps, I see: /proc/3956/maps: blah blah blah 123456 /SYSV000000 (deleted) /proc/9999/maps: blah blah blah 123456 /SYSV000000 (deleted). is 3956,9999 are process id ? – zishan Sep 16 '13 at 09:09
  • Yes, `cpid` is the process that created the shared memory segment and `lpid` is the last process to attach or detach from the shared memory segment. – HAL Sep 16 '13 at 11:39

0 Answers0