pcp
[Top] [All Lists]

Re: getting the currently running process metrics

To: kenmcd@xxxxxxxxxxxxxxxxx
Subject: Re: getting the currently running process metrics
From: Madhu Sudhan R Tera <mst9696@xxxxxxxxxxx>
Date: Thu, 19 Jul 2001 00:03:47 -0500 (CDT)
Cc: pcp@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.21.0107112155430.8564-100000@xxxxxxxxxxxxxxxxxxx>
Sender: owner-pcp@xxxxxxxxxxx
Hello !
There is no metric that gives the per process percentage of CPU cycles
used.The "pminfo -dT proc.*" command (ofcourse not *).But i didnt find
the one i required.Can anyone suggest me a solution.
Thanks in advance..

Thank you,
With regards,           
MadhuSudhan Reddy Tera
              
 --------------------------------------------------
|Department of Computing and Information Sciences, |          
|Kansas State University,                          |
|Manhattan, KS 66502.                              |
|ph no:785-537-3276                                |
 --------------------------------------------------

On Wed, 11 Jul 2001 kenmcd@xxxxxxxxxxxxxxxxx wrote:

> On Fri, 6 Jul 2001, Madhu Sudhan R Tera wrote:
> 
> > Hello!
> > Thank you for your quick response.
> > 
> > As mentioned in my previous mail,i have recently installed PCP.
> > 
> > But is there a procedure to pass process ids and get the metrics
> > while writing a PMAPI??
> 
> You'll need pmLookupDesc(3) to get the instance domain number associated
> with the metrics you are interested in, and then pmGetInDom(3) and/or
> pmLookupInDom(3) to process the instance domain that encodes the
> process ids.  Then pmAddProfile(3) and pmDelProfile(3) to build/update a
> "profile".  And finally pmFetch(3) to actually do the work.
> 
> You can see an example of all of this in the source for pmval, e.g.
> the command
> 
>     $ pmval -i 920 proc.psinfo.utime
> 
> reports the user CPU time for process id 920.
> 
> To get some idea of the interaction between the client (pmval in this
> case) and pmcd below the PMAPI, use the PDU tracing option:
> 
>     $ pmval -i 920 -D pdu proc.psinfo.utime
> 
> > ... And what is this process.psinfo.stime and
> > others in pminfo command(As far as i understand its a namespace.Correct me
> > if i am wrong!)
> 
> I'm not going to explain them, that's the PMDA writer's job ... the -T option 
> to pminfo requests the
> help text for the named metrics, e.g.
> 
>     $ pminfo -T proc.psinfo.utime
> 
>     proc.psinfo.utime
>     Help:
>     time (in ms) spent executing user code since process started
> 
> 


<Prev in Thread] Current Thread [Next in Thread>