This is a discussion on get all shared memory segments within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hello, how can i get all shared memory segments on aix5 using c++? I can use shmget(),shmat(),shmdt() and other ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. Thanks. |
| |||
| 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". |
| |||
| 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. |
| |||
| 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. |
| |||
| 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. |
| |||
| My VPN is down. I can't connect to my pet AIX machines. I'll find out the necessary calls tomorrow and let you know... Thanks and regards, Rajbir Bhattacharjee rajbir wrote: > 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. |
| |||
| upsa wrote: >>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. There might be some non-standard and non-documented way to acchive this (perhaps via special files of /proc), but the usual and portable way is calling popen ("ipcs -m", "r"); |
| ||||
| Lorinczy Zsigmond wrote: > upsa wrote: > > >>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. > > There might be some non-standard and non-documented way to acchive this > (perhaps via special files of /proc), but the usual and portable way > is calling popen ("ipcs -m", "r"); Thank you and rajbir for answers. I investigated ipcs early and found that it uses /dev/mem interface. On linux and hp-ux system i found how to get list of shared memory segments using api calls. So, i thinked that i can do the same thing on aix but it's not so. Probably using popen() will be the best way. Thanks. |
| Thread Tools | |
| Display Modes | |
|
|