Operating System - HP-UX
1836746 Members
2752 Online
110109 Solutions
New Discussion

Need to monitor the shared memory usage

 
Nilesh_13
New Member

Need to monitor the shared memory usage

Hi All,

I need to monitor the usage of Shared Memory on a HPUX 11i server so that whenever the shared memory needs a clean up, I can send an alarm email to myself through a script.

Thanks for any inputs on how to do this.

Regards,
Nilesh
3 REPLIES 3
harry d brown jr
Honored Contributor

Re: Need to monitor the shared memory usage

http://managementsoftware.hp.com/products/gplus/download.html

live free or die
harry d brown jr
Live Free or Die
RAC_1
Honored Contributor

Re: Need to monitor the shared memory usage

There is shminfo tool. Also you can also use output from ipcs -moba

Anil
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: Need to monitor the shared memory usage

Essentially, all you have to do is cron an ipcs -moba command that uses Perl or awk to look at the NATTCH columns and the DTIME columns. Candidates foe POSSIBLE removal would have NATTCH = 0 and (current_time - DTIME) > some_defined_period. You are wise to simply email yourself rather than automatically calling ipcrm because while NATTCH = 0 is a necessary condition, it may not be a sufficient condition. It's not at all uncommon for an application to setup a shared memory segment and then detach itself and terminate. Other processes then might attach later and detach themselves but if the shared memory segment doesn't exist, the application would crash. You have to know your applications to be able to safely remove SHMID's.
If it ain't broke, I can fix that.