Operating System - HP-UX
1752790 Members
6333 Online
108789 Solutions
New Discussion юеВ

Programmatically obtaining kernel metric info..

 
David Gourley
Occasional Contributor

Programmatically obtaining kernel metric info..

Does anyone know any mechanism to obtain some of the more interesting Glance style metrics programmatically?

For example, I know that data equivalent to many of the metrics can be obtained from the pstat* APIs. However there are a number of really interesting metrics which I can't see corresponding pstat APIs to, e.g. GBL_PRI_QUEUE, GBL_CPU_CSWITCH_UTIL (and a number of others related to queue size on particular kernel resources). From reading HP-UX 11i Tuning and Performance, it appears that there are a number of non-idle activities which may show up as idle time with the simpler APIs - is there any way to find out how much *useful* CPU time is used without loading Glance?

There are issues with Glance's footprint for the particular problem I'm investigating.
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Programmatically obtaining kernel metric info..

I am attaching some sar based data collection scripts. They may work for you.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Mark Greene_1
Honored Contributor

Re: Programmatically obtaining kernel metric info..

"is there any way to find out how much *useful* CPU time is used without loading Glance"

Try top -f [filename] -d [count]

where "filename" is where you want the output saved, and "count" is the number of iterations.

mark
the future will be a lot like now, only later
David Gourley
Occasional Contributor

Re: Programmatically obtaining kernel metric info..

A bit more investigation: top / ps / sar all use the pstat APIs. Glance appears to use the kernel instrumentation APIs defined in ki.h (but documentation on these appears to be sketchy at best).