Re: get all shared memory segments



My apologies that I can't give you a straight forward answer. I never
employed too much shared memory in my codes. But I can tell you how to
find out what you need to know.. do an 'nm' or 'dump -Tv' on the ipcs
command. That will tell you all the library functions ipcs calls, all
the system calls ipcs does. Then read publib on those calls and you
should be able to find your way out.

Thanks and regards,
Rajbir Bhattacharjee

upsa wrote:
0xDEADABE wrote:
Lőrinczy Zsigmond wrote:
upsa wrote:
Hello,

how can i get all shared memory segments on aix5 using c++?

I can use shmget(),shmat(),shmdt() and other functions only if i know
shmid of shared memory. But i can't get list of shmid for all shared
memory segments in system.

Do AIX have command ipcs(8) like linux? If so use command "ipcs -m".

It does. "ipcs -m" will work.

I'm sorry, guys. I need to get shared memory segments by using c\c++
language. So, i need to know which functions i should use to get list
of all shared memory segments in AIX system.

Thanks.

.



Relevant Pages

  • Re: IPCS problem
    ... I dont know what i have done, this is first time im using the command, ... in another aix box its showing the shared memory detials. ... if restart is only solution to solve the problem, ... IPCs on the one you see, then you can tell what isn't running on the ...
    (comp.unix.aix)
  • Re: X error: BadAccess (attempt to access private resource denied)
    ... John Groenveld wrote: ... Is your system running out of shared memory? ... Here's a script that cleans up unused shared memory segments: ... ipcs -mp: ...
    (comp.unix.solaris)
  • Re: How to find out the processes attached to a shared memory?
    ... attached to a shared memory. ... # ipcs format is platform dependent: ... echo ipcrm -m "$id" ...
    (comp.unix.solaris)
  • Re: "System V IPC is a botch?"
    ... > immediately used to access a message queue, semaphore set, or shared memory ... same folks who gave us the /proc filesystem. ... By "POSIX shared memory" I was referring specifically to mmap, ... It would be nice if both IPCs allowed you to associate an FD with the ...
    (comp.unix.programmer)
  • Re: Solaris2.6 Shared memory problem.
    ... > Message Queue facility not in system. ... > Shared Memory facility not in system. ... What you're seeing there is ipcs reporting that the shared memory (also ... forceload: sys/shmsys ...
    (comp.unix.solaris)