Operating System - HP-UX
1832891 Members
1928 Online
110048 Solutions
New Discussion

How do you monitor shared memory and semaphores?

 
SOLVED
Go to solution
mike worrell
Regular Advisor

How do you monitor shared memory and semaphores?

Good Morning,
We are having problems with one of our thirdparty software packages for document management, the vendor has asked that we monitor our semaphores and shared memory.
What commands do I need to execute to do this?
Thanks and have a great day?
Mike
7 REPLIES 7
Solution

Re: How do you monitor shared memory and semaphores?

Take a look at

sar -m

and

ipcs -a

There's also info on this in glance if you have it installed.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Martin Burnett_2
Trusted Contributor

Re: How do you monitor shared memory and semaphores?

Hello Mike,

You can use the ipcs command for this prupose:

ipcs -sob OR
ipcs -ca

See the man page for ipcs and exact options for what you want to see but the -sob is probably what you want.

The knowledge base has many articles on this and other performance issues.
Sandip Ghosh
Honored Contributor

Re: How do you monitor shared memory and semaphores?

You can get it through gpm (glance GUI version).

Sandip
Good Luck!!!
Roger Baptiste
Honored Contributor

Re: How do you monitor shared memory and semaphores?

Mike,

Run ipcs -a in a cron job at periodic intervals.

for eg: A shell script: /usr/local/bin/check_ipcs

can contain

date >>/var/adm/syslog/ipcs.out
/usr/sbin/ipcs -a >>/var/adm/syslog/ipcs.out
echo "______________" >>/var/adm/syslog/ipcs.out

Then include it in cron with

15 * * * /usr/local/bin/check_ipcs
to run every 15 minutes.

Whenever you want to look at the shared memory/semaphores usage history, just look
at the ipcs.out file!

You can also include options in ipcs to get specific items, like ipcs -am , ipcs -as .

Check man ipcs for more info.

The same info can be got through glance in real time and Measureware/perfview on historical usage.

HTH
raj
Take it easy.
Bill Hassell
Honored Contributor

Re: How do you monitor shared memory and semaphores?

Wile ipcs will give some specifc shared memory uses, it will not show all the fragmentation caused by other uses of this memory area. Get a copy of shminfo from:

ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin/programs/shminfo/

Note: ftp:// and not http://


Bill Hassell, sysadmin
mike worrell
Regular Advisor

Re: How do you monitor shared memory and semaphores?

Thanks to all that replied. I was able to get
the info I needed using info you each gave me.

Have a great day
Mike
harry d brown jr
Honored Contributor

Re: How do you monitor shared memory and semaphores?