Operating System - HP-UX
1832906 Members
2708 Online
110048 Solutions
New Discussion

Re: function libraries for gathering system resource usage?

 
SOLVED
Go to solution
Kevin Lister
Frequent Advisor

function libraries for gathering system resource usage?

Hi Gang,

I'm looking for info on the function libraries that are used to collect data on system resource usage. I'm specifically looking for info on stuff like cpu usage, paging, network usage, etc.

Yes, I am familiar with all of the various utilities like sar, vmstat, swapinfo, iostat, netstat, uptime, etc. These will not work for my needs as they are too slow.

I would be very grateful if you could point me in the right direction.

thanks,

kev
9 REPLIES 9
Dennis Handly
Acclaimed Contributor
Solution

Re: function libraries for gathering system resource usage?

I assume this is all secret undocumented info, part of the measurement interface. You might have to join DSPP to get it.

>These will not work for my needs as they are too slow.

You might want to explain them?

Kevin Lister
Frequent Advisor

Re: function libraries for gathering system resource usage?

What is DSPP?
James R. Ferguson
Acclaimed Contributor

Re: function libraries for gathering system resource usage?

Hi Kevin:

> What is DSPP?

http://h21007.www2.hp.com/portal/site/dspp

...which Google would have found :-)

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: function libraries for gathering system resource usage?

>What is DSPP?

Developer & Solution Partner Program
A permanent URL: http://www.hp.com/go/dspp
Kevin Lister
Frequent Advisor

Re: function libraries for gathering system resource usage?

Hi Gang,

Happy New Year to you all!

I appreciate all of the replies so far and it looks like the pstat() interface is what I'm looking for.

I've looked at the man pages, and the .h files, and the examples and I've gotten most of my stuff working at this point.

I am still working on one final piece: obtaining the cpu usage. From the interface it looks as though one must collect the cpu usage of each currently active process and then add it up. Does that make sense or am I totally clueless?

kev
James R. Ferguson
Acclaimed Contributor

Re: function libraries for gathering system resource usage?

Hi Kevin:

In the event that you haven't seen this, here it is:

http://docs.hp.com/en/1216/pstat_whitepaper.pdf

I had forgotten, and the whitepaper suggests, that you fetch the source code for 'lsof' as a guide to probing interesting things!

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.81/

Regards!

...JRF...
Kevin Lister
Frequent Advisor

Re: function libraries for gathering system resource usage?

Ah, yes. I did wee the white paper and it's very good. It does appear that the man page was written from the white paper. I downloaded the source for lsof and top and I'm looking them over. They are somewhat complicated and will take time to absorb. I thought I would simply compile and play with Example 3 from the white paper. I managed to get it to compile but it coredumps. So, I removed the reference to pst_ucomm and it compiles and runs but does not work properly. All I get in the output is info on PID 2. So, something isn't quite right.

Thanks for the info! ;o)

kev
James R. Ferguson
Acclaimed Contributor

Re: function libraries for gathering system resource usage?

Hi (again) Kevin:

Please don't forget to evaulate the answers to this and your previous question about 'adb' and performance probes:

http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1300895

http://forums13.itrc.hp.com/service/forums/helptips.do?#28

Happy New Year!

...JRF...
Kevin Lister
Frequent Advisor

Re: function libraries for gathering system resource usage?

Ok, I'll assign points when the thread is done.

Thanks for the reminder!

kev