Hello ,
I would like to know how to check if a given process id belongs to particualr shared memory segment .
Please help
Thanks in advance
Hello ,
I would like to know how to check if a given process id belongs to particualr shared memory segment .
Please help
Thanks in advance
A shared memory segment is not owned by a process but rather is pinned in memory and is owned by a user / group. Multiple processes can access the shared memory segments with the right credentials. You can check the segment and who owns them by typing:
ipcs -ma
as user root.
I realized that the CPID is the creator process id and from there I could
trace all the active processes that are accessing a particular shared memory segment.
I see... I would tend to think that from a process' perspective it is not relevant who the CPID is. To find out who are using a shared memory segment I would look at the processes and see what regions they have mapped using a utility like e.g. pmap and/or perhaps info in /proc/pid if you are on a linux system.