Operating System - HP-UX
1835243 Members
2535 Online
110078 Solutions
New Discussion

Re: Resource utilization by ppid...

 
rudy smith_1
Occasional Advisor

Resource utilization by ppid...

I am currently trying to find a way to track server resource utilization by ppid. this is somewhat of a moving target as ppid's change frequently. has anyone attempted this before? is there a document or white paper that someone could refer me to.

any assistance would be greatly appreciated.
If all else fails...read the manual!
13 REPLIES 13
Ross Zubritski
Trusted Contributor

Re: Resource utilization by ppid...

Glance Plus is wonderful tool for this function.

Regards,


RZ
rudy smith_1
Occasional Advisor

Re: Resource utilization by ppid...

Yes, I have been looking at glance plus and actually have it running. However, I cant seem to find a manual that will provide me information on how to report on utilization by ppid. any suggestions on docs? i have already searched docs.hp.com.
If all else fails...read the manual!
Steven E. Protter
Exalted Contributor

Re: Resource utilization by ppid...

Couple of thoughts come to mind.

Attaching a general data collection script, that you might be able to modify to do what you want it to do.

I you have glance, you should be able to point and ckick your way through the process list, find the ppid and then track its resource use with pretty good detail.

Even if you don't have a glance license, you can actovate by running glance or gpm(in X Windows) it and use it on a 30 day trial.

some links to docs...
PRM Process Monitor.
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B8733-90001/B8733-90001_top.html&con=/hpux/onlinedocs/B8733-90001/00/00/9-con.html&toc=/hpux/onlinedocs/B8733-90001/00/00/9-toc.html&searchterms=utilization%7cresource&queryid=20030324-19809

getrusage...
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90682/B2355-90682_top.html&con=/hpux/onlinedocs/B2355-90682/00/00/71-con.html&toc=/hpux/onlinedocs/B2355-90682/00/00/71-toc.html&searchterms=utilization%7cresource&queryid=20030324-110009

Good luck.

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
Ross Zubritski
Trusted Contributor

Re: Resource utilization by ppid...

Read the glance man pages.

Regards,

RZ
rudy smith_1
Occasional Advisor

Re: Resource utilization by ppid...

Thanks for the responses. This forum is a great resource. I will pursue your suggestions.
If all else fails...read the manual!
Rita C Workman
Honored Contributor

Re: Resource utilization by ppid...

Measure Ware can provide extracting information on process utilization.
As was mentioned Glance is good for monitoring.

I guess I'm trying to figure out what your trying to find out.

Ex: We run an Oracle shop. Now I can get ppid on every oracle server process running (ora_s....) from the HPUX viewpoint, but it is only within Oracle that I could really track down to see what that ppid's query was that the user(s) was running. See my point. You may need to take the ppid and use some application tools (like the tools in Oracle) to determine what that ppid was doing.

That is if I am understanding what you are trying to ascertain.

Just a thought,
Rita
Michael Steele_2
Honored Contributor

Re: Resource utilization by ppid...

MeasureWare is great for this kind of thing. You'd probably be using the logproc or logappl logs. That's log process or log application.

And as indicated above, gpm or glance also is good. For example,

gpm / glance > reports > process list > select process >

And everything is listed right there for you.

User CPU Util Cum Disk Thd
Process Name PID PPID Pri Name ( 400% max) CPU IO Rate RSS Cnt
--------------------------------------------------------------------------------
glance 28638 28619 168 root 9.9/ 7.2 0.2 101/88.0 2.8mb 1
oracleastro 13171 1 154 oracle 0.0/ 0.0 12.6 0.0/ 0.0 28.5mb 1
ora_pmon_as 8163 1 156 oracle 0.0/ 0.0 16.2 0.0/ 0.0 36.8mb 1
Support Fatherhood - Stop Family Law
rudy smith_1
Occasional Advisor

Re: Resource utilization by ppid...

yes, i am actually using glance and gpm as well. what i am trying to do is capture cpu and memory utilization for a particular ppid for a given period of time. the problem is that this is currently a manual process i.e i have to physically monitor glance and gpm. i am trying to make this an automated process where i can simply pass the ppid to a script, tool etc. and have it log the data for me. i then want to be able to report off the data.
If all else fails...read the manual!
Michael Steele_2
Honored Contributor

Re: Resource utilization by ppid...

By invoking glance from a script with here docs you can redirect the output into an ascii file. This file can then be used for parsing your information. Something like:


#!/usr/bin/ksh
glance<p
EOF

-or-

glance -j 2 -adviser_only -syntax /tmp/adviser_sample >>process.log

See examples in:

/opt/perf/examples/adviser

grep or parse your ascii file now:

cat process.log | while read line
do
SUM=$(echo $line | awk '{ print $3 }')
done

TOTAL=$(($SUM+$TOTAL))
Support Fatherhood - Stop Family Law
Michael Steele_2
Honored Contributor

Re: Resource utilization by ppid...

Here's the glance advisor.
Support Fatherhood - Stop Family Law
rudy smith_1
Occasional Advisor

Re: Resource utilization by ppid...

what format is the advisor in?
If all else fails...read the manual!
Michael Steele_2
Honored Contributor

Re: Resource utilization by ppid...

Text with some garbage at the top.
Support Fatherhood - Stop Family Law
rudy smith_1
Occasional Advisor

Re: Resource utilization by ppid...

ah...so what i was seeing was the expected result. just verifying.

thank you
If all else fails...read the manual!