Operating System - HP-UX
1832312 Members
2147 Online
110041 Solutions
New Discussion

Re: How to see semaphore status currently?

 
Scott Chapman
New Member

How to see semaphore status currently?

I have a situation where one of the semaphore resources are fully utilized and software needing semaphores (semaphore undo structures specifically) is bombing on HPUX 10.20. Is there a utility to show me what all of the semaphore structures are in use beyond ipcs -as?
5 REPLIES 5
ramesh_6
Frequent Advisor

Re: How to see semaphore status currently?

Hi Scott,

You can use the /usr/sbin/sydef to display the kernel parameters of which semaphores in also one.

Sydef analyzes teh currently running system and reports and reports on its tunable parameters.
A. Clay Stephenson
Acclaimed Contributor

Re: How to see semaphore status currently?

Hi:

If you know Perl, then you can use the IPC::Semaphore module to look at any semaphore values. About 20 lines of Perl in this case would replace 250 or so lines of C to do the same thing.
If it ain't broke, I can fix that.
Jeff Schussele
Honored Contributor

Re: How to see semaphore status currently?

Hi Scott,

The sar util (sar -m) will give semaphore usage in calls per second & you could set it up to create a file over time to get some historical usage data.
Also I believe you can get more detailed info from the lsof utility.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sandip Ghosh
Honored Contributor

Re: How to see semaphore status currently?

You can get it through gpm (glance). Run gpm go to report ->System info ->System Tables Report.

Sandip
Good Luck!!!
Michael Tully
Honored Contributor

Re: How to see semaphore status currently?

If you don't have access to the GUI of glance
here's how to get the information.

# /opt/perf/bin/glance

Once the screen is open:
F5 (NextKeys)
F3 (SysTabls)
This will show something like this:

SYSTEM TABLES REPORT Users= 9

System Table Available Used Utilization High(%)
--------------------------------------------------------------------------------
Proc Table (nproc) 8212 259 3 3
File Table (nfile) 20989 3863 18 18
Shared Mem Table (shmmni) 1024 25 2 2
Message Table (msgmni) 1024 46 4 4
Semaphore Table (semmni) 8192 34 0 0
File Locks (nflocks) 800 33 4 4
Pseudo Terminals (npty) 1024 0 0 0
Buffer Headers (nbuf) na 70176 na na

If you don't have glance loaded, there is a trial version that you ca load from your application CD set.

-Michael
Anyone for a Mutiny ?